egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[SOLVED] Kick Counter
Goto page Previous  1, 2
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
doggo
Halfop


Joined: 05 Jan 2010
Posts: 97

PostPosted: Sat Jul 21, 2012 5:31 pm    Post subject: Reply with quote

/me likes caesar's way Very Happy

i just did what you asked based on the examples you gave Smile 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
View user's profile Send private message Visit poster's website
gasak
Halfop


Joined: 09 Aug 2010
Posts: 45

PostPosted: Sat Sep 29, 2012 10:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Sun Sep 30, 2012 3:06 pm    Post subject: Reply with quote

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
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
gasak
Halfop


Joined: 09 Aug 2010
Posts: 45

PostPosted: Mon Oct 01, 2012 12:33 am    Post subject: Reply with quote

Hi caesar,

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

Thanks.
_________________
Learning Knows No Boundaries!!
Back to top
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Fri Mar 13, 2015 12:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Fri Mar 13, 2015 1:38 pm    Post subject: Reply with quote

Alright, for the debugging sake, could you please copy/paste the code you are using right now that you have problems with?
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
Elfriede
Halfop


Joined: 07 Aug 2007
Posts: 67

PostPosted: Fri Mar 13, 2015 1:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Mon Apr 24, 2017 10:16 am    Post subject: Reply with quote

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

Not Working for me.
Back to top
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Mon Apr 24, 2017 12:00 pm    Post subject: Reply with quote

That's because it's called kickCount so .chanset #Hottub +kickCount
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
Fahad
Halfop


Joined: 29 Aug 2016
Posts: 99

PostPosted: Mon Apr 24, 2017 1:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
caesar
Ass Kicker


Joined: 14 Oct 2001
Posts: 3403
Location: Area 51

PostPosted: Tue Apr 25, 2017 12:33 am    Post subject: Reply with quote

It's a kick counter, so yeah, it counts how many members have been kicked by any channel operator (including the bot).
_________________
You may say anything about me, but don't misspell my name.
Back to top
View user's profile Send private message
Martial06
Voice


Joined: 29 Jun 2017
Posts: 1

PostPosted: Thu Jun 29, 2017 8:50 am    Post subject: Reply with quote

Good, thank you for ypur response
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber