Code: Select all
set onjoin_msg {
{
"Hello $nick, welcome to $chan. This channel is owned by Precision Effect and has moved to #PE or www.PrecisionEffect.com - Please join there for sales/support."
}
}
set onjoin_chans "#1.6 #6radio #advertize #adz #e-sports #esports #find #hix #radio #ringer #scrim #search #webhosting #webdesign"
bind join - * join_onjoin
putlog "Onjoin.tcl 0.1 by Banned loaded"
proc join_onjoin {nick uhost hand chan} {
global onjoin_msg onjoin_chans botnick
if {(([lsearch -exact [string tolower $onjoin_chans] [string tolower $chan]] != -1) || ($onjoin_chans == "*")) && (![matchattr $hand b]) && ($nick != $botnick)} {
set onjoin_temp [lindex $onjoin_msg [rand [llength $onjoin_msg]]]
foreach msgline $onjoin_temp {
putquick "PRIVMSG $chan :[subst $msgline]"
}
}
}
Say the bot was in #PE-Bot and I wanted it to say who it messaged:
On-join message sent to $nick in $chan
Example: The bot is in a channel #esports
Someone joins #esports
Bot messages #esports with the onjoin msg stated
Bot messages #PE-Bot
On-join message sent to $nick in $chan
-Thanks.