All pastes #519235 Raw Edit

Untitled

public text v1 · immutable
#519235 ·published 2007-05-29 16:17 UTC
rendered paste body
####### Multi-channel onjoin messages - v1.0.0 by ppslim @ efnet
#     #
#  Allows you to set messages to be seen while joining a channel
#  Allthough this isn't much needed any more, due to a request of egghelpforum.com
#  I thought it wouldn't do much halm to add one
#     #
#  Just add the channels and there messages, and it is set to go
#     #
#######

###
# SETTINGS

# Set this to the channels and messges, follow the format of the examples
set ojcham {
{#pomoc} {Cao $nick postavi pitanje i cekaj na odgovor, nakon dobivenog odgovora napusti kanal!!!!! }
}

# Do you want to use notices, or private messages - 0=notice - anything else=private message
# Notices goto the user, while private messages goto the channel
set ojtom 1

###
# THIS IS THE SCRIPT, SURE YA WANNA TOUCH

bind join - "*" oj:chan:message
proc oj:chan:message {nick uh hand chan} {
  global ojcham ojtom
  if {[set id [lsearch -exact [string tolower $ojcham] [string tolower $chan]]] != -1} {
    if {$ojtom == "0"} {
      putserv "NOTICE $nick :[lindex $ojcham [expr $id + 1]]"
    } {
      putserv "PRIVMSG $chan :[lindex $ojcham [expr $id + 1]]"
    }
  }
}