mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
Hey, I was wondering if it's possible to receive a command/msg from on IRC server and then send it to another IRC server.

Example:

Someone do !sendmsg in a channel on Freenode's server and then it send the message to a channel in another server like efnode.

Thanks smile


Matti
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
You need /scon or /scid, $cid or $network, and probably some tokens stuff.


Dont give a fish - teach to fish!
Joined: Sep 2011
Posts: 32
F
Ameglian cow
Offline
Ameglian cow
F
Joined: Sep 2011
Posts: 32
Apropos this question, I have a script that actually does something close to this, but it has a minor deficiency in that if the text that it's relaying contains a 'word' (sequence of nonblanks) that begins with a $, that 'word' doesn't get relayed. I'm morally certain that what's happening is that it's trying to evaluate that 'word' and coming up empty (understandably). What I haven't been able to find is the answer to the question "Given that I want to relay $2-, how do I prevent it from actually attempting to evaluate the text that ends up in $2-?".

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
You are correct, and this is a large security hole.

/scid and /scon double evaluate text. Your options are to /scid and /scon on their own line and to continue your commands on their own lines, or to use this $safe alias directly in the /scid call

Code:
alias safe return $!decode( $encode($1,m) ,m)


See http://en.wikichip.org/wiki/mirc/msl_injection for more

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Using this one in mine:
http://savepic.su/5715286m.png


Dont give a fish - teach to fish!
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
Thanks for the help, got it working smile Also is there anyway to make it so the bot respond to IRCv3 that shows in the Status window?


Matti
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
try
Code:
raw *:*{ echo -agt RAW:: $rawmsg }


Dont give a fish - teach to fish!
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
Where do I try this? Tried that in the script editor and in chat/status window?


Matti
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Well, if you dont know, you better read in Help about it. (for your safety!)
p.s. /help raw events


Dont give a fish - teach to fish!
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
Got it working, Thanks laugh


Matti
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
I got one more question and I think i'm set, Is it possible to only get 'MattiSony' out of mattisony!mattisony@mattisony.., it's the first word($1) in the sentence smile Couldn't figure it out my self.

EDIT: I want to get the difference names from it :P like only get the part before '!' or between ! and @, sorry if it's badly explained.

Last edited by MattiSony; 12/06/15 09:56 PM.

Matti
Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
Use /tokenize or $gettok.


Dont give a fish - teach to fish!
Joined: Oct 2014
Posts: 35
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Oct 2014
Posts: 35
I'v tried both of them but cant seem too get it working.


Matti

Link Copied to Clipboard