i just did what you asked based on the examples you gave but caesar's way is the better/easier option, also i never had the prob with it not incrementing the kicks in order..
The kicksCounter is a integer value, not a custom channel flag, hence the error. If you wish to have a flag to enable/disable this thing on a specific channel then use this:
setudef int kicksCounted
setudef flag kickCount
bind kick * * kick:count
proc kick:count {nick uhost hand chan target reason} {
if {![isbotnick $nick]} return
if {[channel get $chan kickCount]} {
set count [incr [channel get $chan kicksCounted]]
channel set $chan kicksCounted $count
}
}
(notice the change in names of the variables), then in your script add something like:
set count [channel get $chan kicksCounted]
putserv "KICK $chan $who $reason - kick#: $count"
By default kickCounter will be disabled, so it will not count and store in kicksCounted the kicks in any channels, meaning kickCounter will be 0. To enable it on a specific channel just .chanset #channel +kickCounter
Once the game is over, the king and the pawn go back in the same box.
setudef int kicksCounted
setudef flag kickCount
bind kick * * kick:count
proc kick:count {nick uhost hand chan target reason} {
if {![isbotnick $nick]} return
if {[channel get $chan kickCount]} {
set count [incr [channel get $chan kicksCounted]]
channel set $chan kicksCounted $count
}
}
set count [channel get $chan kicksCounted]
putserv "KICK $chan $who $reason - kick#: $count"
.chanset #he +kickCount does work - sorry, was my bad
.chanset #he kickCount 0 - also working
but: when i kick, the $count only rises once; since im not interested in counting kicks it doesnt matter, but im afraid ill have the same issue with line counting. Thanks for helping !