Here is a PM system I made some time ago with help from some of you here at Hawkee (excuse me for not naming anyone, but I forget exactly who all helped and it was a long time ago). You can block all PM's or add names to a list of allowed names that can PM you. It can be turned on and off at will as well. I believe I have all bugs there might have been worked out of it, so the time has come to post it for you all to use. Enjoy :)
-Edit-
Had to stop the DND working on a msg from Services, else it kept trying until you would flood out.
menu nicklist,status {
DND System:dnd_system
}
alias dnd_system {
dialog -mdo dnd_system dnd_system
}
dialog dnd_system {
title "DND System"
size -1 -1 100 160
option dbu
box "Controls", 1, 4 3 92 154
text "DND Allow List", 2, 10 27 34 7, disable
list 3, 10 35 80 100
edit "", 4, 10 130 80 10, autohs
radio "ON", 5, 26 13 15 10, group
radio "OFF", 6, 56 13 17 10
button "Add", 7, 10 141 40 11
button "Remove", 8, 50 141 40 11
}
on *:dialog:dnd_system:*:*: {
if ( $devent == init ) {
loadbuf -o $dname 3 dnd_allow.txt
did -f $dname 4
did -b $dname 7,8
did -c $dname $iif(%dnd == on,5,6)
}
elseif ( $devent == sclick ) {
if ( $did == 3 ) {
did -e $dname 8
}
elseif ( $did == 5 ) {
set %dnd on
amsg 14,1[3,1 DND 0,1is 3,1ON 14,1][0,1 I am not accepting 3,1P2P's 14,1]
}
elseif ( $did == 6 ) {
set %dnd off
amsg 14,1[3,1 DND 0,1is 3,1OFF 14,1][0,1 I am now accepting 3,1P2P's 14,1]
}
elseif ( $did == 7 ) {
if (( $read(dnd_allow.txt,w,$did(4)) == $null )) {
write -a dnd_allow.txt $chr(32) $+ $iif($did(dnd_system,3) != $null,$($crlf,0)) $did(4)
var %dnd_allow.line = $lines(dnd_allow.txt)
did -a $dname 3 $iif($did(dnd_system,3) != $null,$crlf) $+ $read(dnd_allow.txt,%dnd_allow.line)
}
did -r $dname 4
did -b $dname 7
}
elseif ( $did == 8 ) {
write -ds $did(3).seltext dnd_allow.txt
var %l = 1
did -d $dname 3 $did(3).sel
while ( %l <= $lines(friends.txt) ) {
if (( $read(dnd_allow.txt,%l) == $null ) { goto lines }
did -a $dname 3 $iif($did(dnd_system,3) != $null,$crlf) $+ $read(dnd_allow.txt,%l)
:lines
inc %l
}
did -b $dname 8
}
}
elseif ) $devent == dclick ) {
if ( $did == $did(3).seltext ) {
query $did(3).seltext
}
}
elseif ( $devent == edit ) {
did $iif($did(4),-e,-b) $dname 7
}
}
on ^*:TEXT:*:?: {
if ($nick == services) { close -m | halt }
if ( %dnd == on ) && ( !$read(dnd_allow.txt,ntw,$nick) ) {
.msg $nick 14,1[3,1 DND 0,1is 3,1ON 14,1][0,1 I am not accepting 3,1P2P's 14,1]
close -m
halt
}
}
Umm the 50% wasn\'t about his rate you twats it was about his critique of the code.You said he complimented on some ones code but really only half of his comment was a compliment the other half wasn\'t hence my 50%:
Eugenio Said:
very nice script <--GOOD 50%
horrid colours. <--BAD 50%
7/10 --your 70%
Go play in traffic before you comment about my post son and GENE stfu boy and go code.:P
Haha, well slow or not, with no words, they can\'t click add. Click all day and it will do nothing. Once they start typing in the field, the Add button is the enabled. Also the Remove button is Disabled until a nick is selected from the allow list, then it too enables. I don\'t see how I can make it say an error message, when you can\'t even click the button, therefore you cannot trigger anything with it. Not even an error message.
And @ big, depends on what you are implying, lol.
The dialog is a bit BIG.You should add error notices for checkin to see if text has been entered the edit field and a entry is sselected in the list box.Mundane sure maybe but correct oh yes :P other wise its all good it blocks who its supposeed to an allows who it supposed to.\"Rate it or Hate it\"...6/10.`-.-