I am trying to make the Complete Channel Administration Script work to when the op types !addbot it will make the bot flags only appear as channel flags from where the command was typed instead of the flags being global.  So far it is making the flags global and the channel flags where the command was typed as "-".  I tried finding the author of it but couldn't, If anyone can help that would be great.  This is the part of the script that I am trying to get it to work with:
#------------------------------------------------------------------------------------------------------------
# The following processes the !addbot trigger command
#------------------------------------------------------------------------------------------------------------
proc inchanaddbot {nick uhost hand chan rest} {
  global noadvtriggers
    set chan [string tolower $chan]
      set knick [lindex $rest 0]
      if {![onchan $knick $chan]} {
        puthelp "NOTICE $nick :I don't see $knick in this channel"
        return 0
      } else {
        if [validuser [nick2hand $knick]] {
          puthelp "NOTICE $nick :$knick is already on the bots, adding +vfb"
          set mask [getmask $knick $chan]
          setuser [nick2hand $knick] HOSTS $mask
          chattr [nick2hand $knick] +vfb $chan
          setuser [nick2hand $knick] PASS "SDgtgfdfsdde23d34d3"
          putlog "\0035 $nick is adding +vfb flags to $knick"
          return 0
        } else {
          set mask [getmask $knick $chan]
          adduser $knick $mask
          chattr $knick -hopmnx
          chattr $knick +vfb $chan
          setuser [nick2hand $knick] PASS "SDgtgfdfsdde23d34d3"
          puthelp "NOTICE $nick :Adding $knick to the bots with +vfb."
          putlog "\0035 $nick is adding $knick with +vfb flags"
          return 0
        }
      }
}
			
			
									
						
										
						