;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; WHOISEXEC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;info: ; ; by wiebe @ QuakeNet ; version 1.0 (written and tested on mIRC 6.14) ; ; last edit: Tue Feb 24 2004 ; ; ;What does this script do? ; ; this script retrieves information from a whois request ; and passes this on to the specified alias (callback) ; ; /whoisexec [-cr] [params..] ; ; an example: ; /whoisexec wiebe msg #channel ; ; the above command results in the following: ; ; [22:10:00] <@wiebe> 311 wiebe wiebe wiebie.users.quakenet.org * wiebe is the name ; [22:10:00] <@wiebe> 319 wiebe @#chan1 +#chan2 #chan3 @#channel ; [22:10:00] <@wiebe> 312 wiebe some.quakenet.org some QuakeNet IRC Server ; [22:10:02] <@wiebe> 330 wiebe wiebe is authed as ; [22:10:04] <@wiebe> 338 wiebe wiebe@12.34.56.host.isp.com 12.34.56.78 Actual user@host, Actual IP ; [22:10:06] <@wiebe> 317 wiebe 0 1075755060 seconds idle, signon time ; [22:10:08] <@wiebe> 318 wiebe End of /WHOIS list. ; ; the following info is send to the specified alias: ; in the example above, is 'msg' the alias, '#channel' is the params part. ; numeric is the raw numeric the server sends, like 311 ; ; you can use multiple nicks seperated with a , ; like /whoisexec nick1,nick2,nick3,nickN [params..] ; ; you can use wildcards (?*) ; like /whoexec nick1*,n?ick2,ni?ck*3,nickN [params..] ; ; the -r switch can be used to make the script do a remote whois ; like /whoisexec -r nick1,nick2,nick3,nickN [params..] ; ; the -c switch can be used to clear the queue ; like /whoisexec -c ; ; the script uses a queue, multiple requests are pushed together to the server ; like 'WHOIS ,,,' ; ; a remote WHOIS request only works with 1 nick (no wildcards) ; so it may be slower as the script needs to do 'WHOIS nick nick' for each ; ; WARNING: DO NOT USE HALT IN AN ALIAS, USE RETURN! ; halt also halts the calling alias/event, return only stops the current alias ; and gives control back to the calling alias/event ; using halt in alias'es that are called from this script can cause it not to work 100% ; ; ;Examples: ; ; examples are included at the end the script, ; 1) public !whois ; 2) a channelscan script, does a whois when a user joins and echo's the channels ; 3) /whois script ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; send realnick ; check whois thing, signon time ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.DELAY ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.delay { ; when you use /whoisexec, it will wait N seconds before doing a /whois ; this delay can be 0 or 10, whatever works for you ; the script's queue works better if it can send multiple things in a whois request ; if you are not sure about this, leave it !return 1 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.RESTART ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.restart { ; the script has send a /whois , it will wait N seconds before the next whois request ; if you are not sure about this, leave it !return 5 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.MAXLITEMS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.maxitems { ; script does not whois more then N parts at once ; /whois ; if you are not sure about this, leave it !return 50 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.MAXLEN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.maxlen { ; max length of the /whois request ; a too long line may cause the server to ignore the command ; 300 should be a good default number ; the script does /whois never longer then N chars ; if you are not sure about this, leave it !return 300 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.RAW ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.raw { ; set this to 1 if you want the script to pass on the raw format of the raw ; the : that marks the last parameter will be included that way ; if you are not sure about this, leave it !return 1 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.RAWS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.raws { ; set here what raws numerics are in whois and what raws you want to get returned ; if you are not sure about this, leave it ; 301 = away ; 307 = registered nick ; 311 = user host realname ; 312 = server ; 313 = status ; 317 = idle/signon ; 318 = end of whois list ; 319 = channels ; 320 = real ip ; 330 = account ; 338 = real userhost/ip ; 378 = connecting from ; 401 = no such nick !return 301 307 311 312 313 317 318 319 320 330 338 378 401 } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; stop here, only change stuff if you know what you are doing ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; /whoisexec [-r] [params..] alias whoisexec { ; we are connected if ($status == connected) { ; set a var !var %r = 0 ; '$1' is -r if ($1 == -r) { ; no wildcards are in '$2' ; remote whois does not work with wildcards ; if there are wildcards, ignore the -r switch if (* !isin $2) && (? !isin $2) { ; set a var !var %r = 1 } ; tokenize '$2-' and continue the script !tokenize 32 $2- } ; '$1' is '-c' if ($1 == -c) { ; clear the queue $whoisexec.queue($+(whois.exec.queue.,$cid)).clear } ; do not clear the queue else { ; we got at least 2 parameters, else return if ($0 <= 1) { return } ; set a var !var %x = $numtok($1,44) ; loop as long as '%x' is greater then 0 while (%x) { ; add queue '$whoisexec.lower($gettok($1,%x,44))' to the queue ; see 'whoisexec.lower' alias whoisexec.queue $+(whois.exec.queue.,$cid,$iif(%r,.remote)) $whoisexec.lower($gettok($1,%x,44)) ; check if '$whoisexec.lower($gettok($1,%x,44)) $2-' is not already in the hash table if (!$hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($gettok($1,%x,44)) $2-,0).data) { ; increase item 'last' in the hash table !hinc -m $+(whois.exec.queue.,$cid,.item) last ; add an item with the value 'last' has with value '$gettok($1,%x,44) $2-' !hadd -m $+(whois.exec.queue.,$cid,.item) $hget($+(whois.exec.queue.,$cid,.item),last) $whoisexec.lower($gettok($1,%x,44)) $2- } ; decrease '%x' and go on to the next nick !dec %x } ; check if the timer does not already run if (!$timer($+($cid,.whoisexec))) { ; start a timer .!timer $+ $cid $+ .whoisexec 1 $$whoisexec.delay whoisexec.dump } } } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.DUMP ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; alias -l whoisexec.dump { ; part for normal whois ; set a var !var %whois ; loop as long as there are items in the queue and length of '%whois' is smaller or equal to the value defined above, number of nicks is lower then defined above while ($whoisexec.queue($+(whois.exec.queue.,$cid)).size > 0) && ($len(%whois) <= $$whoisexec.maxlen) && ($numtok(%whois,44) < $$whoisexec.maxitems) { ; set the next item !var %next = $whoisexec.queue($+(whois.exec.queue.,$cid)).next ; check if '%next' is in the hash table, if it is not do not add it if ($hfind($+(whois.exec.queue.,$cid,.item),%next *,0,w).data) { ; add it to '%whois' if it is not already in there !var %whois = $addtok(%whois,%next,44) } } ; '%whois' contains something if (%whois) { ; enable the '#whoisexec' group .!enable #whoisexec ; send whois .!quote WHOIS %whois } ; part for remote whois ; set the next item !var %remote = $whoisexec.queue($+(whois.exec.queue.,$cid,.remote)).next ; '%remote' holds something if (%remote) { ; enable the '#whoisexec' group .!enable #whoisexec ; do a remote whois, format /WHOIS ; only 1 nick and no wildcards can be used in a remote whois .!quote WHOIS 0 %remote } ; there are items left in the normal queue or remote queue if ($whoisexec.queue($+(whois.exec.queue.,$cid)).size > 0) || ($whoisexec.queue($+(whois.exec.queue.,$cid,.remote)).size > 0) { ; start a timer to start this alias again .!timer $+ $cid $+ .whoisexec 1 $$whoisexec.restart whoisexec.dump } } ; start of '#whoisexec' group ; turned off by default #whoisexec off ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RAW * ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; raw *:*:{ ; check if '$numeric' is in the setings above if ($istok($whoisexec.raws,$numeric,32)) && ($numeric != 318) { ; part for 'nick' ; check that nick '$2' is in the hash table if ($hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,0,w).data) { ; set a var !var %x = $hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,0,w).data ; loop as long as '%x' is greater then 0 while (%x) { ; run the alias that is in the hash table and pass '$numeric $2-' on to it $gettok($hget($+(whois.exec.queue.,$cid,.item),$hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,%x,w).data),2-,32) $numeric $iif($whoisexec.raw == 1,$gettok($rawmsg,4-,32),$2-) ; decrease '%x' and go on to the next match !dec %x } ; stop mirc from showing this raw !haltdef } ; part for 'nick' with wildcards ; check if is in the hash table elseif ($hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,0,wW).data) { ; set a var !var %x = $hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,0,wW).data ; loop as long as '%x' is greater then 0 while (%x) { ; run the alias that is in the hash table and pass '$numeric $2-' on to it $gettok($hget($+(whois.exec.queue.,$cid,.item),$hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($2) *,%x,wW).data),2-,32) $numeric $iif($whoisexec.raw == 1,$gettok($rawmsg,4-,32),$2-) ; decrease '%x' and go on to the next match !dec %x } } ; stop mirc from showing this raw !haltdef } ; '$numeric' is 318, so this is end of /whois list. if ($numeric == 318) { ; check if the hash table exists if ($hget($+(whois.exec.queue.,$cid,.item))) { ; set a var !var %x = $numtok($2,44) ; loop through the things in '$2' that are seperated by a , while ($gettok($2,%x,44)) { ; set a var with number of matches !var %y = $hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($gettok($2,%x,44)) *,0,w).data ; while '%y' greater is then 0 while (%y) { ; if '318' is set in the raws above if ($istok($whoisexec.raws,318,32)) { ; run the alias that is in the hash table and pass '$numeric $gettok($2,%x,44) $3-' on to it $gettok($hget($+(whois.exec.queue.,$cid,.item),$hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($gettok($2,%x,44)) *,%y,w).data),2-,32) $numeric $gettok($2,%x,44) $iif($whoisexec.raw == 1,$gettok($rawmsg,5-,32),$3-) } ; delete the item from the hash table !hdel $+(whois.exec.queue.,$cid,.item) $hfind($+(whois.exec.queue.,$cid,.item),$whoisexec.lower($gettok($2,%x,44)) *,%y,w).data ; descrease '%y' go on to the next match !dec %y } ; decrease '%x' go on to the next nick !dec %x } ; stop mirc from showing this raw !haltdef ; disable the '#whoisexec' group whoisexec.disable } } } ; end of '#whoisexec' group #whoisexec end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.LOWER ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $whoisexec.lower(nick) alias -l whoisexec.lower { ; on IRC these chars are upper(lower) case of eachother: { = [, } = ], | = \, ~ = ^ ; so here we replace them to make sure we compare the right things right !return $replace($1,$chr(123),$chr(91),$chr(125),$chr(93),$chr(124),$chr(92),$chr(126),$chr(94)) } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.DISABLE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; this alias will only disable the group '#whoisexec' if it is nolonger needed (checks all connections) alias -l whoisexec.disable { ; set a var !var %x = 1 ; loop through all connection id's while (%x <= $scid(0)) { ; there is 1 item in the 'item' queue if ($hget($+(whois.exec.queue.,$scid(%x),.item),0).item == 1) { ; free the hash table !hfree $+(whois.exec.queue.,$scid(%x),.item) } ; more then 1 item in the 'item' queue elseif ($hget($+(whois.exec.queue.,$scid(%x),.item),0).item > 1) { ; stop !return } ; increase '%x' and go on to the next connection id !inc %x } ; disable the '#whoisexec' group .!disable #whoisexec } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS WHOISEXEC.QUEUE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; $1 = table, $2 = nick alias whoisexec.queue { ; there is a 2nd parameter and nick '$2' is not already in the queue (and not in the .remote queue) if ($2 != $null) && (!$hfind($1,$2).data) && (!$hfind($+($1,.remote),$2).data) { ; increase item 'last' !hinc -m $1 last ; add nick '$2' to the hashtable with item name that 'last' has !hadd -m $1 $hget($1,last) $2 } ; called as identifier ($alias) and propertie is next ($alias().next) and hash table '$1' exists elseif ($isid) && ($prop == next) && ($hget($1)) { ; increase item 'first' !hinc -m $1 first ; 'first' is smaller or equal to 'last' if ($hget($1,first) <= $hget($1,last)) { ; store next item in var '%next' !var %next = $hget($1,$hget($1,first)) ; delete this item from the hashtable !hdel $1 $hget($1,first) ; this is the last item if ($hget($1,first) >= $hget($1,last)) { ; free the hash table !hfree $1 } ; return '%next' !return %next } } ; called as identifier ($alias) and propertie is size ($alias().size) elseif ($isid) && ($prop == size) { ; decrease number of items with 1, (1 item in queue, and last is there) !return $iif($calc($hget($1,0).item -1) >= 0,$ifmatch,0) } ; called as identifier ($alias) and propertie is clear ($alias().clear) elseif ($isid) && ($prop == clear) { ; free hashtables that match $1 !hfree -w $1 } } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DISCONNECT EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; on *:disconnect: { ; check if the 'item' hash table exist if ($hget($+(whois.exec.queue.,$cid,.item))) { ; free the hash table !hfree $+(whois.exec.queue.,$cid,.item) } ; clear the queue $whoisexec.queue($+(whois.exec.queue.,$cid)).clear ; disable the '#whoisexec' group whoisexec.disable } ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; EXAMPLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; start of group whoisexec.example ; change 'off' to 'on' or write '/enable #whoisexec.example' to set these examples on #whoisexec.example on ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; EXAMPLE SCRIPT 1: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; on *:text:!whois &:#channel:{ whoisexec $2 pubwhois $chan } alias -l pubwhois { if ($2 == 311) { !msg $1 $3 is $4- } if ($2 == 313) { !msg $1 $3- } if ($2 == 330) { !msg $1 $3 $5-7 $4 } if ($2 == 319) { !msg $1 $3 on $4- } if ($2 == 401) { !msg $1 $3- } } ; example of how it looks ; [19:38:13] <@wiebe> !whois L ; [19:38:15] <@dev-mirc> L is TheLBot lightweight.quakenet.org * The lean, mean opping machine. ; [19:38:15] <@dev-mirc> L on @#chan1 +#chan2 #chan3 ; [19:38:16] <@dev-mirc> L is an IRC Operator ; [19:38:16] <@dev-mirc> L is authed as L ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; EXAMPLE SCRIPT 2: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; on !*:join:channel:{ ; in case you are on QuakeNet, you do not want to whois fishbot, trust me if ($nick == fishbot) { return } whoisexec $nick channelscan $chan } ; $1 = #chan alias channelscan { if ($2 == 319) { !echo 4 $1 $3 ison: $4- } } ; example of how it looks ; [19:39:58] * Joins: wiebe (wiebe@Wiebe.users.quakenet.org) ; wiebe ison: @#chan1 +#chan2 #chan3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; EXAMPLE SCRIPT 3: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;/whois [0] alias whois { if ($2) { whoisexec -r $2 whoiscallback } else { whoisexec $$1 whoiscallback } } alias whoiscallback { if ($1 == 301) { !echo $color(whois) -ai2 $2 away $3- } elseif ($1 == 307) { !echo $color(whois) -ai2 $2- } elseif ($1 == 311) { !echo $color(whois) -ai2 $2 is $+($3,@,$4) $5- if ($level($2 $+ ! $+ $3 $+ @ $+ $4) != $dlevel) && ($2 != $me) { !echo $color(whois) -ai2 $2 ulevel $level($2 $+ ! $+ $3 $+ @ $+ $4) $str($chr(160),3) (info: $ulist($2 $+ ! $+ $3 $+ @ $+ $4).info $+ ) } if ($ignore($2 $+ ! $+ $3 $+ @ $+ $4)) && ($2 != $me) { !echo $color(whois) -ai2 $2 ignore $ignore($2 $+ ! $+ $3 $+ @ $+ $4) $str($chr(160),3) (type: $ignore($2 $+ ! $+ $3 $+ @ $+ $4).type $+ ) } if ($ial(*!*@ $+ $4,0) > 1 ) { !var %x = 1, %c while (%x <= $ial(*!*@ $+ $4,0)) { if ($ial(*!*@ $+ $4,%x).nick != $2) { !var %c = $addtok(%c,$ial(*!*@ $+ $4,%x).nick,32) if ($len(%c) > 150) { !break } } !inc %x } if (%y) { !echo $color(whois) -ai2 $2 clones( $+ $calc($ial(*!*@ $+ $4,0) -1) $+ ) %c } } } elseif ($1 == 312) { if ($comchan($2,0)) && ($2 != $me) { !echo $color(whois) -ai2 $2 sharing( $+ $comchan($2,0) $+ ) $modecomchan($2) } !echo $color(whois) -ai2 $2 using $3- } elseif ($1 == 313) { !echo $color(info2) -ai2 $2- } elseif ($1 == 317) { !echo $color(whois) -ai2 $2- ( $+ $gettok($duration($3),1-2,32) $+ ) ( $+ $gettok($duration($calc($ctime - $4)),1-2,32) $+ ) $asctime($4) } elseif ($1 == 318) { !echo $color(whois) -ai2 $2- } elseif ($1 == 319) { !echo $color(whois) -ai2 $2 on( $+ $numtok($3-,32) $+ ) $3- } elseif ($1 == 320) { !echo $color(whois) -ai2 $2- } elseif ($1 == 330) { !echo $color(whois) -ai2 $2- } elseif ($1 == 338) { !echo $color(whois) -ai2 $2- } elseif ($1 == 378) { !echo $color(whois) -ai2 $2- } elseif ($1 == 401) { !echo $color(whois) -ai2 $2- } } ; $1 = nick alias -l modecomchan { !var %x = 1, %y while (%x <= $comchan($1,0)) { if ($left($remove($nick($comchan($1,%x),$1).pnick,$1),1)) { !var %y = $addtok(%y,$left($remove($nick($comchan($1,%x),$me).pnick,$me),1) $+ $left($remove($nick($comchan($1,%x),$1).pnick,$1),1) $+ $comchan($1,%x),160) } else { !var %y = $addtok(%y,$left($remove($nick($comchan($1,%x),$me).pnick,$me),1) $comchan($1,%x),160) } inc %x } !return %y } ; example of how it looks ; nick is user@host * realname ; nick ulevel 100     (info: friend) ; nick ignore *!*@host     (type: exclude) ; nick clones(1) nick-clone ; nick on(3) @#chan1 +#chan2 #chan3 ; nick sharing(1) +@#chan1 ; nick using some.irc.server.org This is an IRC Server ; nick account Nick ; nick user@abc.123.isp.com 12.34.56.78 Actual user@host, Actual IP ; nick idle 234 (3mins 54secs), signed on Mon Feb 23 18:18:50 2004 (1hr 23mins ago) ; nick End of /WHOIS list. on !*:open:?:*:{ if (!$halted) { whoisexec $nick whoisquery $nick } } alias whoisquery { if ($query($1)) { if ($2 == 301) { !echo $color(whois) -i2 $1 $3 away $4- } elseif ($2 == 307) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 311) { !echo $color(whois) -i2 $1 $3 is $+($4,@,$5) $6- if ($level($3 $+ ! $+ $4 $+ @ $+ $5) != $dlevel) && ($1 != $me) { !echo $color(whois) -i2 $1 $3 ulevel $level($1 $+ ! $+ $4 $+ @ $+ $5) $str($chr(160),3) (info: $ulist($1 $+ ! $+ $4 $+ @ $+ $5).info $+ ) } if ($ignore($2 $+ ! $+ $3 $+ @ $+ $4)) && ($2 != $me) { !echo $color(whois) -i2 $1 $3 ignore $ignore($3 $+ ! $+ $4 $+ @ $+ $5) $str($chr(160),3) (type: $ignore($1 $+ ! $+ $4 $+ @ $+ $5).type $+ ) } if ($ial(*!*@ $+ $4,0) > 1 ) { !var %x = 1, %c while (%x <= $ial(*!*@ $+ $5,0)) { if ($ial(*!*@ $+ $4,%x).nick != $1) { !var %c = $addtok(%c,$ial(*!*@ $+ $5,%x).nick,32) if ($len(%c) > 150) { !break } } !inc %x } if (%y) { !echo $color(whois) -i2 $1 $2 clones( $+ $calc($ial(*!*@ $+ $5,0) -1) $+ ) %c } } } elseif ($2 == 312) { if ($comchan($2,0)) && ($2 != $me) { !echo $color(whois) -i2 $1 $3 sharing( $+ $comchan($1,0) $+ ) $modecomchan($1) } !echo $color(whois) -i2 $1 $3 using $4- } elseif ($2 == 313) { !echo $color(info2) -i2 $1 $3- } elseif ($2 == 317) { !echo $color(whois) -i2 $1 $3- ( $+ $gettok($duration($4),1-2,32) $+ ) ( $+ $gettok($duration($calc($ctime - $5)),1-2,32) $+ ) $asctime($5) } elseif ($2 == 318) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 319) { !echo $color(whois) -i2 $1 $3 on( $+ $numtok($4-,32) $+ ) $4- } elseif ($2 == 320) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 330) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 338) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 378) { !echo $color(whois) -i2 $1 $3- } elseif ($2 == 401) { !echo $color(whois) -i2 $1 $3- } } } ; whoisexec.example group end #whoisexec.example end