Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

Sending a private message from an ES plugin?


Dave Ramsey 1280218
 Share

Recommended Posts

Dave Ramsey 1280218
Posted
Posted

Hey all,

 

Sorry if this has been covered before ...

 

It's very useful for plugins to be able to process a received private message,

but it would be fantastically useful if plugins could also send a private message.

 

In this way a plugin could talk (privately) to another instance running elsewhere.

 

I want to p[Mod - Happy Thoughts] some small pieces of information, like maybe swapping IP addresses

so that they could then talk direct.

 

Any ideas/thoughts?

Link to comment
Share on other sites

Sam White 1214219
Posted
Posted

I'm not sure that would be the best way to fetch the IP addresses of other clients, even if it is possible.

 

What might be slightly better and possibly easier is the plugin contacting a web server on start up and giving the server the information, where it can then be downloaded from the server by other clients. If you decide to use this method I would be happy to share some of my source code from an MFC application for the communication with the web server if it helps?

VATSIM UK S2 Rated (Essex RTS)

Sam%20White.jpg

Link to comment
Share on other sites

Luke Kolin
Posted
Posted

How do you plan on handling NAT?

 

Cheers!

 

Luke

... I spawn hundreds of children a day. They are daemons because they are easier to kill. The first four remain stubbornly alive despite my (and their) best efforts.

... Normal in my household makes you a member of a visible minority.

Link to comment
Share on other sites

Dave Ramsey 1280218
Posted
Posted (edited)

Sam:

 

My backup plan was perhaps to use a free dynamic DNS server and have one instance become the server for all others, (messy I know since some intelligent hand-off would then be needed).

I suspect that your suggestion of getting hold of some web-space would be simpler ... I just didn't fancy the idea of writing the server script ... Ho hum

 

Thanks for the source offer; I'm using C# (.NET) which already has some nice components for requesting and receiving over http. [i code very little these days ]

 

Luke:

 

As you're probably aware, there are ways of discovering your public IP. I was then going to require the user to Port Forward (like a lot of programs already do)

 

generate.php?mid=1280218

Edited by Guest
Link to comment
Share on other sites

Sam White 1214219
Posted
Posted

Hello Dave,

If you want I would be more than happy to help you write the server side script?

VATSIM UK S2 Rated (Essex RTS)

Sam%20White.jpg

Link to comment
Share on other sites

Pierre Ferran
Posted
Posted
If you decide to use this method I would be happy to share some of my source code from an MFC application for the communication with the web server if it helps?

 

Hi Sam,

 

If you don't mind, I would be very interested in the c++/mfc code, i've posted this thread a few weeks ago, and so far no replies: viewtopic.php?f=71&t=65956

 

That would be very nice of you.

 

Regards

Link to comment
Share on other sites

Dave Ramsey 1280218
Posted
Posted

Hi Sam,

 

That's kind of you ...

 

First, I will arrange the web-space ... errrrm Where do people go to get free web space these days?

(The only name that I can recall is AngelFire - I bet they don't even exist anymore)

 

I guess, what I'm after is a "simple" cgi script that will allow set, get and delete of an IP address against a callsign ... I doubt there'd ever be more than 50 on the go at once.

 

Something like this?

http://blah.com/set.cgi?callsign=EGSS_GND?IP=123.123.123.123
http://blah.com/get.cgi?callsign=EGCC_N_TWR
http://blah.com/delete.cgi?callsign=EGLC_TWR

As you can probably tell, it's been quite a few years since I did any server stuff (AND it was all PERL).

 

Your advice would be greatly appreciated

 

Dave

 

generate.php?mid=1280218

Link to comment
Share on other sites

Sam White 1214219
Posted
Posted
If you decide to use this method I would be happy to share some of my source code from an MFC application for the communication with the web server if it helps?

 

Hi Sam,

 

If you don't mind, I would be very interested in the c++/mfc code, i've posted this thread a few weeks ago, and so far no replies: viewtopic.php?f=71&t=65956

 

That would be very nice of you.

 

Regards

Hello Pierre,

Sure! I will post in the original topic shortly.

Hi Sam,

 

That's kind of you ...

 

First, I will arrange the web-space ... errrrm Where do people go to get free web space these days?

(The only name that I can recall is AngelFire - I bet they don't even exist anymore)

Hi Dave,

For my websites I use http://000webhost.com/ who are not too bad, but their inactivity policy is very strict - if you don't go on your account for 30 days, or if your website doesn't have any visitors then the website is deleted from their servers, so it pays to back up anything you have on a website with them often!

 

While we are testing and setting this up I would be happy to let you use one of my websites, if that is ok with you?

I guess, what I'm after is a "simple" cgi script that will allow set, get and delete of an IP address against a callsign ... I doubt there'd ever be more than 50 on the go at once.

 

Something like this?

 

http://blah.com/set.cgi?callsign=EGSS_GND?IP=123.123.123.123
http://blah.com/get.cgi?callsign=EGCC_N_TWR
http://blah.com/delete.cgi?callsign=EGLC_TWR

With the scripts what you want seems to be quite easy to do, although I program in PHP and don't have any experience programming in CGI, or really fully understand what it is! I can receive the data in the format you gave, process it and return a result as plain text using PHP, if you could use that?

 

Sam

VATSIM UK S2 Rated (Essex RTS)

Sam%20White.jpg

Link to comment
Share on other sites

Matt Middleton 1264577
Posted
Posted
If you decide to use this method I would be happy to share some of my source code from an MFC application for the communication with the web server if it helps?

 

Hi Sam,

 

If you don't mind, I would be very interested in the c++/mfc code, i've posted this thread a few weeks ago, and so far no replies: viewtopic.php?f=71&t=65956

 

That would be very nice of you.

 

Regards

Hello Pierre,

Sure! I will post in the original topic shortly.

Hi Sam,

 

That's kind of you ...

 

First, I will arrange the web-space ... errrrm Where do people go to get free web space these days?

(The only name that I can recall is AngelFire - I bet they don't even exist anymore)

Hi Dave,

For my websites I use http://000webhost.com/ who are not too bad, but their inactivity policy is very strict - if you don't go on your account for 30 days, or if your website doesn't have any visitors then the website is deleted from their servers, so it pays to back up anything you have on a website with them often!

 

While we are testing and setting this up I would be happy to let you use one of my websites, if that is ok with you?

I guess, what I'm after is a "simple" cgi script that will allow set, get and delete of an IP address against a callsign ... I doubt there'd ever be more than 50 on the go at once.

 

Something like this?

 

http://blah.com/set.cgi?callsign=EGSS_GND?IP=123.123.123.123
http://blah.com/get.cgi?callsign=EGCC_N_TWR
http://blah.com/delete.cgi?callsign=EGLC_TWR

With the scripts what you want seems to be quite easy to do, although I program in PHP and don't have any experience programming in CGI, or really fully understand what it is! I can receive the data in the format you gave, process it and return a result as plain text using PHP, if you could use that?

 

Sam

 

Hi Sam,

 

Can you drop me an e-mail through the RTS system please.

 

Cheers

Link to comment
Share on other sites

Sam White 1214219
Posted
Posted

Hi Matt,

Sure! Just done it!

 

Sam

VATSIM UK S2 Rated (Essex RTS)

Sam%20White.jpg

Link to comment
Share on other sites

Todor Atanasov 878664
Posted
Posted

Private message from plugin will not be allowed for the same reason it is not allowed to send text messages on the freq from a plugin. It is due security reasons, some one can flood the freq or private channel, deliberately or by accident.

Link to comment
Share on other sites

Dave Ramsey 1280218
Posted
Posted
Private message from plugin will not be allowed for the same reason it is not allowed to send text messages on the freq from a plugin. It is due security reasons, some one can flood the freq or private channel, deliberately or by accident.

 

Fair enough ... Thanks for the answer.

 

We will coordinate communications directly (using a server approach)

 

I can receive the data in the format you gave, process it and return a result as plain text using PHP, if you could use that?

 

That'd be great!

Matt will fill you in and we can discuss through the project's dropbox or get Matt to let you have my email address.

 

generate.php?mid=1280218

Link to comment
Share on other sites

 Share