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.

respond on word - help

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
M
Minus
Voice
Posts: 8
Joined: Sat Jul 01, 2006 4:42 pm

respond on word - help

Post by Minus »

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?
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

Code: Select all

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: Select all

<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
N
NTHosts
Op
Posts: 100
Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:

...

Post by NTHosts »

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
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

just add them to the eggdrop ignore list

Code: Select all

.+ignore mask
M
Minus
Voice
Posts: 8
Joined: Sat Jul 01, 2006 4:42 pm

Post by Minus »

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 ..
M
Minus
Voice
Posts: 8
Joined: Sat Jul 01, 2006 4:42 pm

Post by Minus »

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?
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

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.
Post Reply