mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 23:20:25 +00:00
[Feature] Exempt a zone from IP-limit checks. (#4137)
* Exempt zone from IP checks * [Feature] Add Support for String-based Rules # Notes - Add support for string-based rules. # Images * convert to comma-seperated list * Forgot to convert the zone to a string * Update lua_general.cpp * fixed rule name * use the local string methods instead * I think this will work as desired without the extra condition --------- Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
@@ -96,6 +96,15 @@ void ClientList::GetCLEIP(uint32 in_ip) {
|
||||
|
||||
while (iterator.MoreElements()) {
|
||||
cle = iterator.GetData();
|
||||
|
||||
const auto zones = Strings::Split(RuleS(World, IPExemptionZones), ",");
|
||||
for (const auto &z : zones) {
|
||||
if (Strings::ToUnsignedInt(z) == cle->zone()) {
|
||||
iterator.Advance();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
cle->GetIP() == in_ip &&
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user