bind pub - !Q Q:target
proc Q:target {nick uhost hand chan arg} {
set qchan "[lindex [lindex $arg 0] 0]"
set quser "[lrange [split $arg] 1 end]"
if { ([llength [chanlist $qchan]]<5) && ([isop $quser $qchan]=0) } then {
putserv "PRIVMSG #request :$qchan hat weniger als 5 User oder $quser hast kein Op. Request abgelehnt! "
return 0
}
putserv "PRIVMSG Q :addchan $qchan nt #$quser clan"
putserv "PRIVMSG #request :Adde $qchan mit Owner $quser zur Datenbank"
}
That's what the script should do: Adding the Q Bot to a Channel if a User on #request types '!Q #chan Nick', but only if at least 5 Users are on the Channel and the User has Op on it.
That's what the script actually does: It adds Q, neither depending on wether the Channel has more than 5 Users nor the User is op.