Code: Select all
bind notc - {[VERBOSE]* => akick * add *} check:akick
bind notc - {* has * access to * Reason:*} check:why
catch {unset akick:queue}
proc check:akick {nick host hand text {dest ""}} {
if {$dest == "" || [isbotnick $dest] || ![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
return
}
if {[regexp -- {^\[VERBOSE\] (.+?)!(.+?) => akick (.+?) add (.+?)$} [stripcodes bcruag $text] match tnick thost tchan tmask] && ![isbotnick $tnick]} {
set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]]) $tmask
putserv "CHANSERV WHY $tchan $tnick"
}
}
proc check:why {nick host hand text {dest ""}} {
if {![string equal -nocase "chanserv!service@dal.net" "$nick!$host"]} {
return
}
if {$dest == "" || [isbotnick $dest]} {
if {[regexp -- {^(.+?) has (SOp|AOp) access to (.+?)\. +Reason: Identification to the nickname (.+?)\. Channel Frozen: (YES|NO)$} [stripcodes bcruag $text] match tnick tacc tchan trnick tfrozen]} {
if {[info exists ::akick:queue] && [info exists ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]} {
putserv "CHANSERV AKICK $tchan DEL [set ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])]"
puthelp "PRIVMSG $tnick :Only Founder may add AKICK's to $tchan"
unset ::akick:queue([list [string tolower $tchan] [string tolower $tnick]])
}
}
}
}
Below are DALnet's access levels:nml375 wrote:See one issue already, this will react on both AOP's and SOP's :/
Thinking of changing WHO-lookup into a ACC-lookup..
-2 = Channel is frozen or closed
-1 = AutoKICKed from the channel
0 = basic
1 = AutoOp
2 = SuperOp
3 = Has founder access via a NickServ access list mask
4 = Has founder access via identification to NickServ
5 = Has founder access via identification to ChanServ