sendto_one() question

These are old archives. They are kept for historic purposes only.
Post Reply
chevyman2002
Posts: 62
Joined: Sun Nov 14, 2004 2:55 am
Location: Texas
Contact:

sendto_one() question

Post by chevyman2002 »

Using the function as the following, is this sending a message to the end user or would the end user's client interpret it as a command?

Code: Select all

sendto_one(acptr, ":FURL %s", somestring);
In mIRC it simply shows what's in the text (without the colon) in the status window, however, other clients see garbage and then the message. Just curious.
Your face looks like it was set on fire and put out with an axe ;x.
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Re: sendto_one() question

Post by Stealth »

Different clients interpret things differently. When you send things to clients you need to make sure the commands meets the following format: ":<source> <command|numeric> <target> [parameters]". You cannot send commands to clients the same way clients send commands to servers! The only exception to this format is PING, which does not require a target.

To make your command have the source as the server, do:

Code: Select all

sendto_one(sptr, ":%s FURL %s %s", me.name, sptr->name, something);
For more information about sending text to clients in the proper format, please see RFC1459 where it is all fully explained. Sending random garbage to clients will create problems for your users if not sent in the proper format.
chevyman2002
Posts: 62
Joined: Sun Nov 14, 2004 2:55 am
Location: Texas
Contact:

Re: sendto_one() question

Post by chevyman2002 »

Thanks for your prompt response, it was very informational. I've been fighting with the pJIRC client attempting to copy the old FURL command from ConferenceRoom to force-open a web url. I'm honestly just bored and it wouldn't _seem_ overly difficult to deal with, even though I don't see any real need for it. I wanted to make sure that I was doing it at least semi-correctly on the Unreal side as I can't get the client to trigger a response when received. I tried it the way you posted and a few other ways and had no success, so I blame pJIRC :wink:. I appreciate the explanation of the command, though, that will help me tremendously.
Your face looks like it was set on fire and put out with an axe ;x.
Post Reply