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.

Is there....

Old posts that have not been replied to for several years.
Locked
o
otterboyy

Post by otterboyy »

First, let me say that I'm just trying to learn tcl. I have no programming experience at all so this should be interesting.
Unfortunately, I have a need for a script that when a keyword is said in channel (say *outage*) that the script then takes the rest of the string after *outage* and pvt messages everyone in channel.

is there a script for this?
if not would it be very difficult to write?

I appreciate all the input on this.

Otterboyy
b
blaster^

Post by blaster^ »

try something like :

bind pub - "*keyword*" some_proc
proc some_proc { nick uhost handle channel text } {
set i [lsearch -glob "*keyword*" $text]
putserv "PRIVMSG #channel :[lindex $text [expr $i + 1] end]"
}

if you want restrict to 1 channel, use pubm
see tcl-commands.doc
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

blaster^ - This would require the use of pubm no matter what. Read tcl-commands.doc and it states that the command for pub is not a mask, as is only taken as the first work in the string.
o
otterboyy

Post by otterboyy »

Thanks to both of you, I'll read in the doc and see what happens!

Otterboyy
Locked