- Home»
- Cod sursa: Greetd.tcl
Greetd.tcl
Greetd.tcl
TCL can do multi-channel multi-lined greet msgs, can either msg all users or just non-users, will only show the greet to one identd or non-identd within 2min or whatever you change the time level too ..
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| btc | Jeff Fisher | text-input | Cod netestat | 318 | 2023-12-25 08:57:59 |
# Script: Greetd.tcl
# Version: 0.05b
# Author: Jeff Fisher <fishy@dlcwest.com>
#
# Updates:
# 12Feb98 - can now select delay time (idea by Angelos7)
#
# Notes:
#
# - can do multi-channel multi-lined greet msgs
# - can either msg all users or just non-users
# - will only show the greet to one identd or non-identd within 2min
# or whatever you change the time level too ...
#
# Who to show?
# 0 = all users
# 1 = non-users
set greetd(show) 1
# Delay time before reshowing the greet? (In minutes)
set greetd(delay) 2
# Show via PRIVMSG or NOTICE?
set greetd(method) "NOTICE"
# 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(#eggdrop) {
"Welcome to #Eggdrop"
"For Eggdrop Files, try ftp.sodre.net/pub/eggdrop"
}
###################################################################################
if {$greetd(delay) < 0} {set greetd(delay) 3}
bind join - *!*@* autogreet
proc autogreet {nick uhost hand chan} {
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) {puthelp "$greetd(method) $nick :$i"}
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"
IRC Snippets