banmessage = tag->getString("banmessage", "Your IP range has been attempting to connect too many times in too short a duration. Wait a while, and you will be able to connect.");
}
@@ -52,9+52,9 @@ class ModuleConnectBan : public Module
if (u->exempt)
return;
- int range = 32;
+ unsigned char range = 32;
- switch (u->client_sa.sa.sa_family)
+ switch (u->client_sa.family())
{
case AF_INET6:
range = ipv6_cidr;
@@ -73,7+73,7 @@ class ModuleConnectBan : public Module
if (i->second >= threshold)
{
- // Create zline for set duration.
+ // Create Z-line for set duration.
ZLine* zl = new ZLine(ServerInstance->Time(), banduration, ServerInstance->Config->ServerName, banmessage, mask.str());
if (!ServerInstance->XLines->AddLine(zl, NULL))
{
@@ -83,7+83,7 @@ class ModuleConnectBan : public Module