This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

[SOLVED] Kick Counter

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
d
doggo
Halfop
Posts: 97
Joined: Tue Jan 05, 2010 7:53 am
Contact:

Post by doggo »

/me likes caesar's way :D

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..
g
gasak
Halfop
Posts: 45
Joined: Mon Aug 09, 2010 11:09 pm

Post by gasak »

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: Select all

Error trying to set +kicksCounter for #gasak, invalid mode.
Please advise. Thanks.
Learning Knows No Boundaries!!
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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: Select all

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: Select all

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.
g
gasak
Halfop
Posts: 45
Joined: Mon Aug 09, 2010 11:09 pm

Post by gasak »

Hi caesar,

I just follow your code above. Meaning that this code didn't work?

Thanks.
Learning Knows No Boundaries!!
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

Post by Elfriede »

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.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
E
Elfriede
Halfop
Posts: 67
Joined: Tue Aug 07, 2007 4:21 am

Post by Elfriede »

Acutally im using this one:

Code: Select all

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: Select all

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 !
User avatar
Fahad
Op
Posts: 127
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

<Fahad> .chanset #Hottub +kickCounter
<Deadite> Error trying to set +kickCounter for #Hottub, invalid mode.

Not Working for me.
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
User avatar
Fahad
Op
Posts: 127
Joined: Mon Aug 29, 2016 9:40 am

Post by Fahad »

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?
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
M
Martial06
Voice
Posts: 1
Joined: Thu Jun 29, 2017 8:46 am

Post by Martial06 »

Good, thank you for ypur response
Post Reply