Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Archived Forums » RenGuard Servers » SS Master Server Connection
SS Master Server Connection [message #185298] Tue, 10 January 2006 20:28 Go to next message
theplague is currently offline  theplague
Messages: 261
Registered: May 2004
Karma: 0
Recruit
Am i doing something wrong? :S i'm following the instructions from SSC.txt formt eh brenbot site of mac...

it just dosn't show up on the server listings :S

here is a few parts i use:
while (RgConnected == false) {
	if (connect(RgSocket, (SOCKADDR *)(&RgAddr), sizeof(RgAddr)) == 0) {
		send_rgsock_raw("123456789\n");
		RgConnected = true;
		printf("Renguard Master Server Connection Established to Master Server %d! On %s:6382\n", serveri, server);
		char tmp[1024], tmp2[1024];
		sprintf(tmp, "300 XpzElite/%f", hard_ver);
		send_rg(tmp);
		getProfileString("Settings","bGameTitle","Xphaze",tmp2,1024,"data\\svrcfg_cnc.ini");
		sprintf(tmp, "310 %s", tmp2);
		send_rg(tmp);
		send_rg("340");
		sprintf(tmp, "320 %s", CurrMap);
		send_rg(tmp);
		RgRotation();
	}
}

void send_rg(char *text) {
	// using this you can like send things normaly (eg: 830 C&C_Glacier_Flying.mix << crap map)
	char text2[2048];
	std::string base64 = base64_encode(reinterpret_cast<const unsigned char*>(text), strlen(text));
	sprintf(text2, "%s\n", base64.c_str());
	send(RgSocket, text2, strlen(text2), 0);
}

void send_rgsock_raw(const char *text) {
	send(RgSocket, text, strlen(text), 0);
	printf("%s sent", text);
}

std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) {
  std::string ret;
  int i = 0;
  int j = 0;
  unsigned char char_array_3[3];
  unsigned char char_array_4[4];

  while (in_len--) {
    char_array_3[i++] = *(bytes_to_encode++);
    if (i == 3) {
      char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
      char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
      char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
      char_array_4[3] = char_array_3[2] & 0x3f;

      for(i = 0; (i <4) ; i++)
        ret += base64_chars[char_array_4[i]];
      i = 0;
    }
  }

  if (i)
  {
    for(j = i; j < 3; j++)
      char_array_3[j] = '\0';

    char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
    char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
    char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
    char_array_4[3] = char_array_3[2] & 0x3f;

    for (j = 0; (j < i + 1); j++)
      ret += base64_chars[char_array_4[j]];

    while((i++ < 3))
      ret += '=';

  }

  return ret;

}

static const std::string base64_chars = 
             "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
             "abcdefghijklmnopqrstuvwxyz"
             "0123456789+/";


http://users.tpg.com.au/ling44/av_firefox.gifhttp://users.tpg.com.au/ling44/av_rg.gif

[Updated on: Tue, 10 January 2006 20:29]

Report message to a moderator

Re: SS Master Server Connection [message #185319 is a reply to message #185298] Wed, 11 January 2006 01:39 Go to previous messageGo to next message
andysh is currently offline  andysh
Messages: 45
Registered: August 2004
Location: Papamoa, New Zealand
Karma: 0
Recruit
I can tell that the sever has connected by doing the !rginfo stuff on another renguard server. But as theplague said its not showing up in the listings? Dont Get It

Btw, i am working on this with theplague.
Re: SS Master Server Connection [message #186447 is a reply to message #185298] Fri, 20 January 2006 17:44 Go to previous messageGo to next message
Kanezor is currently offline  Kanezor
Messages: 855
Registered: February 2005
Location: Sugar Land, TX, USA
Karma: 0
Colonel
If you are still having trouble, please contact me (inetknght) in #bhs_support on irc.n00bstories.com.


---
http://www.eve-online.com/download/banners/files/468x60_02.jpg
Re: SS Master Server Connection [message #186486 is a reply to message #185298] Sat, 21 January 2006 05:42 Go to previous message
=HT=T-Bird is currently offline  =HT=T-Bird
Messages: 712
Registered: June 2005
Karma: 0
Colonel
Could you PM me a link to that file you're talking about? Listen

HTT-Bird (IRC)
HTTBird (WOL)
Proud HazTeam Lieutenant.
BlackIntel Coder & Moderator.

If you have trouble running BIATCH on your FDS, have some questions about a BIATCH message or log entry, or think that BIATCH spit out a false positive, PLEASE contact the BlackIntel coding team and avoid wasting the time of others.
Previous Topic: Need to bring this to BHS's attention
Next Topic: Server side RenGuard don't auth me
Goto Forum:
  


Current Time: Wed Dec 11 16:05:32 MST 2024

Total time taken to generate the page: 0.01668 seconds