All pastes #352779 Raw Edit

Stuff

public text v1 · immutable
·published 2007-02-13 00:28 UTC
rendered paste body
bind pub o eb ebproc

proc ebproc {n u h c a} {
global botnick version
  if {[lindex $a 0] == ""} { 
   putserv "privmsg $c :Insufficient parameters."
  }
  if {[lindex $a 0] == "say"} { 
   if {[lindex $a 1] != ""} { 
    putserv "privmsg $c : [lrange $a 1 end]" 
    }
   }
   if {[lindex $a 0] == "join"} { 
    if {[lindex $a 1] != ""} { 
     if {[string match #* [lindex $a 1]]} {
 	  channel add [lindex $a 1]
	  putserv "JOIN [lindex $a 1]"
	  putserv "notice $n :Joined [lindex $a 1]"
	 } 
	if {![string match #* [lindex $a 1]]} {
	 channel add #[lindex $a 1]
     putserv "join #[lindex $a 1]"
	 putserv "notice $n :Joined #[lindex $a 1]"
    }
   }
  }
  if {[lindex $a 0] == "part"} { 
   if {[lindex $a 1] != ""} { 
   if {[string match #* [lindex $a 1]]} {
    channel remove [lindex $a 1]
	putserv "part [lindex $a 1]"
	putserv "notice $n :Parted [lindex $a 1]"
   } 
   if {![string match #* [lindex $a 1]]} {
    channel remove #[lindex $a 1]
    putserv "part #[lindex $a 1]"
	putserv "notice $n :Parted #[lindex $a 1]"
   }
  }
 }
}