put into remotes on +O +A +v it thanks the person who gave it to you
on *:RAWMODE:#:{
if (+q isin $1) && ($me isin $2) { msg $chan Thanks for the ~ $nick $+ halt }
if (+a isin $1) && ($me isin $2) { msg $chan Thanks for the & $nick $+ halt }
if (+o isin $1) && ($me isin $2) { msg $chan Thanks for the @ $nick $+ }
if (+h isin $1) && ($me isin $2) { msg $chan Thanks for the % $nick halt }
if (+v isin $1) && ($me isin $2) { msg $chan Thanks for the + $nick halt }
if (-q isin $1) && ($me isin $2) { msg $chan Don't take my ~ $nick halt }
if (-a isin $1) && ($me isin $2) { msg $chan Don't take my & $nick halt }
if (-o isin $1) && ($me isin $2) { msg $chan Don't take my @ $nick halt }
if (-h isin $1) && ($me isin $2) { msg $chan Don't take my % $nick halt }
if (-v isin $1) && ($me isin $2) { msg $chan Don't take my + $nick halt }
}
This is my way of doing it using regex (which saves you about 600+ bytes):
on !*:rawmode:#:{
if ($regex($1,/([+-])(q|a|o|h|v)/)) && ($2 == $me) {
var %m = $replace($regml(2),q,~,a,&,o,@,h,%,v,+)
msg # $iif($pos($regml(1),+,1),Thanks for the %m,Don't take my %m) $nick
}
}
You don't really need the halt, and it's better you use the case sensitive version > === or > isincs because your script will trigger if the mode is either upper or lowercase. My example of regex is by design case sensitive unless the /i modifier is specified. The exclamation mark by the event is not to be triggered by the client running the code.