Msg q whois FBAlienSir_Fz wrote:and receive what?
Code: Select all
bind notc -|- {*} flags:check
setudef flag checkflags
proc flags:check {nickname hostname handle dest text} {
if {$nickname == "Q"} {
if {[regexp -nocase {^Access level (.*?) on channel (.*?)$} $text -> flags channel]} {
putlog "I have $flags on $channel - Q"
if {[validchan $channel] && [channel get $channel checkflags] && ![string match -nocase *a* $flags] && ![string match -nocase *o* $flags]} {
putlog "bot does not have +ao in $channel - Q"
putquick "PART $channel :you need to give me +ao on Q/L"
channel remove $channel
putlog "removed $channel due to no +ao - Q"
}
}
} elseif {$nickname == "L"} {
if {[regexp -nocase {^#(.*?)\s{1,40}(.*?)$} $text -> channel flags]} {
set channel "#$channel"
putlog "I have $flags on $channel - L"
if {[validchan $channel] && [channel get $channel checkflags] && ![string match -nocase *a* $flags] && ![string match -nocase *o* $flags]} {
putlog "bot does not have +ao on $channel - L"
putquick "PART $channel :you need to give me +ao on Q/L"
channel remove $channel
putlog "removed $channel due to no +ao - L"
}
}
}
}
Tosser^^ wrote:they are notices.
this is only an example, not tested...Code: Select all
bind notc -|- {*} flags:check setudef flag checkflags proc flags:check {nickname hostname handle dest text} { if {$nickname == "Q"} { if {[regexp -nocase {^Access level (.*?) on channel (.*?)$} $text -> flags channel]} { putlog "I have $flags on $channel - Q" if {[validchan $channel] && [channel get $channel checkflags] && ![string match -nocase *a* $flags] && ![string match -nocase *o* $flags]} { putlog "bot does not have +ao in $channel - Q" putquick "PART $channel :you need to give me +ao on Q/L" channel remove $channel putlog "removed $channel due to no +ao - Q" } } } elseif {$nickname == "L"} { if {[regexp -nocase {^#(.*?)\s{1,40}(.*?)$} $text -> channel flags]} { set channel "#$channel" putlog "I have $flags on $channel - L" if {[validchan $channel] && [channel get $channel checkflags] && ![string match -nocase *a* $flags] && ![string match -nocase *o* $flags]} { putlog "bot does not have +ao on $channel - L" putquick "PART $channel :you need to give me +ao on Q/L" channel remove $channel putlog "removed $channel due to no +ao - L" } } } }