rendered paste bodyAlias Socklog {
Sockopen Log irc.kingskrown.com 7000
}
On *:Sockopen:Log:{
Sockwrite -nt $Sockname User Log x x :network logging services
Sockwrite -nt $Sockname Nick Log
}
On *:Sockread:Log:{
Sockread %Sockread
Tokenize 32 %Sockread
If ($1 == Ping) {
Sockwrite -nt $Sockname Pong $+(:,$Remove($2,:))
}
If ($2 == Notice) {
If ($8 == connecting) {
Sockwrite -nt $Sockname Privmsg #admin $7-8 $12
Sockwrite -nt $Sockname Privmsg $12 :Version
}
Elseif ($Left($8,-1) == exiting) {
Sockwrite -nt $Sockname Privmsg #admin $7-8 $9
}
Elseif ($10-12 == changed his/her nickname) {
Sockwrite -nt $Sockname Privmsg #admin $7 is now known as $14
}
Elseif ($Gettok($4,2,1) == Version) {
Sockwrite -nt $Sockname Privmsg #admin Version-Reply: $Right($Gettok($1,1,33),-1) - $5-
}
}
Elseif ($2 == Privmsg) {
Elseif ($Gettok($4,2,1) == Ping) {
Sockwrite -nt $Sockname Notice $Remove($Gettok($1,1,33),:) $4 $5
}
Elseif ($Gettok($4,2,1) == Time) {
Sockwrite -nt $Sockname Notice $Remove($Gettok($1,1,33),:) $Left($4,-1) $Asctime($Ctime)
}
Elseif ($Gettok($4,2,1) == Version) {
Sockwrite -nt $Sockname Notice $Remove($Gettok($1,1,33),:) $Left($4,-1) network logging services
}
}
Elseif ($2 == 204) {
echo -a OPER: Nick: $6 Host: $Right($Left($7,-1),-1)
}
Elseif ($2 == 205) {
echo -a USER: Nick: $6 Host: $Right($Left($7,-1),-1)
}
Elseif ($2 == 001) {
Sockwrite -nt $Sockname Join #admin
}
Unset %Sockread
}
On *:Sockclose:Log:{
Sockclose $Sockname
Socklog
}