I have been attempting to set up Auto-Op, Auto-Halfop, Auto-Voice commands and after scrounging through the archive and a little modification I am using the following:
Code: Select all
bind pub m|m .ao autooppub
proc autooppub {nick uhost handle chan arg} {
set handle [lindex $arg 0]
set hostmask [lindex $arg 1]
if {[validuser $handle]} {
chattr $handle +ao
puthelp "privmsg $chan :$nick: User has been auto-op'd."
return 0
}
if {![validuser $handle]} {
puthelp "privmsg $chan :$nick: User does not exisit in my database."
return 0
}
}
Which has worked great for modifying user attributes across the board, I am having trouble limiting them to a specific channel however. For example, when I add the $chan var after the flags I would expect it to assign those flags to the channel pulled from the public command, however it just adds it to the users global rights.
I even tried hard-coding a channel name and got the same result. I am a little new to tcl scripting, if someone could help correct my syntax or explain what I am doing wrong, I would greatly appreciate it.
Basically, I just don't want the auto-voiced/halfop'd/op'd users to have that access on all my bots chans
. Thanks in advance.