# Full name of channel services
set chanserv "CHANSERV@SERVICES.DAL.NET"
## Don't change below this.
bind mode - "* kicked" kick_remove
proc kick_remove {nick uhost hand chan mc victim} {
if {$victim == $::botnick} {
putserv "PRIVMSG $::chanserv :ACC $chan $nick"
}
}
bind notc - "* 1 (AOP)*" check_verify
proc check_verify {nick uhost hand msg {dest ""}} {
global botnick; if {$dest == ""} {set dest $botnick}
if {[string equal $dest $botnick]} {
set offender [lindex [split $msg] 0]
set chan [lindex [split $msg] 2]
set thehand [findhand $offender [getchanhost $offender]]
if {$offender != "" || $thehand != "*"} {
deluser $thehand
}
putquick "PRIVMSG $::chanserv :aop $chan del $offender"
putquick "MODE $chan -o $offender"
putkick $chan $offender "You tit head, you just lost access!"
}
}
bind kick - * kick:remove
proc kick:remove { nick uhost hand chan targ rsn } {
if {$targ == $::botnick} {
putserv "PRIVMSG $::chanserv :ACC $chan $nick"
}
}
# findhand - tries to find a handle
proc findhand {nick host} {
if {[validuser $nick]} {
return $nick
} else {
set thehand [nick2hand $nick]
if {[validuser $thehand]} {
return $thehand
}
set thehand [finduser $host]
return $thehand
}
}
I decided to have the bot check its' user list and remove the offending user if found. The use of DALnet's ACC command is not ideal though. If the nick that is opped has access to services under another nick then the script falls over. Use of the WHY command is preferable but I am unable to get it to work. I think the reason is that ChanServ returns formatted text (bold) when the WHY command is used. Here's an example: -ChanServ- Almozo has SOp access to #ricochet. Reason: Identification to the nickname giovann.
The end nick is the one preferably to remove from ChanServ's AOp list.
Any help with being able to use WHY in preferance to ACC will be greatly appreciated. I've just about given up trying.
