mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
Hello,
I have a mIRC client connected to 2 servers, to a channel of my my pvpgn server and to my classic IRC server, is it possible to mirror all chat from the pvpgn channel into a channel on my classic irc server with a mirc script?


admin of http://BRUT.me
Joined: Feb 2011
Posts: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
You can use a relay script. You can google "mirc relay script" and try some of those out.

Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
thank YOu, I googled some, but did not find any that is working for me, do someone have a script that is tested on the newest version of mIRC? for example this plugin, did someone test it for the last version of mIRC? http://hawkee.com/snippet/7416/
did not work for me, but why? o.O


admin of http://BRUT.me
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Code:
on *:TEXT:*:#firstchannel:{
  if $network == firstnetwork { scid -at1 relay $unsafe($chan $1-) }
}

alias -l relay {
  if $network == secondnetwork && $me ison #secondchannel {
    msg #secondchannel ( $1 ) $2-
  }
}
replace #firstchannel, firstnetwork, secondchannel and secondnetwork accordingly


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
It is not working too smirk I have both servers on one machine and I add them like 192.168.1.123:1234 and the second one with other port, could it be because of this?


admin of http://BRUT.me
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
This script assumes you're already connected to the 2 networks, where you have 2 status windows open, 1 for each network. It also assumes you already have the 2 channels open already. This script won't hinder you from connecting to 2 networks, nor will it create support for connecting to 2 networks that you weren't previously able to.

Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
both servers are running, I am connected to them with one IRC client, and both channels exists and the client is connected to them, in one is the client an operator, checked more times for typos, everything should work, I just want to be sure, if it works when the servers are on the same IP just the port is different and if the network names are in this format correct - 192.168.1.123:1234 because when it works for other people, it has to work for me too, I just need to figure out what did I wrong, and what to do to fix it

oh, now I realized that I did not update this mIRC client, it is on version 7.36


admin of http://BRUT.me
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
This script works on any version of mIRC supporting /scid, which was added in 6.0 in 2002, only $unsafe is a recent addition, you can use a scripted $safe alias in this case (see https://en.wikichip.org/wiki/mirc/msl_injection#The_.2Ftimer_command), or update to the latest version of mIRC.

The code works but no, $network can't be 192.168.1.123:1234, for various reason.
That being said that code was made to relay two different networks or two different server, I'm not so sure what's your situation, are you connecting to the same ip twice on different port? in this case you need to only check the server/network + the port


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
thank you, I will have time in the evening and update the mIRC, hope other scripts that run on the mIRC will work on the newest version..
the situation is that all, both irc (irc and pvpgn) servers and the mIRC client run on the same machine, the irc servers have of course two different ports assigned, should it work though?


admin of http://BRUT.me
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
To help you (or anyone else reading this), you should go into the Alt+R scripts editor, and inside that editor window use the 'options' menu to put a check on the line 'identifier warning' then click 'OK' to exit. Without that line checked, if you paste this next line into the editbox of any #channel:

//echo -a OK $does_not_exist | echo -a message 2

It will display the message "OK". However when that option is checked, it instead halts with displaying a message that the identifier does not exist, and halts before displaying "Message 2".

Seeing that error message in the status window helps identify why scripts do not work, and prevents the script from handling the non-existent identifier as if it were the NULL (empty) string.

Sometimes the problem can be an old mIRC version, which it sounds like could have been your problem.

Sometimes the problem can be trying to use a script that uses a scripted alias that wasn't also given along with the script. That wasn't the case here, though he offered a scripted alias to substitute for the $unsafe identifier which exists in newer mIRC versions.

Yes, it should work now. It should have worked before except we didn't know you were using a really old mIRC version. So no we wouldn't bet money that it was the only thing preventing your mIRC from working fine with this script.

Joined: Jun 2018
Posts: 9
B
BRUT Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
B
Joined: Jun 2018
Posts: 9
thank you, I updated the mIRC but still no relay laugh kind of X-Files, is the format of server IPs allright?


admin of http://BRUT.me
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
When you say 'still no relay', does that mean you successfully opened both channels, but it just doesn't relay the messages from one channel into the other?

Quote:

replace #firstchannel, firstnetwork, secondchannel and secondnetwork accordingly


If you can see both channels, it does not matter how you opened both networks - just that you have them both open.

In that script, replace the text #firstchannel with the name of the channel you are relaying FROM, and replace the text #secondchannel with the name of the channel you are relaying TO. The same goes with the names of the 2 networks replacing firstnetwork and secondnetwork. The names need to be spelled correctly, though upper/lower-case doesn't matter. If you paste the following command while your cursor is in each of the 2 channels, it shows the names you need to put in those places:

//echo -a $chan $network

For a slight change to the script, currently $unsafe($chan $1-) displays the name of the original channel then the message, but doesn't show the nickname who created the message. You could change

$unsafe($chan $1-)
to
$unsafe($chan $+(<,$nick,>) $1-)

If you're still not seeing anything happening, there could be a few problems:

1. check your spellings for all 4 strings. All it takes is for 1 of the 4 to be spelled wrong and it will either do nothing or display an error message in the status window.

2. If you pasted this relay script into another script in the remotes tab of the Alt+R editor, and that other script already has the :TEXT: event in it, the other handler could be intercepting all the messages, preventing this relay script from seeing any of them.

You keep asking about IP addresses and port numbers. Again, if you can see people chatting in both channels, it makes no difference what IP address or port was used to connect to that server, as long as you spelled all 4 strings correctly.

Joined: Jan 2022
Posts: 3
R
Self-satisfied door
Offline
Self-satisfied door
R
Joined: Jan 2022
Posts: 3
I have works.. But, need relay from one to Two other server.. and tried name, name... in this script but do not know how.

alias -l relay {
if $network == firstserver && $me ison #channel {
msg #2ndChannel ( $1 ) $2-
}

can mirc do same twice, or send from first server to two others?

Joined: Jan 2022
Posts: 3
R
Self-satisfied door
Offline
Self-satisfied door
R
Joined: Jan 2022
Posts: 3
yes.. firstServer means name, not ip address. and channel is one you are on.. and dual connect you have two windows.. two connections.. second server ..see, and so it is name of server.. Efnet, or whatever.. and the text goes from one server and that channel, to the next.

I'm looking to send from one.. to the sever#2, and #3...

Joined: Jan 2022
Posts: 3
R
Self-satisfied door
Offline
Self-satisfied door
R
Joined: Jan 2022
Posts: 3
on *:TEXT:*:#firstchannel:{
if $network == firstnetwork { scid -at1 relay $unsafe($chan $1-) }
}

alias -l relay {
if $network == secondnetwork && $me ison #secondchannel {
msg #secondchannel ( $1 ) $2-
}
}

replace #firstchannel, firstnetwork, secondchannel and secondnetwork accordingly


Link Copied to Clipboard