Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SUGGESTION] Possibility to get own ip:port through RCON?

#1
I am working on an interactive RCON client for Nexuiz/Xonotic. I need the user to see everything what's going on at the server, read chat, etc. Much like rcon2irc, I use the log_dest_udp feature to achieve that, however, I ran into a problem, which also exists in rcon2irc since I used the same method. The method works fine if I connect to a server inside of my home network, however, it fails on a remote server because getsockname() (Python) returns the local address of my machine (eg. 192.168.0.101, which is obviously not useable). I have worked it around by querying this service for my external IP address; assuming port is the same it seems to work for me. But in my opinion, this is an ugly workaround because:
  • It slows down the connection in a noticeable way
  • It still won't handle a connection to localhost
  • Relying on a side service is the last thing I want to do

What I am suggesting is a special RCON-only command, say, whoami. When the server recieves a whoami command, it just sends a pair of client's ip:port that is useable for log_dest_udp back to the client. This way, my RCON client will send a "whoami" command on connection, parse and store the reply and start querying log_dest_udp from time to time, adding itself if missing. With this approach, a failure will be nearly impossible. Would that be hard to implement? Or are there any better solutions? Perhaps there is already one and I'm missing it?
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SUGGESTION] Making some setting not changeable ie port/max players end user 6 8,052 10-04-2013, 04:37 PM
Last Post: end user
  [SUGGESTION] new movement possibility maiden 14 10,776 01-21-2013, 12:57 PM
Last Post: Morphed

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-