0 Members and 1 Guest are viewing this topic.
on *:START: { echo -a -- Setting up scripts if (!$exists(htabs)) { mkdir htabs } echo -a -- Finished setting up scripts }on *:CONNECT: { set %z.htmp adrnick $+ $network | connecthashmake set %z.htmp nickadr $+ $network | connecthashmake unset %z.htmp}alias connecthashmake { hmake %z.htmp 100 if ($exists(htabs\ $+ %z.htmp)) { hload %z.htmp htabs\ $+ %z.htmp }}on *:DISCONNECT: { unset %z.chmod.*. $+ $network timer $+ conn $+ $cid off set %z.htmp adrnick $+ $network | hsave %z.htmp htabs\ $+ %z.htmp | hfree %z.htmp set %z.htmp nickadr $+ $network | hsave %z.htmp htabs\ $+ %z.htmp | hfree %z.htmp unset %z.htmp}on *:EXIT: { echo -a Cleaning up scripts unset %z.chmod* echo -a Done};Performing who on join allows population of address list checker;$timestampon ^*:JOIN:*: { updatehashtable $site $nick set %z.htab.adni adrnick $+ $network if (($gettok($hget(%z.htab.adni,$site),2,32)) && ($nick != $me)) { set %z.htab.time $gettok($hget(%z.htab.adni,$site),3,32) set %z.htab.nick $gettok($hget(%z.htab.adni,$site),2,32) if ($nick != %z.htab.nick) { echo $target $+ $color(join) $+ $timestamp * $nick has joined $chan $+ , using %z.htab.nick ( $+ $duration($calc($ctime - %z.htab.time)) $+ ) ago. haltdef } } unset %z.htab* if (($nick != $me ) && ($ialchan($address($nick,2),$chan,0) > 1 )) { var %a $ialchan($address($nick,2),$chan,0) while (%a) { if ($nick != $ialchan($address($nick,2),$chan,%a).nick) { set %b %b $ialchan($address($nick,2),$chan,%a).nick } dec %a } echo $target $+ $color(join) $+ $timestamp * $nick has joined $chan $+ , with clones $calc($ialchan($address($nick,2),$chan,0)-1) clone $+ $iif($calc($ialchan($address($nick,2),$chan,0)-1) > 1,s) ( %b ) $address($nick,2) unset %b haltdef } if ($nick == $me) { .who $chan .timerj1 $+ $chan 1 2 .signal joinsect 1 $chan .timerj2 $+ $chan 1 2 .signal joinsect 2 $chan .timerj3 $+ $chan 1 4 .signal joinsect 3 $chan .timerj4 $+ $chan 1 6 .signal joinsect 4 $chan set %z.chmod. $+ $chan $+ . $+ $network $iif($nick($chan,0) == 1,3,0) ;set %z.chmod. $+ $chan $+ . $+ $network $pos(+%@&~,$left($nick($chan,$me).pnick,1),1) }}on *:SIGNAL:joinsect: { if ($1 == 1) { set %z.chmod. [ $+ [ $2 ] $+ ] . $+ $network $iif($nick($chan,0) == 1,3,0) } if ($1 == 2) { mode $2 b } if ($1 == 3) { mode $2 e } ; if ($1 == 4) { mode $2 i }}on *:NICK: { updatehashtable $site $newnick}on *:QUIT: { updatehashtable $site $nick $ctime}on *:PART:*: { updatehashtable $site $nick $stime}on *:RAWMODE:*: { if ($me == $2) { ;Sets variable for channel on network for mode number set %z.chmod. $+ $chan $+ . $+ $network $pos(+%@&~,$left($nick($chan,$me).pnick,1),1) }}on ^*:NOTICE:*:*: { if (($1 == $me) && ($3 == $null)) { echo -a ::: (LAG) : ( $+ $calc($uptime(mirc)-$2) $+ )msec. haltdef } if (($1 == $scid($4).me) && ($3 != $null)) { if ($calc($uptime(mirc)-$2) > 10000) { echo -a ::: (AUTOLAG WARNING) There is too much lag on ( $+ $3 $+ ). ( $+ $calc($uptime(mirc)-$2) $+ )msec. } haltdef }};########################################################################; RAW COMMAND INTERCEPTS FOR REMOTE SCRIPT MAINTENANCE;RPL_WHOREPLYraw 352:*: { if ($chr(35) isin $2) { updatehashtable $4 $6 }};RPL_ENDOFWHOraw 315:*: {};########################################################################; MENUS SECTION OF REMOTE SCRIPTmenu nicklist { UserInfo .Get Info:/uwho $$1 .Whois:/whois $$1 .Query:/query $$1 - Controls: .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 4,$iif($nick($chan,$1,q) != $null,Remove Owner,Set Owner)):$listmode(q,$iif($nick($chan,$1,q) != $null,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 3,$iif(& isin $nick($chan,$1).pnick,Remove Protect,Set Protect)):$listmode(a,$iif(& isin $nick($chan,$1).pnick,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 2,$iif($1 isop $chan,Remove Op,Set Op)):$listmode(o,$iif($1 isop $chan,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 2,$iif($1 ishop $chan,Remove HalfOp,Set HalfOp)):$listmode(h,$iif($1 ishop $chan,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 1,$iif($1 isvoice $chan,Remove Voice,Set Voice)):$listmode(v,$iif($1 isvoice $chan,-,+),$chan) CTCP/DCC: .Get VERSION: ctcp $$1 VERSION .Get TIME: ctcp $$1 TIME .Get PING: ctcp $$1 PING .Custom CTCP: ctcp $$1 $$?="Custom CTCP command:" .Chat via DCC: dcc chat $$1 .Send via DCC: dcc send $$1}menu channel { Channel Modes: channel Channel CTCPs .Send PING to $chan : ctcp $chan PING .Send TIME to $chan : ctcp $chan TIME .Send VERSION to $chan : ctcp $chan VERSION Check Lag: .notice $me $me $uptime(mirc) Check for clones: clonecheck}menu menubar { $iif($scid($cid).status == connected,$iif($timer(conn $+ $cid) == $null,Start Lag Timer,Stop Lag Timer)): { $iif($timer(conn $+ $cid) == $null, .timer $+ [ conn $+ [ $cid ] ] 0 30 scid [ [ $cid ] ] .notice $!me $me $!uptime(mirc) $!network $cid, .timer $+ conn $+ $cid off ) | echo -a Timer on $network is now $iif($timer(conn $+ $cid) == $null,Off,On) } Output Hash Tables:renderhashtabs}menu query { Check Lag: .notice $me $me $uptime(mirc)}menu status { Check Lag: .notice $me $me $uptime(mirc) User Modes .$iif(i isincs $usermode,Remove User Invisible,Set User Invisible):$iif(i isincs $usermode, mode $me -i, mode $me +i) .$iif(p isincs $usermode,Remove Channel Invisible,Set Channel Invisible):$iif(p isincs $usermode, mode $me -p, mode $me +p) .$iif(d isincs $usermode,Remove Deaf,Quit listening to channel chatter):$iif(d isincs $usermode, mode $me -d, mode $me +d) .$iif(w isincs $usermode,Don't listen to Wallops,Listen to Wallops):$iif(w isincs $usermode, mode $me -w, mode $me +w) .$iif(s isincs $usermode,Don't listen to server notices,Listen to server notices):$iif(s isincs $usermode, mode $me -s, mode $me +s) .$iif(R isincs $usermode,Allow PRIVMSGs/NOTICEs from Unregistered users,Don't allow PRIVMSGs/NOTICEs from Unregistered users):$iif(R isincs $usermode, mode $me -R, mode $me +R) .$iif(T isincs $usermode,Recieve CTCPs,Filter Out CTCPs):$iif(T isincs $usermode, mode $me -T, mode $me +T) .$iif(W isincs $usermode,Don't see WHOIS requests,See WHOIS attempts (IRCops Only)):$iif(W isincs $usermode, mode $me -W, mode $me +W) Stats .Check Banversion (B):stats B .Check Bad Words List (b):stats b .Check Spam Filter(f):stats f .Check G-Line/GZ-Line list:stats g .Check K-Line list:stats K .Check Oper block list:stats O .Check Shun list:stats s .Check Traffic list:stats T .Check U-Line list:stats U .Check V-Host list:stats V};########################################################################; ALIASES SECTION OF REMOTE SCRIPTalias massmode { if ( $1 == $null ) { return } if ($1 !isin eb) { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $nick($3,%_a) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a } else { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $address($nick($3,%_a),2) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a }};Arg1 = string of mode (w/o + or -, one letter ). Arg2 = String of change ( this is + or - ). Arg3 = channel namealias listmode { if ( $1 == $null ) { return } if ($1 !isin eb) { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $snick($3,%_a) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a } else { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $address($snick($3,%_a),2) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a }}alias modeall { var %_a $modespl var %_c $calc($0 - 3) while ( %_c > 0 ) { var %_d %_a if ( %_c < %_d ) { var %_d %_c } var %_b %_d | var %_g %_c while ( %_d != 0 ) { var %_e %_e $ [ $+ [ $calc(%_g + 3) ] ] dec %_d | dec %_g } var %_d %_b while ( %_d != 0 ) { var %_f [ [ %_f ] $+ [ $2 ] ] dec %_d } mode $1 $3 $+ %_f %_e unset %_e %_c = %_c - %_b }};Used in the menubar so I don't clutter that section upalias renderhashtabs { window -x @htabs set %z.htab.numtables $hget(0) aline @htabs Hash Table Count: %z.htab.numtables while (%z.htab.numtables) { set %z.htab.itemcount $hget(%z.htab.numtables,0).item aline @htabs Hash Table: $hget(%z.htab.numtables) aline @htabs ------------------------------------ while (%z.htab.itemcount) { aline @htabs $hget(%z.htab.numtables,%z.htab.itemcount).item : $hget(%z.htab.numtables,%z.htab.itemcount).data dec %z.htab.itemcount } aline @htabs ------------------------------------ dec %z.htab.numtables } aline @htabs Done generating tables aline @htabs ########################################## unset %z.htab*};/updatehashtable <hostmask> <nick>alias updatehashtable { ;Schema: address contains number of long entries ;^n^ contains nth entry consisting of up to 10 nicks, preceded by nick count. ; set %z.htab.adni adrnick $+ $network hadd nickadr $+ $network $2 $1 if (!$gettok($hget(%z.htab.adni,$1),1,32)) { hadd %z.htab.adni $1 1 hadd %z.htab.adni ^1^ $+ $1 1 $2 } else { set %z.htab.count $gettok($hget(%z.htab.adni,$1),1,32) set %z.htab.verify 0 while (%z.htab.count) { if ($istok($hget(%z.htab.adni, ^ $+ %z.htab.count $+ ^ [ $+ [ $1 ] ]),$2,32) == $true) { set %z.htab.verify 1 } dec %z.htab.count } if (!%z.htab.verify) { set %z.htab.tempcnt $gettok($hget(%z.htab.adni,$1),1,32) if ($gettok($hget(%z.htab.adni,^ $+ %z.htab.tempcnt $+ ^ [ $+ [ $1 ] ]),1,32) > 25) { inc %z.htab.tempcnt set %z.htab.temp %z.htab.tempcnt $gettok($hget(%z.htab.adni),2-,32) hadd %z.htab.adni $1 %z.htab.temp } set %z.htab.temp ^ $+ %z.htab.tempcnt $+ ^ [ $+ [ $1 ] ] set %z.htab.temp2 $hget(%z.htab.adni,%z.htab.temp) hadd %z.htab.adni %z.htab.temp $calc($gettok(%z.htab.temp2,1,32)+1) $gettok(%z.htab.temp2,2-,32) $2 } } if ($3) { ;sets main with additional about nick on this change set %z.htab.temp $gettok($hget(%z.htab.adni,$1),1,32) $2- hadd %z.htab.adni $1 %z.htab.temp } unset %z.htab*}alias clonecheck { hmake clones 16 set %z.cc.count $nick($chan,0) while (%z.cc.count) { set %z.cc.mask $hget(nickadr $+ $network,$nick($chan,%z.cc.count)) if (!$hget(clones,%z.cc.mask)) { hadd clones %z.cc.mask 1 $nick($chan,%z.cc.count) } else { set %z.cc.temp $calc($gettok($hget(clones,%z.cc.mask),1,32) + 1) $nick($chan,%z.cc.count) $gettok($hget(clones,%z.cc.mask),2-,32) hadd clones %z.cc.mask %z.cc.temp } dec %z.cc.count } set %z.cc.count $hget(clones,0).item if (!%z.cc.count) { halt } window -x @clones aline @clones Nick count: %z.cc.count aline @clones ------------------------------------ while (%z.cc.count) { if ($gettok($hget(clones,%z.cc.count).data,1,32) > 1) { set %z.cc.temp $hget(clones,%z.cc.count).data set %z.cc.tcnt $gettok(%z.cc.temp,1,32) set %z.cc.tnik $gettok(%z.cc.temp,2-,32) aline @clones %z.cc.tcnt clones ( $+ %z.cc.tnik $+ ) at $hget(clones,%z.cc.count).item } dec %z.cc.count } aline @clones ------------------------------------ unset %z.cc* hfree clones}
on *:START: { echo -a -- Setting up scripts if (!$exists(htabs)) { mkdir htabs } echo -a -- Finished setting up scripts }on *:CONNECT: { set %z.htmp adrnick $+ $network | connecthashmake set %z.htmp nickadr $+ $network | connecthashmake unset %z.htmp togglelagtimer}alias connecthashmake { hmake %z.htmp 100 if ($exists(htabs\ $+ %z.htmp)) { hload %z.htmp htabs\ $+ %z.htmp }}on *:DISCONNECT: { unset %z.chmod.*. $+ $network timer $+ conn $+ $cid off set %z.htmp adrnick $+ $network | hsave %z.htmp htabs\ $+ %z.htmp | hfree %z.htmp set %z.htmp nickadr $+ $network | hsave %z.htmp htabs\ $+ %z.htmp | hfree %z.htmp unset %z.htmp}on *:EXIT: { echo -a Cleaning up scripts unset %z.chmod* echo -a Done};Performing who on join allows population of address list checker;$timestampon ^*:JOIN:*: { updatehashtable $site $nick set %z.htab.adni adrnick $+ $network if (($gettok($hget(%z.htab.adni,$site),2,32)) && ($nick != $me)) { set %z.htab.time $gettok($hget(%z.htab.adni,$site),3,32) set %z.htab.nick $gettok($hget(%z.htab.adni,$site),2,32) if ($nick != %z.htab.nick) { echo $target $+ $color(join) $+ $timestamp * $nick has joined $chan $+ , using %z.htab.nick ( $+ $duration($calc($ctime - %z.htab.time)) $+ ) ago. haltdef } } unset %z.htab* if (($nick != $me ) && ($ialchan($address($nick,2),$chan,0) > 1 )) { var %a $ialchan($address($nick,2),$chan,0) while (%a) { if ($nick != $ialchan($address($nick,2),$chan,%a).nick) { set %b %b $ialchan($address($nick,2),$chan,%a).nick } dec %a } echo $target $+ $color(join) $+ $timestamp * $nick has joined $chan $+ , with clones $calc($ialchan($address($nick,2),$chan,0)-1) clone $+ $iif($calc($ialchan($address($nick,2),$chan,0)-1) > 1,s) ( %b ) $address($nick,2) unset %b haltdef } if ($nick == $me) { .who $chan .timerj1 $+ $chan 1 2 .signal joinsect 1 $chan .timerj2 $+ $chan 1 2 .signal joinsect 2 $chan .timerj3 $+ $chan 1 4 .signal joinsect 3 $chan .timerj4 $+ $chan 1 6 .signal joinsect 4 $chan set %z.chmod. $+ $chan $+ . $+ $network $iif($nick($chan,0) == 1,3,0) ;set %z.chmod. $+ $chan $+ . $+ $network $pos(+%@&~,$left($nick($chan,$me).pnick,1),1) }}on *:SIGNAL:joinsect: { if ($1 == 1) { set %z.chmod. [ $+ [ $2 ] $+ ] . $+ $network $iif($nick($chan,0) == 1,3,0) } if ($1 == 2) { mode $2 b } if ($1 == 3) { mode $2 e } ; if ($1 == 4) { mode $2 i }}on *:NICK: { if (($nick == $me) && $iif($scid($cid).status == connected,$iif($timer(conn $+ $cid) == $null,0,1),0)) { togglelagtimer 1337 echo -a Cycling LAG TIMER for nickchange .signal mynickchanged } updatehashtable $site $newnick}on *:QUIT: { updatehashtable $site $nick $ctime}on *:PART:*: { updatehashtable $site $nick $stime}on *:RAWMODE:*: { if ($me == $2) { ;Sets variable for channel on network for mode number set %z.chmod. $+ $chan $+ . $+ $network $pos(+%@&~,$left($nick($chan,$me).pnick,1),1) }}on ^*:NOTICE:*:*: { if (($1 == $me) && ($3 == $null)) { echo -a ::: (LAG) : ( $+ $calc($uptime(mirc)-$2) $+ )msec. haltdef } if (($1 == $scid($4).me) && ($3 != $null)) { if ($calc($uptime(mirc)-$2) > 10000) { echo -a ::: (AUTOLAG WARNING) There is too much lag on ( $+ $3 $+ ). ( $+ $calc($uptime(mirc)-$2) $+ )msec. } haltdef }}on *:SIGNAL:mynickchanged: { togglelagtimer 1337};########################################################################; RAW COMMAND INTERCEPTS FOR REMOTE SCRIPT MAINTENANCE;RPL_WHOREPLYraw 352:*: { if ($chr(35) isin $2) { updatehashtable $4 $6 }};RPL_ENDOFWHOraw 315:*: {};########################################################################; MENUS SECTION OF REMOTE SCRIPTmenu nicklist { UserInfo .Get Info:/uwho $$1 .Whois:/whois $$1 .Query:/query $$1 - Controls: .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 4,$iif($nick($chan,$1,q) != $null,Remove Owner,Set Owner)):$listmode(q,$iif($nick($chan,$1,q) != $null,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 3,$iif(& isin $nick($chan,$1).pnick,Remove Protect,Set Protect)):$listmode(a,$iif(& isin $nick($chan,$1).pnick,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 2,$iif($1 isop $chan,Remove Op,Set Op)):$listmode(o,$iif($1 isop $chan,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 2,$iif($1 ishop $chan,Remove HalfOp,Set HalfOp)):$listmode(h,$iif($1 ishop $chan,-,+),$chan) .$iif(%z.chmod. [ $+ [ $chan ] $+ . $+ [ $network ] ] > 1,$iif($1 isvoice $chan,Remove Voice,Set Voice)):$listmode(v,$iif($1 isvoice $chan,-,+),$chan) CTCP/DCC: .Get VERSION: ctcp $$1 VERSION .Get TIME: ctcp $$1 TIME .Get PING: ctcp $$1 PING .Custom CTCP: ctcp $$1 $$?="Custom CTCP command:" .Chat via DCC: dcc chat $$1 .Send via DCC: dcc send $$1}menu channel { Channel Modes: channel Channel CTCPs .Send PING to $chan : ctcp $chan PING .Send TIME to $chan : ctcp $chan TIME .Send VERSION to $chan : ctcp $chan VERSION Check Lag: .notice $me $me $uptime(mirc) Check for clones: clonecheck}menu menubar { $iif($scid($cid).status == connected,$iif($timer(conn $+ $cid) == $null,Start Lag Timer,Stop Lag Timer)): togglelagtimer Output Hash Tables:renderhashtabs}menu query { Check Lag: .notice $me $me $uptime(mirc)}menu status { Check Lag: .notice $me $me $uptime(mirc) User Modes .$iif(i isincs $usermode,Remove User Invisible,Set User Invisible):$iif(i isincs $usermode, mode $me -i, mode $me +i) .$iif(p isincs $usermode,Remove Channel Invisible,Set Channel Invisible):$iif(p isincs $usermode, mode $me -p, mode $me +p) .$iif(d isincs $usermode,Remove Deaf,Quit listening to channel chatter):$iif(d isincs $usermode, mode $me -d, mode $me +d) .$iif(w isincs $usermode,Don't listen to Wallops,Listen to Wallops):$iif(w isincs $usermode, mode $me -w, mode $me +w) .$iif(s isincs $usermode,Don't listen to server notices,Listen to server notices):$iif(s isincs $usermode, mode $me -s, mode $me +s) .$iif(R isincs $usermode,Allow PRIVMSGs/NOTICEs from Unregistered users,Don't allow PRIVMSGs/NOTICEs from Unregistered users):$iif(R isincs $usermode, mode $me -R, mode $me +R) .$iif(T isincs $usermode,Recieve CTCPs,Filter Out CTCPs):$iif(T isincs $usermode, mode $me -T, mode $me +T) .$iif(W isincs $usermode,Don't see WHOIS requests,See WHOIS attempts (IRCops Only)):$iif(W isincs $usermode, mode $me -W, mode $me +W) Stats .Check Banversion (B):stats B .Check Bad Words List (b):stats b .Check Spam Filter(f):stats f .Check G-Line/GZ-Line list:stats g .Check K-Line list:stats K .Check Oper block list:stats O .Check Shun list:stats s .Check Traffic list:stats T .Check U-Line list:stats U .Check V-Host list:stats V};########################################################################; ALIASES SECTION OF REMOTE SCRIPTalias massmode { if ( $1 == $null ) { return } if ($1 !isin eb) { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $nick($3,%_a) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a } else { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $address($nick($3,%_a),2) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a }};Arg1 = string of mode (w/o + or -, one letter ). Arg2 = String of change ( this is + or - ). Arg3 = channel namealias listmode { if ( $1 == $null ) { return } if ($1 !isin eb) { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $snick($3,%_a) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a } else { var %_a $nick($3,0) unset %_b while (%_a) { set %_b %_b $address($snick($3,%_a),2) | dec %_a } var %_a %_b | unset %_b modeall $3 $1 $2 %_a }}alias modeall { var %_a $modespl var %_c $calc($0 - 3) while ( %_c > 0 ) { var %_d %_a if ( %_c < %_d ) { var %_d %_c } var %_b %_d | var %_g %_c while ( %_d != 0 ) { var %_e %_e $ [ $+ [ $calc(%_g + 3) ] ] dec %_d | dec %_g } var %_d %_b while ( %_d != 0 ) { var %_f [ [ %_f ] $+ [ $2 ] ] dec %_d } mode $1 $3 $+ %_f %_e unset %_e %_c = %_c - %_b }};Used in the menubar so I don't clutter that section upalias renderhashtabs { window -x @htabs set %z.htab.numtables $hget(0) aline @htabs Hash Table Count: %z.htab.numtables while (%z.htab.numtables) { set %z.htab.itemcount $hget(%z.htab.numtables,0).item aline @htabs Hash Table: $hget(%z.htab.numtables) aline @htabs ------------------------------------ while (%z.htab.itemcount) { aline @htabs $hget(%z.htab.numtables,%z.htab.itemcount).item : $hget(%z.htab.numtables,%z.htab.itemcount).data dec %z.htab.itemcount } aline @htabs ------------------------------------ dec %z.htab.numtables } aline @htabs Done generating tables aline @htabs ########################################## unset %z.htab*};/updatehashtable <hostmask> <nick>alias updatehashtable { ;Schema: address contains number of long entries ;^n^ contains nth entry consisting of up to 10 nicks, preceded by nick count. ; set %z.htab.adni adrnick $+ $network hadd nickadr $+ $network $2 $1 if (!$gettok($hget(%z.htab.adni,$1),1,32)) { hadd %z.htab.adni $1 1 hadd %z.htab.adni ^1^ $+ $1 1 $2 } else { set %z.htab.count $gettok($hget(%z.htab.adni,$1),1,32) set %z.htab.verify 0 while (%z.htab.count) { if ($istok($hget(%z.htab.adni, ^ $+ %z.htab.count $+ ^ [ $+ [ $1 ] ]),$2,32) == $true) { set %z.htab.verify 1 } dec %z.htab.count } if (!%z.htab.verify) { set %z.htab.tempcnt $gettok($hget(%z.htab.adni,$1),1,32) if ($gettok($hget(%z.htab.adni,^ $+ %z.htab.tempcnt $+ ^ [ $+ [ $1 ] ]),1,32) > 25) { inc %z.htab.tempcnt set %z.htab.temp %z.htab.tempcnt $gettok($hget(%z.htab.adni),2-,32) hadd %z.htab.adni $1 %z.htab.temp } set %z.htab.temp ^ $+ %z.htab.tempcnt $+ ^ [ $+ [ $1 ] ] set %z.htab.temp2 $hget(%z.htab.adni,%z.htab.temp) hadd %z.htab.adni %z.htab.temp $calc($gettok(%z.htab.temp2,1,32)+1) $gettok(%z.htab.temp2,2-,32) $2 } } if ($3) { ;sets main with additional about nick on this change set %z.htab.temp $gettok($hget(%z.htab.adni,$1),1,32) $2- hadd %z.htab.adni $1 %z.htab.temp } unset %z.htab*}alias clonecheck { hmake clones 16 set %z.cc.count $nick($chan,0) while (%z.cc.count) { set %z.cc.mask $hget(nickadr $+ $network,$nick($chan,%z.cc.count)) if (!$hget(clones,%z.cc.mask)) { hadd clones %z.cc.mask 1 $nick($chan,%z.cc.count) } else { set %z.cc.temp $calc($gettok($hget(clones,%z.cc.mask),1,32) + 1) $nick($chan,%z.cc.count) $gettok($hget(clones,%z.cc.mask),2-,32) hadd clones %z.cc.mask %z.cc.temp } dec %z.cc.count } set %z.cc.count $hget(clones,0).item if (!%z.cc.count) { halt } window -x @clones aline @clones Nick count: %z.cc.count aline @clones ------------------------------------ while (%z.cc.count) { if ($gettok($hget(clones,%z.cc.count).data,1,32) > 1) { set %z.cc.temp $hget(clones,%z.cc.count).data set %z.cc.tcnt $gettok(%z.cc.temp,1,32) set %z.cc.tnik $gettok(%z.cc.temp,2-,32) aline @clones %z.cc.tcnt clones ( $+ %z.cc.tnik $+ ) at $hget(clones,%z.cc.count).item } dec %z.cc.count } aline @clones ------------------------------------ unset %z.cc* hfree clones}alias togglelagtimer { $iif($timer(conn $+ $cid) == $null, .timer $+ [ conn $+ [ $cid ] ] 0 30 scid [ [ $cid ] ] .notice $!me $me $!uptime(mirc) $!network $cid, .timer $+ conn $+ $cid off ) | $iif($1 != 1337,echo -a Timer on $network is now $iif($timer(conn $+ $cid) == $null,Off,On))}