All pastes #329900 Raw Edit

Stuff

public text v1 · immutable
#329900 ·published 2007-01-27 03:31 UTC
rendered paste body
# Who to show?
#  0 = all users
#  1 = non-users
set greetd(show) 0

# Delay time before reshowing the greet? (In minutes)
set greetd(delay) 2

# Show via PRIVMSG or NOTICE?
set greetd(method) "PRIVMSG"

# Greet Messages and Their Channels ...
#  - Channel names within the ( and ) must be lowercase, otherwise it wont work
#  - Example:
#      set greetd_msg(#eggdrop) {
#       "Welcome to #Eggdrop"
#       "For Eggdrop Files, try ftp.sodre.net/pub/eggdrop"
#      }
#
# Got it? Its not that hard :)

set greetd_msg(#kismac) {
 "Welcome to #kismac"
 "For FAQ, please see https://kismac.de/_trac/wiki/FAQ"
}

###################################################################################

if {$greetd(delay) < 0} {set greetd(delay) 3}

bind join - *!*@* autogreet

proc autogreet {nick uhost hand chan} {
 putlog "proc autogreet has been called for $nick"
 global greetd_msg botnick greetd_queue greetd
 set chan [string tolower $chan]

 if {$nick == $botnick} {return 0}
 if {$greetd(show) == 1 && $hand != "*"} {return 0}
 if {![info exists greetd_msg($chan)]} {return 0}
 if {[info exists greetd_queue($chan![ident $uhost])]} {return 0}

 #foreach i $greetd_msg($chan) {putquick "$greetd(method) $nick :$i"; putlog "attempting puthelp for $nick"}
 foreach i $greetd_msg($chan) {putserv "PRIVMSG gm4n :asdf"; putlog "attempting putquick to gm4n"}
 
 putserv "PRIVMSG gm4n :asdf"
 
 set greetd_queue($chan![ident $uhost]) 1
 set a [timer $greetd(delay) "unset greetd_queue($chan![ident $uhost])"]
}

proc ident {data} {
 if {[string index $data 0] == "~"} {return #@[lindex [split $data @] 1]}
 return [string range [maskhost $data] 2 end]
}

putlog "Greetd.tcl v0.05b by guppy"