1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 14:23:13 +02:00

Simplify limit extraction code.

This commit is contained in:
Sadie Powell
2024-03-12 12:22:57 +00:00
parent 63d682314b
commit 06add0e5fc
12 changed files with 58 additions and 121 deletions
+1 -11
View File
@@ -12,11 +12,6 @@
#include "module.h"
#include "numeric.h"
namespace
{
size_t nicklen = 0;
}
class ngIRCdProto final
: public IRCDProto
{
@@ -37,11 +32,6 @@ public:
MaxModes = 5;
}
size_t GetMaxNick() override
{
return nicklen ? nicklen : IRCDProto::GetMaxNick();
}
void SendAkill(User *u, XLine *x) override
{
// Calculate the time left before this would expire
@@ -182,7 +172,7 @@ struct IRCDMessage005 final
}
else if (parameter == "NICKLEN")
{
nicklen = Anope::Convert<size_t>(data, 0);
IRCD->MaxNick = Anope::Convert<size_t>(data, IRCD->MaxNick);
}
}
}