Public feed #727337

Someone

public text v1 · immutable
Raw Edit
·published 2007-10-05 22:44 UTC
rendered paste body
proc pReadFile {} {

set id [open "kcount.txt" r]
 gets $id $kickcount
 close $id
 return $kickcount
}


proc pWriteFile {kickcount} { 
set id [open "kcount.txt" "w"] 
puts $id kickcount 
close $id
 } 

bind KICK - * pKickCounter

 proc pKickCounter {nick uhost hand chan target reason} {
 global kickcount
 set kickcount [pReadFile]
 incr kickcount 



 global kickcount 0
 }
#set kickcount 0 
proc countkicks {} { 
incr ::kickcount 
putserv "PRIVMSG $chan : 4,1 Kick:15 • \[#$kickcount\] • 15"
 pWriteFile $kickcount
 }