a simple small bit of code that allows u to control who messages you and who doesnt,.with auto ignore, memorise nicks, and a restore to default option
on ^*:text:*:?: {
if (%msg.prot == on) {
if (%msg. [ $+ [ $nick ] ] == $null) {
inc -u10 %m. [ $+ [ $nick ] ]
if (%m. [ $+ [ $nick ] ] == 1) { msg $nick Sorry I am currently not accepting query's (ask me in a main channel first) }
if (%m. [ $+ [ $nick ] ] == 4) { notice $nick 14(4bad14)15: you have been auto added to ignore for7 4515secs for 094 unwanted queries | ignore -u45 $1 }
}
}
}
menu Query,nicklist {
msg prot
.$iif(%msg.prot == on,Turn Off):set %msg.prot off
.$iif(%msg.prot == off,turn on):set %msg.prot on
.$iff(%msg.prot == $null,turn on):set %msg.prot on
.-
.allow user:set %msg. [ $+ [ $1 ] ] ok | echo -a 14(9added14)15: $1 is now able to message you. | notice $1 14(9accepted14)15 You have now been added, and private messages will now be accepted.
.disallow user:unset %msg. [ $+ [ $1 ] ] | echo -a 14(4removed14)15: $1 is now unable to message you.
.-
.restore default:unset %msg.*
}
Hmm, this isn\'t really a spam detector or anything, just a query blocker. If you meant to make it a query blocker, why not just decline all messages? You should also include the on *:open event. When first opening queries. Then you wouldn\'t have to use the on text event at all.
@ the code, you aren\'t unsetting variables, and why not store these nicks in an ini file or txt file and use $read/$readini to check? It\'d be pretty cool to include a dialog, but that isn\'t imperative. One last thing, you should use groups to disable/enable the snippet. ;)