Alliedassault           
FAQ Calendar
Go Back   Alliedassault > Lounge > Tech Questions & Problems
Reload this Page Sending Rcon commands via UDP
Tech Questions & Problems Ask our resident experts about any military shooter game server administration and other technical issues.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Re: Sending Rcon commands via UDP
Old
  (#3)
influx is Offline
Junior Member
 
Posts: 1
Join Date: Aug 2002
   
Default Re: Sending Rcon commands via UDP - 08-29-2002, 10:48 PM

[quote="mr.monkey":53e33]Ho folks,

I'm trying to write my own little app in VB much like Crow Kings AutoKick. I know I have to use the Winsock control and send via UDP and that's all set up with the correct IP and Port but how exactly do I form the syntax to send and receive the info back???

If I use something along the lines of "rconpassord ****" or "rcon status" all I receive back is "ÿÿÿÿdisconnect"

It's driving me mad. Can someone throw me a few pointers please?

Many thanks

Mr. Monkey[/quote:53e33]

You need to include a header before you send the rcon text to the server.

Q3 (and thus MOHAA) have a 4 byte header at the beginning which should just be 0xff (ASCII 255) four times, plus an extra byte that MOHAA always has set to 2. You also should (must?) include each seperate word of the command it a seperate quote, as this is what the game itself does.

So, to send "rcon status" with a password of "bleh", you'd send:
255, 255, 255, 255, 2, and then the string rcon bleh "status".

I've got a quick C implementation [url=http://stats.clanfx.com/download/moh-rcon.c.txt:53e33]here[/url:53e33]. So something like:

[code:53e33]
header = Chr$(255) + Chr$(255) + Chr$(255) + Chr$(255) + Chr$(2)
[/code:53e33]

would work in VB to get the header, and I have no desire in learning any more VB to do the rest. You similarly want to strip the header from the response.

- influx
  
Reply With Quote
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBulletin Skin developed by: vBStyles.com
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.