Echoing messages across networks - 04/02/07 08:27 PM
Basically, I've worked up a script taken from snippets of other pieces of code to do the following. In an online game, a faction can call for help by saying "!raid <target>" and the script will list all the nicks in specific channels to ding their clients.
As is, the script works fine so long as the channels are on the same network, and even across the network with the exception of listing the nicks. It tries to send a list of nicks to #factionA, though it's connected to the network for factionB. Anyone have any suggestions?
As is, the script works fine so long as the channels are on the same network, and even across the network with the exception of listing the nicks. It tries to send a list of nicks to #factionA, though it's connected to the network for factionB. Anyone have any suggestions?
Code:
alias nicktok { var %_ = $nick($1,0,$2) while (%_ >= 1) { set %nicks $addtok(%nicks,$nick($1,%_,$2),$3) dec %_ } if (%nicks == $null) { return nonicks } else { var %; = %nicks | unset %nicks return %; } } on *:TEXT:!raid*:#factionA: { if ($nick isvoice #factionA || $nick ishalfop #factionA || $nick isop #factionA) { msg #factionA FactionA is under attack by $2-! msg #factionA Wakey wakey! $nicktok(#factionA,a,32) .scon 2 msg #factionB FactionA is under attack by $2-! msg #factionB Wakey wakey! $nicktok(#factionB,a,32) .scon -r } } on *:TEXT:!raid*:#factionB: { if ($nick isvoice #factionB || $nick ishalfop #factionB || $nick isop #factionB) { .scon 1 msg #factionA FactionB is under attack by $2-! msg #factionA Wakey wakey! $nicktok(#factionA,a,32) .scon -r msg #factionB FactionB is under attack by $2-! msg #id.nexus Wakey wakey! $nicktok(#factionB,a,32) } }