Multi-Server Channel Relay Script
add to your remotes
set your channel by right clicking and going to "Set Relay Channel"
Events Supported:
on text
on action
on part
on quit
on kick
on nick
Modes Supported:
q,e,a,o,h,v,b (it uses rawmode so it should relay all mode changes)
menu * {
Set Relay Channel:set %rchan $$?="Channel name: example: #Help"
}
on *:text:*:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $+($chr(60),$nick,$chr(62)) $1-
on *:action:*:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $+($chr(60),$nick) $1-
on *:join:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $nick joined #
on *:part:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $nick parted #
on *:rawmode:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $nick sets mode(s) $1 on $2-
on *:kick:%rchan:relayevent $iif($network = $null,Unknown-Network,$v1) $nick kicked $knick from #
on *:quit: {
var %a = $comchan($nick,0)
while %a {
if ($comchan($nick,%a) == %rchan) { relayevent $iif($network = $null,Unknown-Network,$v1) $nick quit: $iif($1-,$v1,No Quit Message) | dec %a }
else dec %a
} }
on *:nick: {
var %a = $comchan($newnick,0)
while (%a) {
if ($comchan($newnick,%a) == %rchan) { relayevent $iif($network == $null,Unknown-Network,$v1) $nick is now known as $newnick | dec %a }
else { dec %a }
} }
alias relayevent {
var %a = $scon(0)
while %a {
if ($scon(%a).network == $1) dec %a
else { scon %a msg %rchan $+(.:,$remove($$2,$chr(60),$chr(62)),@,$1,:.) $remove($3-,$chr(36)) | dec %a }
}
}
Sorry for basically grave digging this snippet, but it seems that when the user puts in too many characters it'll make the bot just say something with the relay prefix. A short example is like:
<Known> Hellooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Then on the other end (the bot's relay):
<Bot> .:Known@Network:. Hellooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
<Bot> ooooooooooooooooooooooo
I'm not sure exactly how to fix this, so I thought I might as well ask the creator (or anyone who is able to fix this problem.
Otherwise it's an amazing snippet!
Well i just tried this out today.. wonderful script,, works flawlessly, easy to strip out stuff and tweak it too.
just one thing tho...
"PuNkTuReD - May 09, 2009 : this is only a one channel one, but ill work on a multi channel one for ya m8."
did you perhaps make any progress with that? :D
this would script would increase its usefulness tenfold if it was able to link chans of different names.
putting all that aside, its still the best mutli server chan relay ive tested. well done :)
How much code would need to change so that it can take text from one server relay to another but not vice versa
example:
server1 [#a][relaying to server2 #b]
bot says hit
server2 [#b] [relay bot] bot says hi
but if some one was to say something in server2 [#b] it wouldnt be taken back to server 1 [a] ?
I've got mine now set up so that you set a "Relay Server" so that any message, on any server, in any channel, is relayed in one channel, on one network. so you can have a "Spy Server with Room" and spy on all the servers your bot is on, without being on all the servers. It also logs Nickname changes, Modes, kicks, quits, joins, URL posts, and parts.
i know this is prob really simple but is there a way to get it to show that what has been siad is on a linked server so say test on server0 said hi it would say botname> hi
also i know it can connect 2 rooms on 2 servers but is it also possible to have it connect the same 2 rooms like #test and #test1 on 2 different servers so like #test@server1 and #test@server2 then #test1@server1 and #test1@server2 or would i need to just run a second version of the script with a slightly modified menu command?
thanks
:/me test ur updated snippets.
have you got a server window open that is not connected?
:i guess ure rite punktured, sorry.
any message passed FROM webmaster.webchat.org
would not display the nicks name,
:well it does
and it would also display the message on that server.
as you know its not supposed to msg the room the msg originated from.
:/me nods
i couldnt test it on arcor.de.eu.dal.net because they klined my host.
:it works just fine.
code lines: if ($scon(%a).network == $1) { dec %a }
else { scon %a msg %rchan $$2- | dec %a }
} }
if i changed it too: if ($scon(%a).network == $1) { dec %a }
else { scon %a msg %rchan $$1- | dec %a }
} }
the output in server webmasters.webchat.org it will be like this:
RAPE <@Mongol> Unknown-Network RAPE tyvm for the help PunkTuReD.have you got a server window open that is not connected?
i cant duplicate your problem but in the process of trying, i found another.
any message passed FROM webmaster.webchat.org
would not display the nicks name, and it would also display the message on that server.
as you know its not supposed to msg the room the msg originated from.
i havent got it to stop msging the room, but i fixed the network problem.
also, i couldnt test it on arcor.de.eu.dal.net because they klined my host.
i got an error, it says in status:
if a msgs from a nick relayed to server dalnet & webchat from server tengkorak, well it works just fine, but if it tries to relay it from dalnet too webchat & tengkorak.org, it doesn't work, & so on..
the way this works is:
example:
your in #example
on 4 servers
turn this on, set it to channel #example
and it will relay to and from all 4 servers
its a multi-directional relay script.
if you would like it to state which network the msg/ban/ what ever, originated from.
replace
alias relayevent {
var %a = $scon(0)
while (%a) {
if ($scon(%a).network == $1) { dec %a }
else { scon %a msg %rchan $2- | dec %a }
} }
with this
alias relayevent {
var %a = $scon(0)
while (%a) {
if ($scon(%a).network == $1) { dec %a }
else { scon %a msg %rchan $1- | dec %a }
} }
Depends what the maximum count of characters per sentence the server allows. If it's too many, the server will break it down.
So it's not the bot, it's the server.