I have a small problem with the fallowing invite Script:
Code: Select all
bind raw - INVITE join:invite
proc join:invite {nickname key arg} {
set channame [lindex [split $arg :] 1]
if {[validchan $channame] || $channame == "#somechan" || $channame == "#other-chan"} {
putlog "\[\002Join Request\002\] fehlgeschlagen! Channel \002$channame\002 bereits vorhanden. Anforderung von \002$nickname\002."
} else {
channel add $channame
set klnick [split $nickname "!"] ;# hostmask beim ! splitten
set nick [lindex $klnick 0] ;# davon das erste element -> nur der nick
utimer 20 [list checkchannel $nick $channame] ;# 20 sekunden warten bis der bot den channel komplett 'eingelesen' hat
;# wird nicht lange genug gewartet gibt in checkchannel die isop funktion false zurück weil noch keine daten vorhanden
}
}
proc checkchannel {nickname channame} {
if {![isop $nickname $channame]} {
putserv "PRIVMSG $channame :Anforderung fehlgeschlagen. \002$nickname\002 ist kein Operator."
putserv "NOTICE $nickname :Anforderung fehlgeschlagen. Du bist kein Operator in \002$channame\002."
channel remove $channame
putlog "\[\002Join Request\002\] fehlgeschlagen! \002$nickname\002 ist kein Operator in \002$channame\002."
} else {
putserv "PRIVMSG $channame :Anforderung erfolgreich."
putlog "\[\002Join Request\002\] erfolgreich von \002$nickname\002 für \002$channame\002."
}
}
someone invites the bot into his channel (in my network also non-ops can invite somebody)
the bot adds the channel, and joins
after 20 seconds the function checkchannel is called.
checkchannel checks wether the user who invited the bot is channel operator or not.
Heres the Problem.
The bot always stays inside the channel and prints out "Anforderung erfolgreich"
There is also a !part function, which also checks the op status via isop.
This Function can also be called from everyone on the channel. The bot dont cares about the op status.
After the join everyone is recorgnized as operator unless he parts and rejoins the channel.
I tried to let the bot part and check afterwards but nothings changed.
I also tried the resetchan function to re-read the channel ops, but this also changed nothing.
I cant explain why everyone is recorgnized as channel operator... if i manually let the bot part the channel by .dump part #channel the problem seems to go away.
but thats not a solution

Hope anyone can help me... i tried to search the forum for related topics... there is a similar script but it doesnt check for chanops.
Greetings,
diskman