Well, it doesn't work as it supposed to.
When I type /msg botnick join #channel it doesn't respond at all.
But if I use a channel where it is allready in, it gives me response that he is allready in that channel.
So, if the bot is in the channel, it responds with: I am allready in #channel.
But if he is not, he doesn't give me response and doesn't join the channel.
Exactly the same problem with the parting area. It parts the channel if he is on that channel. But if he is NOT on the channel, it doesn't give me a response. After the else, it is going wrong. I guess he doesn't like the } else { part
For better understanding, here is the whole script:
Code: Select all
bind msg - join msg:join
bind msg m part msg:part
proc msg:join {nick host hand text} {
set chan [lindex [split $text] 0]
if {[botonchan $chan]} {
putquick "NOTICE $nick :I am allready on \002$chan\002"
} else {
putquick "NOTICE $nick :You invited me to join \002$chan\002. Joining..."
channel add $chan
}
}
proc msg:part {nick host hand text} {
set chan [lindex [split $text] 0]
if {[botonchan $chan]} {
putquick "PRIVMSG $chan :Leaving channel... (Removed by T-Xorcist)"
channel remove $chan
} else {
putquick "NOTICE $nick :I am not on \002$chan\002"
}
}