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 

need to add a flood protection in public channel commands

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
noobman
Voice


Joined: 23 Nov 2007
Posts: 29

PostPosted: Thu Feb 14, 2008 8:46 am    Post subject: need to add a flood protection in public channel commands Reply with quote

hi, i'd like to know whats the code i must add so that the clones and proxys dont flood my bot.

For example to add the flood protect to this command:


Code:
bind pub - ?errorsteam errorsteam

proc errorsteam { nick host hand chan arg } {
putserv "PRIVMSG $chan : $nick : To fix this problem, you must reboot the steam and try to join again the game, this problem is when you get ticketID error. more info pm @.
}


i want that they cant flood by joining 6 or 7 clones and typing ?errorsteam.

thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Feb 14, 2008 8:13 pm    Post subject: Reply with quote

Search the forum using keyword throttled.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
noobman
Voice


Joined: 23 Nov 2007
Posts: 29

PostPosted: Sat Feb 16, 2008 6:35 am    Post subject: stild dont find what i need Reply with quote

I must be a noob becuse i look for it as you told me. And i don't find it. Could you link me to the antiflood script for public commands so that i can add it to my help script ? Thanks a lot.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 16, 2008 6:58 am    Post subject: Reply with quote

Code:
bind pub - ?errorsteam errorsteam

proc errorsteam { nick host hand chan arg } {
 if {![throttled $host,$chan 30]} {
  putserv "PRIVMSG $chan : $nick : To fix this problem, you must reboot the steam and try to join again the game, this problem is when you get ticketID error. more info pm @."
 }
}


# user's throttled proc
proc throttled {id time} {
 global throttled
 if {[info exists throttled($id)]} {
  return 1
 } {
  set throttled($id) [clock sec]
  utimer $time [list unset throttled($id)]
  return 0
 }
}

This allows using the ?errorsteam command only once every 30 seconds.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
noobman
Voice


Joined: 23 Nov 2007
Posts: 29

PostPosted: Sat Feb 16, 2008 7:13 am    Post subject: real thanks Reply with quote

thanks a lot mate. good work, sorry for disturbing Smile. i will test it.
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
Page 1 of 1

 
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