egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Procedures Help ((SOLVED))

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Tue Aug 07, 2007 12:36 am    Post subject: Procedures Help ((SOLVED)) Reply with quote

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
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Aug 07, 2007 7:28 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Branden
Halfop


Joined: 04 Aug 2007
Posts: 61

PostPosted: Tue Aug 07, 2007 12:23 pm    Post subject: Reply with quote

The script still don't work. Sad
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Aug 07, 2007 12:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber