; IRC Stats 1.0 ; Written by HyperDev ; http://www.tshastry.com/hyperdev ; irc.enterthegame.com, #cybiko on *:TEXT:!ircstats*:#:{ if (!$2) { %nm = $nick } else { %nm = $2 } %line = $read(ircstats_actions.txt, s, %nm) if (%line != $null) { %actions = $remove(%line,%nm) } else { %actions = 0 } %line = $read(ircstats_text.txt, s, %nm) if (%line != $null) { %text = $remove(%line,%nm) } else { %text = 0 } %line = $read(ircstats_bans.txt, s, %nm) if (%line != $null) { %bans = $remove(%line,%nm) } else { %bans = 0 } %line = $read(ircstats_unbans.txt, s, %nm) if (%line != $null) { %unbans = $remove(%line,%nm) } else { %unbans = 0 } %line = $read(ircstats_kicks.txt, s, %nm) if (%line != $null) { %kicks = $remove(%line,%nm) } else { %kicks = 0 } /msg $chan 7IRC Stats: Stats for4 %nm ... Lines of Text:12 %text ... Actions:12 %actions ... Bans:12 %bans ... Unbans:12 %unbans ... Kicks:12 %kicks } on *:ACTION:*:#:{ %line = $read(ircstats_actions.txt, s, $nick) if (%line != $null) { %current = $remove(%line,$nick) } else { %current = 0 } %new = $calc(%current + 1) /write -ds $+ $nick ircstats_actions.txt /write ircstats_actions.txt $nick %new } on *:TEXT:*:#:{ %line = $read(ircstats_text.txt, s, $nick) if (%line != $null) { %current = $remove(%line,$nick) } else { %current = 0 } %new = $calc(%current + 1) /write -ds $+ $nick ircstats_text.txt /write ircstats_text.txt $nick %new } on *:BAN:#:{ %line = $read(ircstats_bans.txt, s, $nick) if (%line != $null) { %current = $remove(%line,$nick) } else { %current = 0 } %new = $calc(%current + 1) /write -ds $+ $nick ircstats_bans.txt /write ircstats_bans.txt $nick %new } on *:UNBAN:#:{ %line = $read(ircstats_unbans.txt, s, $nick) if (%line != $null) { %current = $remove(%line,$nick) } else { %current = 0 } %new = $calc(%current + 1) /write -ds $+ $nick ircstats_unbans.txt /write ircstats_unbans.txt $nick %new } on *:KICK:#:{ %line = $read(ircstats_kicks.txt, s, $nick) if (%line != $null) { %current = $remove(%line,$nick) } else { %current = 0 } %new = $calc(%current + 1) /write -ds $+ $nick ircstats_kicks.txt /write ircstats_kicks.txt $nick %new }