# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server
bind raw - "432" evnt:nick_invalid
proc evnt:init_server {type} {
global nick
putserv "OPER nick operpass"
putserv "NICK $nick"
putserv "NS ID nickpass"
putserv "MODE $nick +BiHqx-sw"
}
proc evnt:nick_invalid {from keyword text} {
global altnick
putserv "NICK $altnick"
}
# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server
bind raw - "432" evnt:nick_invalid
proc evnt:init_server {type} {
global nick botnick
putserv "OPER nick operpass"
putserv "NICK $nick"
putserv "NS ID nickpass"
putserv "MODE $botnick +BiHqx-sw" # this doesnt works
}
proc evnt:nick_invalid {from keyword text} {
global altnick
putserv "NICK $altnick"
}
@darkwood:
The latter probably does not work since you've just issued a NICK-command, and the "botnick" variable hasn't been updated yet. Keep in mind that eggdrop isn't multi-threaded, and the "botnick" variable is updated by another binding (catching the response-code of the NICK-command).
@Trixar_za:
Providing multiple variable names to a single global command is just as valid as calling the global command multiple times. Maybe you were thinking of the "variable" command?
@nml375 : Actually, I was thinking of a totally different different language because I was playing with a couple of non-standard ones yesterday.
That's the only thing I could see that might be wrong. The only possible explanation then is that botnick hasn't been set yet, which is probably caused by the NICK event. I don't really see the point of doing this at connect. Why change the bot's nick to itself on connect? Why not just remove the NICK $nick part all together?