This code is supposed when I type
! order MSG on my living room, Ca puts a new greeting message and when a person joined the living room Ca him sending a note with the message which I had put.
But for each .rehash and well it is necessary all to start again. to you there is a means of safeguarding the messages which I return?
here the code.
Code: Select all
bind pub - !welcome pub:welcome
proc pub:welcome {nick uhost hand channel text} {
global onjoin_msg
if {[validuser $hand] && ($text != "")} {
set onjoin_msg "$text"
putserv "NOTICE $nick :Nouveau message d'acceuil -> $text"
} else {
putserv "NOTICE $nick :Erreur..."
}
}
Code: Select all
set onjoin_msg {
{
"Welcome to Channel \$chan \$nick"
}
}
set onjoin_chans "#BG® #eg-lovech"
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) && (![matchattr $hand b]) && ($nick != $botnick)} {
puthelp "NOTICE $nick :[subst $onjoin_msg]"
}
}
Thank you