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.

Kick Counter

Old posts that have not been replied to for several years.
Locked
t
tradergt

Kick Counter

Post by tradergt »

Is is possible to create a kick counter?? Is there an even thats run for kicks, BEFORE the kick happens?? is it even possible?

Thanks
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Well, you cannot precede just any kick, no. But most of the kicks on eggdrop (not counting those done by extern TCL scripts) are triggered by flood. If you read doc/tcl-commands.doc and search for "bind flud" you'll find that it is triggered *before* the usual eggdrop's processing routine. So, there you may put whatever procedure you want. Note that you can return from with with 0 or 1 to achive different post behaviour.

As for kick counter, there is "bind kick" which would trigger on any kick that occured.

STOP THE PRESS
Breaking News: Eggdrop is GPL so any code or docs with it are free to be used. Please do some reading.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
t
tradergt

Post by tradergt »

bind kick didn't seem like it would work..


I use xtreme for my mirc script. when you kick, it puts the kick msg then ban counter in the kick msg.. thats what I want to do, put a ban counter write into the kick msg on ever kick I do...
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Custom script for mIRC does custom kicks with counter within reason part. Custom script for eggdrop will do the same, only you need to make it or find it. In case you decide to make it, keep in mind that bind kick *would* work. Infact, that would be the easiest way to track your own kicks.
bind flud would on the other hand be the easiest way to stop eggdrop doing it's job but instead passing control over the current punishemnt method, message, blah, whatever - to you. Only potential problems are non sticky bans that are not on channel but in bots userlist and will become active once user rejoins. But even that part should be possible to work around by using var names in ban reasons. Tho, i am not 100% sure if eggdrop will for some wierd reason prevent you from doing that (it shouldnt).
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Hi. Use the bind kick and increase a variable (like $count) using incr count then do what you want to do with the $count varialbe. :)
t
tradergt

Post by tradergt »

I got that part. I would also have to save it to a file for when the bot goes down. I am gonna write a script to test some theories I and darko have. Just from the documentation saying that kick bind works after a kick happends. Plus, in the event, I will be changing the kick msg as well, and I don't see how thats gonna happen from what I see...

but I could be wrong..

thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

There is no way to detect when a kick is about to happen, either from antoher client or from eggdrop.

Until the kick happens, any client (eggdrop is a automated client), does not it has or will happen. On top of this, thbere is no way to tell the IRC server to change the message. You would need some form of IRCD service for this (which eggdrop is not).

Af for knowing is eggdrop is about to make a kick, you caqn replace the puthelp, putserv, putquick, putkick commands, using tcl, and detect if a script is about to make one.
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

tradergt, just to make my self even more clear: bind kick will help you know what will be the value of the counter for your *next* kick. First kick you allready know will be = 1 :) So:

set kickcnt 1
bind kick.. {incr kickcnt}
bid flud.. {check what flood type and putkick with "Kicked for some-type-of-flood, kick No. $kickcnt}

You may wonder why bind kick to increase kickcnt when you can simply increase it right after your putkick. Well, someone else could have allready kicked the user that very momment, and eggdrop will still increase kickcnt even tho it wasn't your bot tht made a kick.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

err, bind kick should actually check if it was your bot that executed a kick and only then incr kickcnt
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
Locked