on *:TEXT:!stats*:#lordsoflaughter,#Yami,#solarcombat:{ 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 } /notice $nick 8,1IRC Stats: Stats for %nm ... Lines of Text: %text ... Actions: %actions ... Bans: %bans ... Unbans: %unbans ... Kicks: %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