Help with flood protection - Can't kick or ban - 23/06/11 05:11 PM
I've got my bot in a channel, but of course people want to flood my bot with commands until the admins kick my bot because the others won't stop.
So basically what I want is flood protection, but because I'm not an admin I can't kick or ban the spammers.
My idea was to just ignore the people so my bot doesn't react to them. (however if you have a better idea let me know).
I've looked all over for scripts like this, but I can't find one like this. I also would like to create my own instead.
I was thinking to do an on TEXT event, then establish variables for the $nick and a variable named after the nick which would count his posts per second. A 1 second timer would be created, and after it ends it would delete both variables.
So my biggest problem is how to name a variable after $Nick.
It would be %$Nick, which I know wont work.
I looked into using brackets [ ], but for the life of me I cannot make it work. The guides I've been using are lacking some sort of explanation, or it's been going right over my head lol.
I was going to provide with some code I've already written, but it's so incomplete and incorrect, it really wouldn't do you any good.
So if the variable $nick (lets pretend $nick = nommer) counts to 3 in under 1 second, it will issue a command to ignore nommer.
The reason I wanted to make each variable named after the $nick was so that I could control who it counts for. I didn't want it counting for 3 different people who all posted within the same second. I believe you'd need to make sure it checks who said what, because the script doesn't instantiate a new variable each time the event is triggered, right?
So any help would be appreciated. Whether you just explain what I'd have to do, give me an actual script that does it (please explain steps so I can learn from it), or just explain a few things for me.
So basically what I want is flood protection, but because I'm not an admin I can't kick or ban the spammers.
My idea was to just ignore the people so my bot doesn't react to them. (however if you have a better idea let me know).
I've looked all over for scripts like this, but I can't find one like this. I also would like to create my own instead.
I was thinking to do an on TEXT event, then establish variables for the $nick and a variable named after the nick which would count his posts per second. A 1 second timer would be created, and after it ends it would delete both variables.
So my biggest problem is how to name a variable after $Nick.
It would be %$Nick, which I know wont work.
I looked into using brackets [ ], but for the life of me I cannot make it work. The guides I've been using are lacking some sort of explanation, or it's been going right over my head lol.
I was going to provide with some code I've already written, but it's so incomplete and incorrect, it really wouldn't do you any good.
So if the variable $nick (lets pretend $nick = nommer) counts to 3 in under 1 second, it will issue a command to ignore nommer.
The reason I wanted to make each variable named after the $nick was so that I could control who it counts for. I didn't want it counting for 3 different people who all posted within the same second. I believe you'd need to make sure it checks who said what, because the script doesn't instantiate a new variable each time the event is triggered, right?
So any help would be appreciated. Whether you just explain what I'd have to do, give me an actual script that does it (please explain steps so I can learn from it), or just explain a few things for me.