mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Add %BAN
This commit is contained in:
parent
9f44620fd7
commit
49522e9fef
8 changed files with 165 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using HISP.Player;
|
||||
|
@ -125,10 +126,11 @@ namespace HISP.Server
|
|||
Client.Kick(Messages.KickReasonDuplicateLogin);
|
||||
}
|
||||
}
|
||||
|
||||
LoggedinUser = new User(this,id);
|
||||
LoggedIn = true;
|
||||
|
||||
Database.SetIpAddress(id, RemoteIp);
|
||||
|
||||
updateTimer = new Timer(new TimerCallback(updateTimerTick), null, updateInterval, updateInterval);
|
||||
inactivityTimer = new Timer(new TimerCallback(keepAliveTimerTick), null, keepAliveInterval, keepAliveInterval);
|
||||
}
|
||||
|
@ -332,6 +334,9 @@ namespace HISP.Server
|
|||
{
|
||||
ClientSocket = clientSocket;
|
||||
RemoteIp = clientSocket.RemoteEndPoint.ToString();
|
||||
|
||||
if(RemoteIp.Contains(":"))
|
||||
RemoteIp = RemoteIp.Substring(0, RemoteIp.IndexOf(":"));
|
||||
|
||||
Logger.DebugPrint("Client connected @ " + RemoteIp);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue