I just finished yesterday v1.0 just a simple one that when you type :
!request BOTNAME #channel
the requestbot says to the chan BOTNAME join #channel
So i used Stormbot for that part.
but know i want to make the TCL a bit more difficult by making a checking voor the requested channel. Like when I type : !request BOTNAME #channel
Will my requesbot join that channel and need to check if the person who requested is on the channel and has op. So for that part I made
Code: Select all
if {$bot != ""} {
if {$chan1 != ""} {
putserv "NOTICE $nick : Je hebt aanvraag is ontvangen. De bot zal komen zodra uw kanaal is gecontroleerd door mij."
channel add $chan1
if {[onchan $nick $chan1] & [isop $nick $chan1]} {
putserv "PRIVMSG $chan :Ja $nick is $chan1 en hij is geopped"
} else {
if {[onchan $nick $chan1] & ![isop $nick $chan1]} {
putserv "PRIVMSG $chan :Jammer $nick is wel op $chan1 maar hij heeft geen +o"
} else {
putserv "PRIVMSG $chan :Jammer $nick is niet op $chan1"
}
}
utimer 20 "channel remove $chan1"
return 0
}
}
maybe some1 can help me fix this little/big bug ?