; <!------------ start raw section ------------!>
; end of /who - /who the next channel in queue, get $ibl(), check chan modes on new chan, etc
raw 315:*: {
var %x = $+($network,_,$cid,_,$2)
if ($eval($+(%,synch_,%x),2)) {
if ($2 ischan) {
set $+(%,ibl_,%x) 1
.mode $2 +b
}
unset $eval($+(%,synch_,%x),1)
unset $eval($+(%,synched_,%x),1)
if ($deltok($eval($+(%,synch_,$network,_,$cid),2),1,32)) {
set $eval($+(%,synch_,$network,_,$cid),1) $ifmatch
.scid $cid who $gettok($eval($+(%,synch_,$network,_,$cid),2),1,32)
}
else { unset $eval($+(%,synch_,$network,_,$cid),1) }
halt
}
}
; don't show modes if joining channel
raw 324:*: { if ($eval($+(%,synch_,$network,_,$cid,_,$2),2)) { haltdef } }
; end of chan created - gets synch time, shows /scan if enabled
raw 329:*: {
if ($chan($2).key) { writeini $userdir(settings.ini) keys $+($network,.,$2) $chan($2).key }
if ($cfgstat(cmode) != $chan($2).mode && $nick($2,0) == 1) { mode $2 $cfgstat(cmode) }
var %x = $+($network,_,$cid,_,$2)
if ($eval($+(%,synched_,%x),2)) { halt }
elseif ($eval($+(%,synch_,%x),2) && $2 ischan) {
_tde $2 Synch $2 $+ $brac($chan($2).mode) in $_ticks($eval($+(%,synch_,%x),2))
set $eval($+(%,synched_,%x),1) yes
if $cfgstat(scan) == on { scan $2 }
halt
}
}
; output for /who if its not a channel we're joining
raw 352:*: { if $eval($+(%,synch_,$network,_,$cid,_,$2),2) { halt } }
; updates servers when you do a /links
raw 364:*: {
if ($network && !$server($2) && $chr(42) !isin $2 && monitor. !isin $2 && ircd !isin $2 && services !isin $2 && hub !isin $2 && hub !isin $4-) {
set $+(%,links_,$cid,_,$server) $calc($eval($+(%,links_,$cid,_,$server),2) + 1)
.server -a $2 -g $network -d $network $+ : $2
}
}
; end of /links - shows you how many servers were added
raw 365:*: {
if $eval($+(%,links_,$cid,_,$server),2) { _tde -a Servers $eval($+(%,links_,$cid,_,$server),2) new servers added for $network }
unset $+(%,links_,$cid,_,$server)
}
; dont output end of ban if we're joining
raw 367:*: { if $eval($+(%,ibl_,$network,_,$cid,_,$2),2) { halt } }
; dont show bans if updating $ibl()
raw 368:*: {
if $eval($+(%,ibl_,$network,_,$cid,_,$2),2) {
unset $eval($+(%,ibl_,$network,_,$cid,_,$2),1)
halt
}
}
;lag check
on ^*:notice:*:?: {
if ($1 == lagcheck && $nick == $me && $3 isnum) {
_hadd vortex $+(lag_,$cid) $_ticks($3)
if ($cfgstat(lagbar) == on) { _lagbarupdate $remove($_ticks($3),s) }
halt
}
}
; can't join chan, +k - uses stored keys in memory if available =]
raw 475:*: {
if ($eval($+(%,key_,$network,_,$2),2)) { .remini $userdir(settings.ini) keys $+($network,.,$2) }
set -u10 $+(%,key_,$network,_,$2) 1
var %key = $readini($userdir(settings.ini),keys,$+($network,.,$2))
if (%key) {
scid $cid _tde -a Join Attempting to use stored key %key on $2
.join $2 $readini($userdir(settings.ini),keys,$+($network,.,$2))
}
}