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.
Old posts that have not been replied to for several years.
d
daplaya
Post
by daplaya » Mon Jan 21, 2002 2:52 pm
This is my first script and I can't find why it doesn't work
Code: Select all
bind pubm - !kick pub_kick
proc pub_kick {nick host handle chan args} {
set whom [lindex $args 0]
if {[onchan $whom $chan]} {
puthelp "PRIVMSG $chan : watches as $nick kicks $whom to the balls with a large wooden hammer"
} else {
puthelp "PRIVMSG $chan :I don't see $whom around"
}
}
Wcc
Master
Posts: 278 Joined: Sun Oct 28, 2001 8:00 pm
Location: USA
Contact:
Post
by Wcc » Mon Jan 21, 2002 3:46 pm
Use the 'pub' bind type instead of 'pubm'.
g
gpdza
Post
by gpdza » Mon Jan 21, 2002 4:42 pm
Also, unless you're aware of the special meaning of 'args' as a variable name, use something else, like 'text'.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Jan 22, 2002 1:35 pm
Replace from:
bind pubm - !kick pub_kick
to:
bind pub - !kick pub_kick
Use "arg" for your arguments.
<font size=-1>[ This Message was edited by: caesar on 2002-01-22 10:36 ]</font>
d
daplaya
Post
by daplaya » Tue Jan 22, 2002 1:48 pm
OK thnx, weird though...in the tutorial I read it told me to use pubm instead of pub.
And what's with that args? Can't I name it whatever I want? Or is there some reason why I shouldn't name it args? Changed it to text just in case..
Petersen
Owner
Posts: 685 Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK
Post
by Petersen » Tue Jan 22, 2002 5:38 pm
read the second paragraph of manual page proc(n)