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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user