Somone called for regex? Give me 30 seconds :).
on $*:TEXT:/^[.!@]Whois (on|off)/Si:#: {
if ($nick(#,$nick,oh)) {
if ($regml(1) == on) && (!$hget(whois,$chan)) {
$iif($regml(1) == on,hadd -m,hdel) whois $chan on
msg $chan 1Auto Whois for6 $chan 1is now: 6 $+ $regml(1) $+ 1.
}
elseif ($regml(1) == off) && ($hget(whois,$chan)) {
$iif($regml(1) == on,hadd -m,hdel) whois $chan on
msg $chan 1Auto Whois for6 $chan 1is now: 6 $+ $regml(1) $+ 1.
}
else {
notice $nick Auto whois for $chan is already $regml(1) $+ !
}
}
else notice $nick You need to be atleast a halfop to set this!
}
ON *:JOIN:#: {
if ($hget(Whois,$chan)) {
set %msg $chan $nick
whois $nick
}
}
raw 319:*:{
tokenize 32 %msg $1-
msg $1 1[ $+ 6 $+ $2 $+ 1] 1 Is On: $5-
unset %msg
}
I know it could be better and i dont know if it could be shortend and still have all the same things, but this is what i came up with, i tried using,
if ($regml(1) == on) && (!$hget(whois,$chan)) || ($regml(1) == off) && ($hget(whois,$chan)) {
But for some reason it failed and never went threw, il let jethro or napa correct me :P.