mIRC Homepage
Posted By: Artanis Help with $network - 05/12/05 12:01 AM
First, sorry if the question has been asked before, I searched for a wile and didnt find the answer.

Now, I want to do a simple script who reads text in a network and sends a /mgs in another network, but I'm a noob and dont know how to send the msg to other network.

Can someone help me?

PD: Sorry for my bad English, as you can see this isnt my mother language ^^U
Posted By: RusselB Re: Help with $network - 05/12/05 12:18 AM
Normally messages are sent from a channel to another channel..the fact that the two channels are on different networks makes it a bit more complicated to code, but it can still be done.

Rather than writing it up, check Relay script
Posted By: Artanis Re: Help with $network - 05/12/05 01:41 AM
Quote:
Rather than writing it up, check Relay script

Great script, but that isnt exactly wath I wanted to do.
I will try to explain better the idea:

I want to do a script who sends a /msg to certain nick in one server if it reads some specific text(in other server).
For example if it reads " !text " in #channel in efnet, sends a msg to some nick/channel in freenode.

I can do all except the network thing, its to hard for me(I'm still learning).
Posted By: genius_at_work Re: Help with $network - 05/12/05 02:03 AM
Try /help /scid . The commands on that page of the help file are the ones you need in order to send messages from one server connection to another. I've never actually made a script to communicate between server connections, but I imagine it would be something like this:

Code:
on *:TEXT:!text *:#channel:{
  if ($cid == 1) scid 2 msg someuser Message from cid 1
}


In that example you would have to connect to Efnet first ($cid == 1), and Freenode second ($cid == 2).

-genius_at_work
Posted By: FiberOPtics Re: Help with $network - 05/12/05 08:32 AM
Both your code, and the snippet that RusselB linked to are open to exploitation. Any person who hosts either of those snippets can have their hard drive formatted.

People, do not use any of the code presented here, and take a look at these posts:

1 2

Never ever put code directly into a scid/scon/timer command without being fully aware of the accompanied dangers, which is double evaluation, once when issuing the command, and once when the scid/scon reaches the targetted connection.
Posted By: RusselB Re: Help with $network - 05/12/05 09:28 AM
Don't blame me for possible exploitations of any script that I haven't written. That was just the script on Hawkee that seemed the best of the one's that I reviewed before posting the link.
Posted By: FiberOPtics Re: Help with $network - 05/12/05 10:57 AM
Huh? If you link to a script that has security holes in it, then you share a responsibility. It doesn't matter if you scripted it or not, you refered a user directly to an exploitable script. You should have atleast taken a quick look at the code like I did. Don't forget that many people can view our posts, as this is a public forum, so you are responsible for whatever you post on here, whether that be actual code or a link to other people's code.

How many times am I going to have to stress this fact about double evaluation to people before they get it? These scripts can be extremely harmful, yet no one seems to understand that. Suppose I had bad intentions, and could track this person down to whatever network he idles on (all I need to know is right there in his profile), I could do anything to his system that I want to. I'd say that's pretty serious, and is a perfect justification for my warning post.

If you have problems with my post, then don't link to code without knowing if it's safe. It seems like hawkee.com doesn't virus check/review snippets, so I'd never even link to snippets on such site in the first place.

If you can't take the time to review the code that you are linking to, or are unwilling to share responsibility for the fact that you link to unsafe code, or you are offended by others like me who wish to protect people unaware of the kind of code they will be loading into their scripts editor, then please, refrain from posting alltogether.

Yes, this is a lengthy and harsh post, and yes it is perhaps slightly over the top, but this is a very serious issue, which shouldn't be discarded as easily as you did with saying "don't blame me, because I didn't script it" argument.
Posted By: genius_at_work Re: Help with $network - 05/12/05 06:17 PM
Sorry for the potentially harmful information, all. I mentioned that I haven't actually used the scid-like commands, mainly because I only connect to one network, and it doesn't allow linking like that. I'll be sure to remember the exploitability if I ever use the scid-like commands again.

-genius_at_work
© mIRC Discussion Forums