https://script.quakenet.org/wiki/index.php?title=IAL-Update&feed=atom&action=history
IAL-Update - Revision history
2024-03-29T07:22:10Z
Revision history for this page on the wiki
MediaWiki 1.27.2
https://script.quakenet.org/wiki/index.php?title=IAL-Update&diff=4336&oldid=prev
Saturn: scon -at1, not scon -am1
2006-08-21T17:26:27Z
<p>scon -at1, not scon -am1</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 17:26, 21 August 2006</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l69" >Line 69:</td>
<td colspan="2" class="diff-lineno">Line 69:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LOAD EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LOAD EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>  [[On_load|on *:load:]]{ ![[scon]] -<del class="diffchange diffchange-inline">am1 </del>.!timer $!+ $!cid $!+ .ial-update.update 1 $$delay.who ial-update.update }</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>  [[On_load|on *:load:]]{ ![[scon]] -<ins class="diffchange diffchange-inline">at1 </ins>.!timer $!+ $!cid $!+ .ial-update.update 1 $$delay.who ial-update.update }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IALUPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IALUPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  alias ialupdate { !echo -a IAL-update: $ial-update.update }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  alias ialupdate { !echo -a IAL-update: $ial-update.update }</div></td></tr>
</table>
Saturn
https://script.quakenet.org/wiki/index.php?title=IAL-Update&diff=1456&oldid=prev
Vliedel: bug: $len(%chan) while %chan isn't used
2006-08-15T17:40:36Z
<p>bug: $len(%chan) while %chan isn't used</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 17:40, 15 August 2006</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l144" >Line 144:</td>
<td colspan="2" class="diff-lineno">Line 144:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; loop through the channels, as long as %l smaller then $2, increase %l for the length of the  channel</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   ; loop through the channels, as long as %l smaller then $2, increase %l for the length of the  channel</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   while (%x <= $numtok(%c,32)) && (%l < $2) {</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>   while (%x <= $numtok(%c,32)) && (%l < $2) {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>     !inc %l $len(%<del class="diffchange diffchange-inline">chan</del>)</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>     !inc %l $len<ins class="diffchange diffchange-inline">($comchan($me,[[$gettok]]</ins>(%<ins class="diffchange diffchange-inline">c,%x,32))</ins>)</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; %l greater then $2, stop the loop</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     ; %l greater then $2, stop the loop</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     if (%l > $2) { !break }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     if (%l > $2) { !break }</div></td></tr>
</table>
Vliedel
https://script.quakenet.org/wiki/index.php?title=IAL-Update&diff=1454&oldid=prev
Doomie: added Category:Script_Archive
2005-11-21T20:37:22Z
<p>added Category:Script_Archive</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 20:37, 21 November 2005</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l266" >Line 266:</td>
<td colspan="2" class="diff-lineno">Line 266:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  [[On_disconnect|on *:disconnect:]]{ if ($hget($+(ial-update.,$cid))) { ![[hfree]] $+(ial-update.,$cid) } }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>  [[On_disconnect|on *:disconnect:]]{ if ($hget($+(ial-update.,$cid))) { ![[hfree]] $+(ial-update.,$cid) } }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Category:IAL]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Category:IAL<ins class="diffchange diffchange-inline">]][[Category:Script_Archive</ins>]]</div></td></tr>
</table>
Doomie
https://script.quakenet.org/wiki/index.php?title=IAL-Update&diff=959&oldid=prev
Doomie at 20:35, 21 November 2005
2005-11-21T20:35:36Z
<p></p>
<p><b>New page</b></p><div>To have your [[:Category:IAL|IAL]] always up-to-date, you can use the following script (you can find more detailed explanations in the script).<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IAL-UPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
;info:<br />
;<br />
; by wiebe @ QuakeNet<br />
; version 1.0 (written and tested on mIRC 6.15)<br />
;<br />
; last edit: Sun Jun 06 2004<br />
;<br />
;<br />
;What does this script do?<br />
;<br />
; updates the IAL by doing /who chan1,chan2,chan3 etc<br />
; if a channel is too big, /who nick1,nick2,nick3 etc is done untill the IAL for the channel is updated <br />
; script updates from smallest to the biggest channel<br />
;<br />
;<br />
;How to use this script?<br />
;<br />
; config the options below<br />
; /ialupdate can be used to make the script update the IAL without waiting for the timer to trigger it<br />
;<br />
;<br />
;Why is this script good?<br />
;<br />
; sending /who chan for every channel is not needed and goes slow (lag)<br />
; sending /who chan on join may cause Excess Flood or Max sendQ exceeded<br />
; sending /who chan1,chan2,chan3 can be much faster, but only if there are not too many results (Max sendQ exceeded) <br />
;<br />
;<br />
; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS MAX.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
[[alias]] -l max.who {<br />
; maximum number of replies in a WHO, too big may cause 'Max sendQ exceeded' disconnection<br />
; too low may take the script a long time to update the IAL, 500 or 400 should be fine for most situations<br />
![[return]] 700<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS LEN.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias -l len.who {<br />
; maximum length of the /who <string>, too long may cause the server to ignore the command<br />
; too low may slow things down, 400 should be fine in most cases<br />
!return 400<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS DELAY.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias -l delay.who {<br />
; N seconds after the first join, the script starts to update the IAL<br />
!return 120<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS REPEAT.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias -l repeat.who {<br />
; wait N seconds after doing /who to do the next check and /who<br />
!return 30<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS SHOW ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias -l show.who {<br />
; set this to 1 if you want the script to echo when the IAL is updated<br />
; shows number of opers, number of users that are away, number of users that are deaf (+d),<br />
; number of users that have fake host (+x)<br />
; may slow things down, needs some checks / loops etc<br />
; only shows when a whole channel is being who'd<br />
!return 1<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; JOIN EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
on *:join:#:{<br />
; we join, IAL not updated, timer does not run, start a timer<br />
[[if]] ([[$nick]] == [[$me]]) && (![[$timer]]([[DollarPlus|$+]]([[$cid]],.ial-update.update))) {<br />
.![[timer]] $+ $cid $+ .ial-update.update 1 $$delay.who ial-update.update<br />
}<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LOAD EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
[[On_load|on *:load:]]{ ![[scon]] -am1 .!timer $!+ $!cid $!+ .ial-update.update 1 $$delay.who ial-update.update }<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IALUPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias ialupdate { !echo -a IAL-update: $ial-update.update }<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.UPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
alias -l ial-update.update {<br />
!var %c, %n<br />
; IAL is set on<br />
if ($ial) {<br />
; hash table does not exist, set a var with the channels we need to who<br />
if (![[$hget]]($+(ial-update.,$cid))) { ![[var]] %c = $ial-update.chan($max.who,$len.who)<br />
; something is in there, send it to the hash alias, send the who request<br />
if (%c) { ial-update.hash %c | .!quote WHO %c }<br />
; else no channels to who, set a var with the nicks we need to who<br />
else { !var %n = $ial-update.nick($max.who,$len.who)<br />
; something is in there, send it to the hash alias, send the who request<br />
if (%n) { ial-update.hash %n | .!quote WHO %n }<br />
}<br />
}<br />
; we did a who or the hash table was not empty, start a timer to run this alias again<br />
if (%c) || (%n) || ($hget($+(ial-update.,$cid))) {<br />
.!timer $+ $cid $+ .ial-update.update 1 $$repeat.who ial-update.update<br />
}<br />
; return some info<br />
if (%c) || (%n) { !return updating }<br />
elseif ($hget($+(ial-update.,$cid))) { !return already in progress }<br />
else { !return nothing to update }<br />
}<br />
; ial is off return some info<br />
else { !return ERROR, IAL is turned off, /IAL on to enable }<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.SORT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; $ial-update.sort<br />
; sorts channels where the IAL is not updated<br />
; <number of nicks>.<channel number><br />
; 127.1 <= means 127 users on channel 1<br />
alias -l ial-update.sort {<br />
!var %x = 1, %c<br />
; loop through all common channels that we have with ourself<br />
; $chan(0) returns the number of open channel windows,<br />
; which does not mean you are on it ("keep channels open" option)<br />
[[while]] (%x <= $comchan($me,0)) {<br />
; check if the ial is not updated or busy, add it to a var<br />
if ([[$chan]]($comchan($me,%x)).ial == [[$false]]) { !var %c = [[$addtok]](%c,$+($nick([[$comchan]]($me,%x),0),.,%x),32) }<br />
!inc %x<br />
}<br />
; return it sorted<br />
!return [[$sorttok]](%c,32,n)<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.MAX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; $ial-update.max(N)<br />
; N maximum number of nicks to request at once<br />
; this alias returns the channels to ial based on the info provided by $ial-update.sort<br />
; #chan1,#chan2,#chan3<br />
alias -l ial-update.max {<br />
!var %x = 1, %t = 0, %c = $ial-update.sort, %w<br />
; loop through the channels and as long as %t smaller then $1, increase %t<br />
while (%x <= [[$numtok]](%c,32)) && (%t < $1) {<br />
!inc %t $gettok($gettok(%c,%x,32),1,46)<br />
; if %t is greater then $1, stop the loop<br />
if (%t > $1) { !break }<br />
; add it to a var<br />
!var %w = $addtok(%w,$gettok($gettok(%c,%x,32),2,46),32)<br />
!inc %x<br />
}<br />
!return %w<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.CHAN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; $ial-update.chan(N,L)<br />
; N maximum number of nicks to request at once<br />
; L maximum length of the WHO request<br />
; this alias is used to WHO channels<br />
alias -l ial-update.chan {<br />
!var %x = 1, %l = 0, %c = $ial-update.max($1), %w<br />
; loop through the channels, as long as %l smaller then $2, increase %l for the length of the channel<br />
while (%x <= $numtok(%c,32)) && (%l < $2) {<br />
!inc %l $len(%chan)<br />
; %l greater then $2, stop the loop<br />
if (%l > $2) { !break }<br />
; add it to the var<br />
!var %w = $addtok(%w,$comchan($me,[[$gettok]](%c,%x,32)),44)<br />
!inc %x<br />
}<br />
!return %w<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.NICK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; $ial-update.nick(N,L)<br />
; N maximum number of nicks to request at once<br />
; L maximum length of the WHO request<br />
; this alias is used to WHO nicks<br />
alias -l ial-update.nick {<br />
!var %x = 1<br />
; loop through the channels untill we found one where the IAL isnt updated<br />
while ($chan($comchan($me,%x)).ial != $false) && (%x <= $comchan($me,0)) {<br />
![[inc]] %x<br />
}<br />
; ial is not updated, set vars<br />
if ($chan($comchan($me,%x)).ial == $false) { !var %y = 1, %t = 0, %l = 0, %w<br />
; loop <br />
while (%t <= $1) && (%l < $2) && (%y <= $nick($comchan($me,%x),0)) {<br />
; ial for that nick isnt updated, increase %l<br />
if (!$ial($nick($comchan($me,%x),%y))) {<br />
!inc %l $len($nick($comchan($me,%x),%y))<br />
; if greater then $2, stop the loop<br />
if (%l > $2) { !break }<br />
; add it to the var<br />
!var %w = $addtok(%w,$nick($comchan($me,%x),%y),44)<br />
}<br />
!inc %y<br />
}<br />
!return %w<br />
}<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.HASH ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; /ial-update.hash <things> -remove<br />
alias -l ial-update.hash {<br />
; $2 is not there, set a var<br />
if ($2 == $null) { !var %x = $numtok($1,44)<br />
; loop through each part seperated with a comma, add it to a hash table<br />
while (%x) { !hadd -m $+(ial-update.,$cid) $gettok($1,%x,44) 1 | !dec %x }<br />
; add mask<br />
!hadd -m $+(ial-update.,$cid) -mask $1<br />
}<br />
; $2 is -remove, set a var<br />
elseif ($2 == -remove) { !var %x = $numtok($1,44)<br />
; loop through each part seperated with a comma, remove it from the hash table<br />
while (%x) { if ($hget($+(ial-update.,$cid))) { !hdel $+(ial-update.,$cid) $gettok($1,%x,44) } | !dec %x }<br />
; del mask<br />
!hdel $+(ial-update.,$cid) -mask<br />
; check hash table, free hash table<br />
if ($hget($+(ial-update.,$cid),0).item == 0) && ($hget($+(ial-update.,$cid))) { !hfree $+(ial-update.,$cid) }<br />
}<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RAW 352 WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; 352 <you> <channel> <user> <host> <server> <nick> <flags> :<distance> <realname><br />
[[Raw_352|raw 352]]:& & & & & & & & *: {<br />
; chan or nick are in the hash table<br />
if ($hget($+(ial-update.,$cid),$2)) || ($hget($+(ial-update.,$cid),$6)) {<br />
; check setting, set a var<br />
if ($show.who == 1) && ($hget($+(ial-update.,$cid),$2)) && ($comchan($6,0)) { !var %x = $comchan($6,0)<br />
; loop, set a var<br />
while (%x) { !var %c = $comchan($6,%x)<br />
; check has table<br />
if ($hget($+(ial-update.,$cid),%c)) {<br />
; * meaning oper isin $7, increase<br />
if (* isin $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),oper) }<br />
; G meaning Gone isin $7, increase<br />
if (G isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),away) }<br />
; d meaning deaf isin $7, increase<br />
if (d isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),deaf) }<br />
; x meaning fake host isin $7, increase<br />
if (x isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),xhost) }<br />
}<br />
!dec %x<br />
}<br />
}<br />
; stop mirc from showing this raw<br />
![[haltdef]]<br />
}<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RAW 315 WHO END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
; raw 315 <you> <requested> :End of /who list.<br />
[[Raw_315|raw 315]]:& & end of /WHO list.: {<br />
; check -mask in hash table<br />
if ($hget($+(ial-update.,$cid),-mask) == $2) {<br />
; check setting, set a var<br />
if ($show.who == 1) { !var %x = $numtok($2,44)<br />
; loop, we are on the channel, set var<br />
while (%x) { if ($me ison $gettok($2,%x,44)) { !var %c = $gettok($2,%x,44)<br />
; oper info<br />
!var %oper = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),oper)),$ifmatch,0)<br />
!var %oper = %oper / $round($calc(%oper / $nick(%c,0) * 100),1) $+ % Oper<br />
; away info<br />
!var %away = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),away)),$ifmatch,0)<br />
!var %away = %away / $round($calc(%away / $nick(%c,0) * 100),1) $+ % Away<br />
; deaf info<br />
!var %deaf = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),deaf)),$ifmatch,0)<br />
!var %deaf = %deaf / $round($calc(%deaf / $nick(%c,0) * 100),1) $+ % deaf<br />
; xhost info<br />
!var %xhost = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),xhost)),$ifmatch,0)<br />
!var %xhost = %xhost / $round($calc(%xhost / $nick(%c,0) * 100),1) $+ % x-host<br />
; echo<br />
!echo -t $gettok($2,%x,44) * IAL updated ( $+ %oper ---- %away ---- %deaf ---- %xhost $+ )<br />
}<br />
; remove from hash table<br />
![[hdel]] $+(ial-update.,$cid) $+(%c,$chr(44),oper) | !hdel $+(ial-update.,$cid) $+(%c,$chr(44),away)<br />
!hdel $+(ial-update.,$cid) $+(%c,$chr(44),deaf) | !hdel $+(ial-update.,$cid) $+(%c,$chr(44),xhost)<br />
!dec %x<br />
}<br />
}<br />
; remove the items from the hash table<br />
ial-update.hash $2 -remove<br />
!haltdef<br />
}<br />
}<br />
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DISCONNECT EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<br />
[[On_disconnect|on *:disconnect:]]{ if ($hget($+(ial-update.,$cid))) { ![[hfree]] $+(ial-update.,$cid) } }<br />
<br />
[[Category:IAL]]</div>
Doomie