mirror of
https://github.com/anope/anope.git
synced 2026-07-06 12:53:14 +02:00
Simplify limit extraction code.
This commit is contained in:
+12
-12
@@ -28,21 +28,21 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
if (nick.length() > IRCD->GetMaxNick())
|
||||
if (nick.length() > IRCD->MaxNick)
|
||||
{
|
||||
source.Reply(_("Bot nicks may only be %zu characters long."), IRCD->GetMaxNick());
|
||||
source.Reply(_("Bot nicks may only be %zu characters long."), IRCD->MaxNick);
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.length() > IRCD->GetMaxUser())
|
||||
if (user.length() > IRCD->MaxUser)
|
||||
{
|
||||
source.Reply(_("Bot idents may only be %zu characters long."), IRCD->GetMaxUser());
|
||||
source.Reply(_("Bot idents may only be %zu characters long."), IRCD->MaxUser);
|
||||
return;
|
||||
}
|
||||
|
||||
if (host.length() > IRCD->GetMaxHost())
|
||||
if (host.length() > IRCD->MaxHost)
|
||||
{
|
||||
source.Reply(_("Bot hosts may only be %zu characters long."), IRCD->GetMaxHost());
|
||||
source.Reply(_("Bot hosts may only be %zu characters long."), IRCD->MaxHost);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,21 +118,21 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
if (nick.length() > IRCD->GetMaxNick())
|
||||
if (nick.length() > IRCD->MaxNick)
|
||||
{
|
||||
source.Reply(_("Bot nicks may only be %zu characters long."), IRCD->GetMaxNick());
|
||||
source.Reply(_("Bot nicks may only be %zu characters long."), IRCD->MaxNick);
|
||||
return;
|
||||
}
|
||||
|
||||
if (user.length() > IRCD->GetMaxUser())
|
||||
if (user.length() > IRCD->MaxUser)
|
||||
{
|
||||
source.Reply(_("Bot idents may only be %zu characters long."), IRCD->GetMaxUser());
|
||||
source.Reply(_("Bot idents may only be %zu characters long."), IRCD->MaxUser);
|
||||
return;
|
||||
}
|
||||
|
||||
if (host.length() > IRCD->GetMaxHost())
|
||||
if (host.length() > IRCD->MaxHost)
|
||||
{
|
||||
source.Reply(_("Bot hosts may only be %zu characters long."), IRCD->GetMaxHost()
|
||||
source.Reply(_("Bot hosts may only be %zu characters long."), IRCD->MaxHost
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user