on ^*:JOIN:#:{
themejoin
}
alias themejoin {
echo $chan %tstmp $+ $chr(3) $+ $color(join text) $nick ( $+ $address $+ ) has joined $chan | haltdef
}
on ^*:PART:#:{
set %partmsg $1-
themepart
}
alias themepart {
if (%partmsg == $null) { set %partmsg $nick }
echo $chan %tstmp $+ $chr(3) $+ $color(part text) $nick ( $+ $address $+ ) has left $chan ( $+ %partmsg $+ ) | unset %partmsg | haltdef
}
on ^*:QUIT:{
if ($nick == $me) { goto end }
settime
set %quitmessage $1-
if Ping timeout isin %quitmessage { set %quitmessage Ping timeout }
if Connection reset by peer isin %quitmessage { set %quitmessage Connection reset by peer }
set %quitchan $chan
%quit.1 = 1
if (quit: isin %quitmessage) set %quitmessage $+ $remove(%quitmessage,quit:,...)
:quits
if ($nick ison $chan(%quit.1)) {
set %quit.echo $chan(%quit.1)
themequit
inc %quit.1
goto quits
}
elseif ($chan(%quit.1) != $null) { inc %quit.1
goto quits }
halt
else { goto naiquit }
:naiquit
halt
:end
}
alias themequit {
if %quitmessage == $null { set %quitmessage no reason }
echo $chan(%quit.1) %tstmp $+ $chr(3) $+ $color(quit text) $nick ( $+ $address $+ ) Quit ( $+ %quitmessage $+ $chr(015) $+ $chr(3) $+ $color(quit text) $+ ) | haltdef
}