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.

Procedures Help ((SOLVED))

Help for those learning Tcl or writing their own scripts.
Post Reply
B
Branden
Halfop
Posts: 61
Joined: Sat Aug 04, 2007 8:36 pm

Procedures Help ((SOLVED))

Post by Branden »

Can someone please tell whats wrong with this?

Code: Select all

set hate "I hate Scrappy"

bind pub - $hate hate

proc hate {nick} {
putserv "kill $nick DO NOT HATE ME!"
}
Last edited by Branden on Tue Aug 07, 2007 7:12 pm, edited 1 time in total.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use pubm instead of pub (read Tcl-commands.doc about the difference between each).
B
Branden
Halfop
Posts: 61
Joined: Sat Aug 04, 2007 8:36 pm

Post by Branden »

The script still don't work. :(
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Mask used in pubm-bindinds match against "<channel> <text>", which would require the binding to be something like this:

Code: Select all

bind pubm - "#yourchannel I hate Scrappy" hate
For a speciffic channel. To trigger on any channel, use this instead:

Code: Select all

bind pubm - "% I hate Scrappy" hate
Also, your kick-message is incorrect, as rfc1459 requires any parameter containing spaces to be the last one, and prefixed with a :

Code: Select all

putserv "KILL $nick :Do not hate me!"
Finally, reading the description for pubm-bindings reveal that the proc is called with the following arguments:
<nick> <user@host> <handle> <channel> <text>, which means you'll have to adopt the argument-list to match that in your proc:

Code: Select all

proc hate {nick host hand chan text} {....
NML_375
Post Reply