i need some help about the pub command !stats & log in a #chan
plz help me to solve the problem that my egg will responce on those triggers
### start script
bind pub - !logs logs_msg
proc logs_msg { nick uhost hand chan args } {
putserv "NOTICE $nick :Channel Logs can be read http://myurl.com/~leader/logs/$chan"
return 0
}
bind pub - !stats stats_msg
proc stats_msg {nick uhost hand chan args } {
putserv "NOTICE $nick :Channel can be found on
http://myurl.com:8033l/$chan"
return 0
First off, it would be prefferable if you put your tcl-code inside a code-block.
Secondly, it would be helpful if you could provide some information on the actual malfunction of your script; ie. error-message, unexpected response, or such.
A few obvious issues however:
Don't use "args" as a variable in a proc declaration unless you are fully aware of it's special characteristics. It does not behave as any other variable. Speciffically, it can accept an arbitrary number of arguments while any other variable-name may only take one.
You cannont have newlines in strings you send to the irc-server.
In this case, you would most likely be better off using "puthelp" rather than "putserv". Only use "putserv" for important things such as kicking/banning, opping, registering with Nickserv (if available)