mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-15 17:08:21 +00:00
Add a rule, MaxClientsSimplifiedLogic which allows for P99-style IP restrictions if enabled. Opcode handler for OP_WorldLogout in char sel.
Only uses ExemptAccountLimitStatus and MaxClientsPerIP. Also adds in an opcode handler so CLEs are cleaned up at char select when ESC is pressed.
This commit is contained in:
@@ -134,11 +134,26 @@ bool LoginServer::Process() {
|
||||
if( (int32)numplayers >= x && x != -1 && x != 255 && status < 80)
|
||||
utwrs->response = -3;
|
||||
|
||||
|
||||
if (pack->size == sizeof(UsertoWorldRequest_Struct))
|
||||
{
|
||||
uint32 decimalIP = inet_addr(utwr->IPAddr);
|
||||
|
||||
if (RuleB(World, MaxClientsSimplifiedLogic)) {
|
||||
if (client_list.GetCLEIPCount(decimalIP) >= (RuleI(World, MaxClientsPerIP))) {
|
||||
if ((status < (RuleI(World, ExemptMaxClientsStatus))) || (RuleI(World, ExemptMaxClientsStatus) < 0)) {
|
||||
utwrs->response = -4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(status == -1)
|
||||
utwrs->response = -1;
|
||||
if(status == -2)
|
||||
utwrs->response = -2;
|
||||
|
||||
|
||||
utwrs->worldid = utwr->worldid;
|
||||
SendPacket(outpack);
|
||||
delete outpack;
|
||||
|
||||
Reference in New Issue
Block a user