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.

Reply
 
Thread Tools Display Modes
Sending Rcon commands via UDP
Old
  (#1)
mr.monkey is Offline
Junior Member
 
Posts: 2
Join Date: Aug 2002
   
Default Sending Rcon commands via UDP - 08-29-2002, 09:37 AM

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
  
Reply With Quote
Re: Sending Rcon commands via UDP
Old
  (#2)
r3mix is Offline
Senior Member
 
Posts: 896
Join Date: Apr 2002
Location: Oz
   
Default Re: Sending Rcon commands via UDP - 08-29-2002, 10:05 AM

[quote="mr.monkey":aa3b4]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:aa3b4]

um.... packet capture?
post this over in board of developers too.

r3mix
  
Reply With Quote
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, 11: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
Old
  (#4)
mr.monkey is Offline
Junior Member
 
Posts: 2
Join Date: Aug 2002
   
Default 08-30-2002, 08:33 AM

You're a star. Thanks a lot buddy
  
Reply With Quote
Old
  (#5)
Pfc.Green is Offline
Senior Member
 
Posts: 3,849
Join Date: Jan 2002
Location: Bothell, Washington, U.S.A
   
Default 09-01-2002, 09:58 AM

Monkey Monkey Monkey Monkey Monkey Monkey Monkey oOo:
  
Reply With Quote
Old
  (#6)
cs02rm0 is Offline
Junior Member
 
Posts: 1
Join Date: Jun 2003
   
Default 06-12-2003, 12:53 PM

Anyone know how this would work in Java?
  
Reply With Quote
Reply



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.