All pastes #249027 Raw Edit

Stuff

public text v1 · immutable
#249027 ·published 2006-11-15 09:16 UTC
rendered paste body
################ ON/OFF #################
proc pub:bottler:bset {nick user host chan text} {
global switch1
if {[isop $nick $chan] || [ishalfop $nick $chan]} {
set input [string tolower $text];
  if {$input == ""} {
    putquick "NOTICE $nick :Syntax: \037Set on/off/status\037"
  } elseif {$input == "on" && $switch1 == "on"} {
  	putquick "NOTICE $nick :Bottler Detect status \037already\037 on \002\"ON\"\002" 
  } elseif {$input == "off" && $switch1 == "off"} {
	putquick "NOTICE $nick :Bottler Detect status \037already\037 on \002\"OFF\"\002"
  } elseif {$input == "on" && $switch1 == "off"} {
    set switch1 "on"
	putquick "NOTICE $nick :Bottler Detect status is now \002\"ON\"\002"
  } elseif {$input == "off" && $switch1 == "on"} {
    set switch1 "off"
	putquick "NOTICE $nick :Bottler Detect status is now \002\"OFF\"\002"
  } elseif {$input == "status"} {
   	putquick "NOTICE $nick :Bottler Detect status is \002\"[string toupper $switch1]\"\002"
  } else { putquick "NOTICE $nick :Syntax: \037Set on/off/status\037"
  }
  } else { putquick "PRIVMSG $nick :You have no rights for this"
 }
return 0
}