What i want is, if a user with certain flags (in this case with flags +qd or |+qd $channel) joins the room, the bot should alert all channel operators (and maybe even halfops) that the user who entered is blacklisted and my not gain OPs or Voice.
The code I have here is:
Code: Select all
bind join - * proc_blacklist
proc proc_blacklist {nick host handle channel} {
if {[matchattr $nick +qd]} {
foreach u [chanlist $channel] {
if {[isop $u $channel]} {
putserv "NOTICE $u :Warning. $nick is on my Global Blacklist and may \002NOT\002 gain OPs or VOICE on any channel that I am on!"
return 1
}
}
}
if {[matchattr $nick |+qd $channel]} {
foreach u [chanlist $channel] {
if {[isop $u $channel]} {
putserv "NOTICE $u :Warning. $nick is on my Blacklist and may \002NOT\002 gain OPs or VOICE on channel $channel!"
return 1
}
}
} else {
return 1
}
}
Any hints would be appreciated.
Cheers
