| View previous topic :: View next topic |
| Author |
Message |
doggo Halfop
Joined: 05 Jan 2010 Posts: 97
|
Posted: Sat Jul 21, 2012 5:31 pm Post subject: |
|
|
/me likes caesar's way
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.. _________________ NON geeky!! http://gotcode4u.com/ |
|
| Back to top |
|
 |
gasak Halfop
Joined: 09 Aug 2010 Posts: 45
|
Posted: Sat Sep 29, 2012 10:06 pm Post subject: |
|
|
Hi caesar,
Just test your script but got some problem when setting the channel. When I try to set .chanset #gasak +kicksCounter got a reply:
| Code: | | Error trying to set +kicksCounter for #gasak, invalid mode. |
Please advise. Thanks. _________________ Learning Knows No Boundaries!! |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sun Sep 30, 2012 3:06 pm Post subject: |
|
|
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:
| Code: |
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:
| Code: |
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. |
|
| Back to top |
|
 |
gasak Halfop
Joined: 09 Aug 2010 Posts: 45
|
Posted: Mon Oct 01, 2012 12:33 am Post subject: |
|
|
Hi caesar,
I just follow your code above. Meaning that this code didn't work?
Thanks. _________________ Learning Knows No Boundaries!! |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Fri Mar 13, 2015 12:36 pm Post subject: |
|
|
Im sorry to say, but the code isnt working. Still getting invalid mode.
I know this is an older post, but would be awesome if somone could fix that.
Thats quite a thing im trying to implent.
.chanset #channel +messagecount
Then:
Count the lines from one specific user (instead of kick counting) and reset the stats once a day at 00:00. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri Mar 13, 2015 1:38 pm Post subject: |
|
|
Alright, for the debugging sake, could you please copy/paste the code you are using right now that you have problems with? _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Fri Mar 13, 2015 1:51 pm Post subject: |
|
|
Acutally im using this one:
| Code: |
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
}
} |
and in my proc:
| Code: |
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 ! |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Mon Apr 24, 2017 10:16 am Post subject: |
|
|
<Fahad> .chanset #Hottub +kickCounter
<Deadite> Error trying to set +kickCounter for #Hottub, invalid mode.
Not Working for me. |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Apr 24, 2017 12:00 pm Post subject: |
|
|
That's because it's called kickCount so .chanset #Hottub +kickCount _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Fahad Op

Joined: 29 Aug 2016 Posts: 127
|
Posted: Mon Apr 24, 2017 1:21 pm Post subject: |
|
|
| caesar wrote: | | That's because it's called kickCount so .chanset #Hottub +kickCount |
OK It's work. Thanks... Tell me this tcl only count how many kicks users got in channel? |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Tue Apr 25, 2017 12:33 am Post subject: |
|
|
It's a kick counter, so yeah, it counts how many members have been kicked by any channel operator (including the bot). _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
Martial06 Voice
Joined: 29 Jun 2017 Posts: 1
|
Posted: Thu Jun 29, 2017 8:50 am Post subject: |
|
|
| Good, thank you for ypur response |
|
| Back to top |
|
 |
|