aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/connections.cc8
-rw-r--r--src/main.cc12
-rw-r--r--src/status.cc4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/connections.cc b/src/connections.cc
index 774a21d..548b073 100644
--- a/src/connections.cc
+++ b/src/connections.cc
@@ -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;
diff --git a/src/main.cc b/src/main.cc
index 637da2f..b7fec46 100644
--- a/src/main.cc
+++ b/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;
}
}
diff --git a/src/status.cc b/src/status.cc
index 8399e98..3748c1d 100644
--- a/src/status.cc
+++ b/src/status.cc
@@ -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;