Alliedassault           
FAQ Calendar Search Today's Posts Mark Forums Read
Go Back   Alliedassault > Lounge > Tech Questions & Problems
Reload this Page Linux RCON tool for MOHAA ???
Tech Questions & Problems Ask our resident experts about any military shooter game server administration and other technical issues.

Reply
 
Thread Tools Display Modes
Linux RCON tool for MOHAA ???
Old
  (#1)
kibabu is Offline
Junior Member
 
Posts: 15
Join Date: Jun 2002
 Send a message via ICQ to kibabu  
Default Linux RCON tool for MOHAA ??? - 10-30-2002, 10:02 PM

Hey all,


I'm on a mission - can ANYONE help me by telling me if there is any Linux RCON tools for MOHAA out there, standard linux Q3 rcon tools dont seem to work.


I'm waiting here clicking refresh until someone can help me :/ I've been searching like a trojan with no luck
  
Reply With Quote
Old
  (#2)
Walrus is Offline
Junior Member
 
Posts: 14
Join Date: Oct 2002
   
Default 10-31-2002, 06:25 AM

Hrm I once found a C-Sourcecode of a small rcon tool. It#s not displaying any output, but enough to display scheduled messages, kick players, ...

[code:079cc]
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <unistd.h>

int main(int argc, char *argv[])
{
int port, sock, i;
struct sockaddr_in addr;
struct hostent *host;
char str[1024];

if(argc < 5)
{
printf("\nprintf(" Usage: rcon <address> <port> <password> <commands>\n");
printf(" e.g. rcon 143.112.89.219 12203 itssecret say hello\n");
printf(" or rcon 16.22.14.93 12203 myfavorite kick profane\n\n");
return 1;
}

sock = socket(AF_INET, SOCK_DGRAM, 0);
if(sock < 0)
{
perror("socket");
return 1;
}

port = atoi(argv[2]);

host = gethostbyname(argv[1]);
if(host == NULL)
{
perror("gethostbyname");
return 1;
}

memset(&addr, 0, sizeof(struct sockaddr_in));
addr.sin_family = AF_INET;
addr.sin_port = htons(port);
addr.sin_addr = *((struct in_addr *)host->h_addr);

str[0] = 255;
str[1] = 255;
str[2] = 255;
str[3] = 255;
str[4] = 2;
str[5] = 0;

sprintf(str + 5, "rcon %s ", argv[3]);

for(i = 4; i < argc; i++)
{
strcat(str, "\"");
strcat(str, argv[i]);
strcat(str, "\" ");
}

i = strlen(str) - 1;

str[i] = 0;
str[i+1] = 0x0a;

if(sendto(sock, str, i + 2, 0, &addr,
sizeof(struct sockaddr_in)) == -1)
{
perror("sendto");
return 1;
}

close(sock);
return 0;
}
[/code:079cc]
  
Reply With Quote
Old
  (#3)
DogMeat is Offline
Senior Member
 
Posts: 469
Join Date: Jan 2002
Location: Rockwood, MI
 Send a message via ICQ to DogMeat Send a message via AIM to DogMeat Send a message via MSN to DogMeat Send a message via Yahoo to DogMeat  
Default 10-31-2002, 06:35 AM

This may be where you found it, or it may be another program. See the bottom of the page for the RCON stuff.

[url:8d39a]http://stats.clanfx.com/[/url:8d39a]
  
Reply With Quote
Reply


Thread Tools
Display Modes

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.