| View previous topic :: View next topic |
| Author |
Message |
Minus Voice
Joined: 01 Jul 2006 Posts: 8
|
Posted: Mon Jul 03, 2006 9:19 am Post subject: respond on word - help |
|
|
Hi im looking for a script when a user "Dave" says ex "I need some help with this script" the eggdrop recognize the key word "help" and post it on an admin channel like so $nick $text $chan
"Dave I need some help with this script #tcl"
And anyone with a "$ignore ?#channel? nickname|#authname|hostmask ?-global? ?%duration? ?reason?" script? |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Mon Jul 03, 2006 10:13 am Post subject: |
|
|
| Code: |
set adminchan "#adminchan"
bind pubm - * relay:msg
proc relay:msg {nick host hand chan arg} {
global adminchan
if {[string match -nocase *help* $arg] && $chan != $adminchan && ![isbotnick $nick]} {
puthelp "PRIVMSG $adminchan :$nick!$host reguested help on $chan: $arg"
}
return 0
} |
The output is:
| Code: | | <YourBot> nick!ident@some.host.tld reguested help on #channel: I need some help with this script |
| RedRat wrote: | | And anyone with a "$ignore ?#channel? nickname|#authname|hostmask ?-global? ?%duration? ?reason?" script? |
I cant understand what do you want in the second part |
|
| Back to top |
|
 |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Mon Jul 03, 2006 3:48 pm Post subject: ... |
|
|
He's saying he wants to be able to add an ignore function so it ignores ppl he dont want using it _________________ www.NT-Hosts.Net - More than just a host |
|
| Back to top |
|
 |
IRCNick Halfop
Joined: 12 Oct 2005 Posts: 64 Location: Germany
|
Posted: Mon Jul 03, 2006 7:59 pm Post subject: |
|
|
just add them to the eggdrop ignore list
|
|
| Back to top |
|
 |
Minus Voice
Joined: 01 Jul 2006 Posts: 8
|
Posted: Mon Jul 31, 2006 8:29 am Post subject: |
|
|
Thanks for the script IRCNick works greate i appreciate it!
My new problem is that ppl make amsg(a msg on all channels) and the eggdrop post them all and gets Excess Flood...Is there a way to make a flood filter so its puts them on ignore for 30sec if the person writes more the 2 messages in a minute or something?
Sorry for the late replay .. |
|
| Back to top |
|
 |
Minus Voice
Joined: 01 Jul 2006 Posts: 8
|
Posted: Thu Apr 12, 2007 10:46 pm Post subject: |
|
|
Any way to add a limit on all channels so the adminchannel dosent get spammed?
Like if a person is on 5 of the channels that the bot is and use amsg with "help" in it the bot respond it 5 times in adminchan.
any ideers how to make this work? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Fri Apr 13, 2007 5:47 am Post subject: |
|
|
| Code: | set adminchan "#adminchan"
bind pubm - "% *help*" relay:msg
proc relay:msg {nick uhost hand chan arg} {
global adminchan
if {[string equal -nocase $chan $adminchan] || [throttled $uhost 30]} {return 0}
puthelp "PRIVMSG $adminchan :$nick!$uhost reguested help on $chan: $arg"
}
# user's throttled proc http://forum.egghelp.org/viewtopic.php?t=9009
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
}
} |
Each user@host is allowed 1 help request every 30 seconds. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|