on ^*:TEXT:*:#: sep $1- | halt
on ^*:NOTICE:*:?: sep $1- | halt
on ^*:JOIN:#: sep $1- | halt
on ^*:PART:#: sep $1- | halt
on ^*:QUIT: sep $1- | halt
alias -l sep {
if ($event == text) var %sep 1
if ($event == notice) var %sep 2
if ($istok(join part quit,$event,32)) var %sep 3
if ($event == quit) var %sep 4
;-------------------------
if (%sep == 1 && $hget(sep,act) isnum 2-4) { echo $chan $chr(160) | .hadd -m sep act %sep }
if (%sep == 2 && $hget(sep,act) == 1) { echo $active $chr(160) | .hadd -m sep act %sep }
if (%sep == 3 && $hget(sep,act) == 1) { echo $chan $chr(160) | .hadd -m sep act %sep }
;-------------------------
if ($event == text) echo -tc $event $chan $nick $1-
if ($event == notice) echo -tc $event $active - $+ $nick $+ - $1-
if ($istok(join part,$event,32)) echo -tc $event $chan * $nick ( $+ $address $+ ) $event $chan
if ($event == quit) {
var %i $comchan($nick,0) | while (%i) {
if (%sep == 4 && $hget(sep,act) == 1) { echo $comchan($nick,%i) $chr(160) }
echo -tc $event $comchan($nick,%i) * $nick ( $+ $address $+ ) Quit $iif($1,$+($chr(40),$1-,$chr(41))) | dec %i
} | .hadd -m sep act %sep
}
}