'k, let me point you in the right direction then:
doc/tcl-commands.doc wrote: (4) PUB
bind pub <flags> <command> <proc>
procname <nick> <user@host> <handle> <channel> <text>
Description: used for commands given on a channel. The first word
becomes the command and everything else is the text argument.
Module: irc
This means, that when the binding triggers, <proc> will be called with 5 parameters (being
nick user@host handle channel and
text). Your proc must be able to accept these parameters as arguments...
In your case, your proc has only 1 argument, which you've called topic. Obviously, that's 4 arguments short of what bind expects, and more important, it's not the order bind expects..
Hence, bind calls the proc with the wrong number and order of arguments, and you get the error posted.
Solution?
Adjust your proc to accept the proper amount of parameters:
Code: Select all
proc yourproc {nickname host handle channel text} {
Then adjust your proc to make use of these arguments appropriately.