a few adjustments
This commit is contained in:
parent
62f4d9e442
commit
fedf1e954a
@ -135,8 +135,8 @@ static TConnection *AssignConnection(int Socket, uint32 Addr, uint16 Port){
|
||||
"%d.%d.%d.%d:%d",
|
||||
((Connection->IPAddress >> 24) & 0xFF),
|
||||
((Connection->IPAddress >> 16) & 0xFF),
|
||||
((Connection->IPAddress >> 8) & 0xFF),
|
||||
((Connection->IPAddress >> 0) & 0xFF),
|
||||
((Connection->IPAddress >> 8) & 0xFF),
|
||||
((Connection->IPAddress >> 0) & 0xFF),
|
||||
(int)Port);
|
||||
LOG("Connection %s assigned to slot %d",
|
||||
Connection->RemoteAddress, ConnectionIndex);
|
||||
@ -577,8 +577,8 @@ void ProcessLoginRequest(TConnection *Connection){
|
||||
StringBufFormat(IPString, "%d.%d.%d.%d",
|
||||
((Connection->IPAddress >> 24) & 0xFF),
|
||||
((Connection->IPAddress >> 16) & 0xFF),
|
||||
((Connection->IPAddress >> 8) & 0xFF),
|
||||
((Connection->IPAddress >> 0) & 0xFF));
|
||||
((Connection->IPAddress >> 8) & 0xFF),
|
||||
((Connection->IPAddress >> 0) & 0xFF));
|
||||
|
||||
int NumCharacters = 0;
|
||||
int PremiumDays = 0;
|
||||
|
||||
12
src/main.cc
12
src/main.cc
@ -323,23 +323,23 @@ int UTF8EncodeOne(uint8 *Dest, int DestCapacity, int Codepoint){
|
||||
}
|
||||
|
||||
case 2:{
|
||||
Dest[0] = (uint8)(0xC0 | (0x1F & (Codepoint >> 6)));
|
||||
Dest[1] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
Dest[0] = (uint8)(0xC0 | (0x1F & (Codepoint >> 6)));
|
||||
Dest[1] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
break;
|
||||
}
|
||||
|
||||
case 3:{
|
||||
Dest[0] = (uint8)(0xE0 | (0x0F & (Codepoint >> 12)));
|
||||
Dest[1] = (uint8)(0x80 | (0x3F & (Codepoint >> 6)));
|
||||
Dest[2] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
Dest[1] = (uint8)(0x80 | (0x3F & (Codepoint >> 6)));
|
||||
Dest[2] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
break;
|
||||
}
|
||||
|
||||
case 4:{
|
||||
Dest[0] = (uint8)(0xF0 | (0x07 & (Codepoint >> 18)));
|
||||
Dest[1] = (uint8)(0x80 | (0x3F & (Codepoint >> 12)));
|
||||
Dest[2] = (uint8)(0x80 | (0x3F & (Codepoint >> 6)));
|
||||
Dest[3] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
Dest[2] = (uint8)(0x80 | (0x3F & (Codepoint >> 6)));
|
||||
Dest[3] = (uint8)(0x80 | (0x3F & (Codepoint >> 0)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "common.hh"
|
||||
|
||||
static int g_LastStatusRefresh = 0;
|
||||
static int g_LastStatusRefresh;
|
||||
static char g_StatusString[KB(2)];
|
||||
|
||||
struct XMLBuffer{
|
||||
@ -160,7 +160,7 @@ const char *GetStatusString(void){
|
||||
if(GetWorld(g_Config.StatusWorld, &World) == 0){
|
||||
WorldName = World.Name;
|
||||
if(World.LastStartup != 0 && World.LastStartup > World.LastShutdown){
|
||||
Uptime = (int)time(NULL) - World.LastStartup;
|
||||
Uptime = TimeNow - World.LastStartup;
|
||||
}
|
||||
NumPlayers = World.NumPlayers;
|
||||
MaxPlayers = World.MaxPlayers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user