This script is designed to be used for a bot, and can support unlimited channels on unlimited networks.
To activate Joinmsg, !joinmsg on
To set greeting, !joinmsg set
To deactivate Joinmsg, !joinmsg off
Have fun,
Henry ;)
;###### MULTI CHANNEL MULTI NETWORK JOIN MESSAGE SCRIPT - COPYRIGHT 2010 HENRY COLE ######
;###### MORE INFO & HELP IN #HENCO ON IRC.INFINITYIRC.COM ######
on *:text:!joinmsg *:#: {
if ($nick isop $chan) {
if ($2 == on) {
set %joinmsgconf. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] ] on
msg $chan Joinmsg on.
}
if ($2 == off) {
set %joinmsgconf. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] ] off
msg $chan Joinmsg off.
}
if ($2 == set) {
set %joinmsgtext. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] ] $3-
msg $chan Joinmsg set.
}
}
else {
msg $chan $nick - Only channel operators may use this command.
}
}
on !*:JOIN:#: {
if ( %joinmsgconf. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] ] == on ) {
msg $chan %joinmsgtext. [ $+ [ $network ] $+ ] . [ $+ [ $chan ] ]
}
}
maybe use hash for this instead of filling up ur var list
here is a fast rewrite using hash trying to keep it at what you have. added a delete command an you may want to add a flood control an some checks, but w/e
on @*:text:!joinmsg *:#: {
if ($nick isop #) {
if ($2 = on || $2 = off) {
.hadd -m joinmsg $+(conf,.,$network,.,#) $iif($2 = on,on,off)
msg # Joinmsg $+(,$hget(joinmsg,$+(conf,.,$network,.,#)),.)
}
if ($2 = set || $2 = del) {
$iif($2 = set,.hadd -m joinmsg $+(text,.,$network,.,#) $3-,$iif($2 = del,hdel joinmsg $+(text,.,$network,.,#)))
msg # Joinmsg $iif($hget(joinmsg,$+(text,.,$network,.,#)),set.,deleted.)
}
}
else { msg # $nick - Only channel operators may use this command. }
}
on !*:JOIN:#: {
if ($hget(joinmsg,$+(conf,.,$network,.,#)) && $hget(joinmsg,$+(text,.,$network,.,#))) {
msg # $hget(joinmsg,$+(text,.,$network,.,#))
}
}
on *:start:{ $joinmsgstartup }
on *:connect:{ $joinmsgstartup }
on *:exit:{ $joinmsgclose }
on *:disconnect:{ $joinmsgclose }
alias -l joinmsgclose { .hsave joinmsg $qt($scriptdirjoinmsg.hsh) }
alias -l joinmsgstartup {
if (!$hget(joinmsg)) { .hmake joinmsg 100 }
elseif ($exists($qt($scriptdirjoinmsg.hsh))) { .hload joinmsg $qt($scriptdirjoinmsg.hsh) }
}