mIRC Home    About    Download    Register    News    Help

Print Thread
#159433 17/09/06 07:11 AM
Joined: Dec 2005
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2005
Posts: 22
Hello i found this script browsing this forum but im unsure how to get it to work. Do i need 2 seperate irc's open? or do i /server -m network or ?? im really confused as of how it works. Any help would be appreciated

Here is the script

menu nicklist {
relay
.Start {
set %source_nick $1
set %source_chan #
set %source_net $network
set %target_net $$?="Insert network here"
set %target_chan $$?="Insert channel here"
}
}
.Stop { unset %source_* %target_*
On *:text:*:%source_chan:{
if $nick == %source_nick && $network == %source_net {
scon -at1 if $!network == %target_net && $!me ison %target_chan { msg %target_chan $+(<,$nick,@,$network,>) $1- }
}
}


Can someone help me configure it to relay from Galaxynet #test to Gamesurge #test ?

Kind regards, spirit

Last edited by spirit_cro; 17/09/06 08:45 AM.
Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
Well for one, it's missing a bracket. And is accessible through the nicklist. Click on someone's nickname to bring up the menu.

Here's a clean up of that:
Code:
menu nicklist {
  relay
  .Start {
    set %source_nick $1
    set %source_chan #
    set %source_net $network
    set %target_net $$?="Insert network here"
    set %target_chan $$?="Insert channel here"
  }
  .Stop { unset %source_* %target_* }
}
on *:text:*:%source_chan:{
  if (($nick == %source_nick) &amp;&amp; ($network == %source_net)) {
    scon -at1 if $!network == %target_net &amp;&amp; $!me ison %target_chan { msg %target_chan $+(&lt;,$nick,@,$network,&gt;) $1- }
  }
}


However, I'm not much on relaying chat back and forth over networks. What this says is:
on the source channel, if nick says soemthing and they are the source_nick and are on the source network it preforms the scon command. Which then if the $network equals target_net and you are on the target_chan it then messages the target_chan what source_nick said on the source network and source channel. I managed to get it working here on my irc test server and a friends server. You just have to know what the target's are.

Joined: Dec 2005
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2005
Posts: 22
menu nicklist {
relay
.Start {
set %source_nick $1
set %source_chan #test1
set %source_net $network
set %target_net $$?="GameSurge"
set %target_chan $$?="#Test1"
}
}
.Stop { unset %source_* %target_*
On *:text:*:%source_chan:{
if $nick == %source_nick && $network == %source_net {
scon -at1 if $!network == %target_net && $!me ison %target_chan { msg %target_chan $+(<,$nick,@,$network,>) $1- }
}
}


Would that work? GalaxyNet being my source network and #test1 being the source channel. Gamesurge is the network its relaying to and #test1 the channel. What i dont understand is how to get it to work. Do i need 2 irc clients open? or what am i required to do from my side?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
No, you have to refer to the source and receiving networks by their connection ID, which is going to vary depending on what order you connect to them in, and if you have any other connections before or in between those two.

There are relay scripts already done on Hawkee, if you would like to take a look, just use the search option in the forums and also in the snippets section.

Joined: Sep 2003
Posts: 261
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2003
Posts: 261
You need to just join 2 servers using the multiserver feature.

/server server1
/server -m server2

Then right click on a name on a channel in the nicklist and go from there. there was a bracket missmatch and .Stop should be under the menu but it's out of the menu. Because it's a menu item, and in that code the item is outside the menu and not in it so i put it back, but you can leave it.

Steps I took to use that once I cleaned it up:

1. was on a friends server in a room
2. while still on that server joined my test server using /server -m scorpwanna.com
3. joined a room there
4. loaded up a bot
5. Right clicked on the bot nickname: Relay, start
6. filled in the target network, and target channel.
7. Gave my bot soemthing to say. It just relayed the text over to the channel on the other server.

Whatever channel you are on when you click on that channel's nicklist to start it, is the source channel "set %source_chan #". You have to be in those channels on both servers to make it work. I don't really see why source_nick is needed, cuz it seems only if they say something it's relayed and not when everyone speaks.


Link Copied to Clipboard