| View previous topic :: View next topic |
| Author |
Message |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Tue Aug 07, 2007 12:36 am Post subject: Procedures Help ((SOLVED)) |
|
|
Can someone please tell whats wrong with this?
| Code: | 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 |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Aug 07, 2007 7:28 am Post subject: |
|
|
Use pubm instead of pub (read Tcl-commands.doc about the difference between each). _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Branden Halfop
Joined: 04 Aug 2007 Posts: 61
|
Posted: Tue Aug 07, 2007 12:23 pm Post subject: |
|
|
The script still don't work.  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Tue Aug 07, 2007 12:49 pm Post subject: |
|
|
Mask used in pubm-bindinds match against "<channel> <text>", which would require the binding to be something like this:
| Code: | | bind pubm - "#yourchannel I hate Scrappy" hate | For a speciffic channel. To trigger on any channel, use this instead:
| Code: | | 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: | | 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: | | proc hate {nick host hand chan text} {.... |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|