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.

!say command

Old posts that have not been replied to for several years.
Locked
d
datarecall

!say command

Post by datarecall »

bind pubm - !say pubm:!say
proc pubm:!say {nick host handle chan phrase} {
set what [lrange $text 0 end]
putserv "PRIVMSG $nick :$what"
}
can some1 tell me what is wrong with this
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: !say command

Post by egghead »

datarecall wrote:bind pubm - !say pubm:!say
proc pubm:!say {nick host handle chan phrase} {
set what [lrange $text 0 end]
putserv "PRIVMSG $nick :$what"
}
can some1 tell me what is wrong with this
1. you bind to PUBM. For a keyword binding such as !say, bind to PUB instead.
2. The string "phrase" is passed to the proc, but inside the proc you use the variable $text.
3. There is a deadly sin on line 3 :oops: Read up on the first FAQ in the Tcl FAQ forum. http://forum.egghelp.org/viewtopic.php?t=2603
4. If you do not want to do anything else then have the bot echo back, use putserv "PRIVMSG $nick :$phrase.
Locked