summaryrefslogtreecommitdiff
path: root/modules/hostserv
diff options
context:
space:
mode:
Diffstat (limited to 'modules/hostserv')
-rw-r--r--modules/hostserv/hs_request.cpp8
-rw-r--r--modules/hostserv/hs_set.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/hostserv/hs_request.cpp b/modules/hostserv/hs_request.cpp
index 25f089647..44612ada0 100644
--- a/modules/hostserv/hs_request.cpp
+++ b/modules/hostserv/hs_request.cpp
@@ -124,9 +124,9 @@ public:
if (!user.empty())
{
- if (user.length() > Config->GetBlock("networkinfo")->Get<unsigned>("userlen"))
+ if (user.length() > IRCD->GetMaxUser())
{
- source.Reply(HOST_SET_IDENTTOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("userlen"));
+ source.Reply(HOST_SET_IDENTTOOLONG, IRCD->GetMaxUser());
return;
}
else if (!IRCD->CanSetVIdent)
@@ -144,9 +144,9 @@ public:
}
}
- if (host.length() > Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"))
+ if (host.length() > IRCD->GetMaxHost())
{
- source.Reply(HOST_SET_TOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"));
+ source.Reply(HOST_SET_TOOLONG, IRCD->GetMaxHost());
return;
}
diff --git a/modules/hostserv/hs_set.cpp b/modules/hostserv/hs_set.cpp
index e35f4d3b9..f923057c2 100644
--- a/modules/hostserv/hs_set.cpp
+++ b/modules/hostserv/hs_set.cpp
@@ -71,9 +71,9 @@ public:
}
}
- if (host.length() > Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"))
+ if (host.length() > IRCD->GetMaxHost())
{
- source.Reply(HOST_SET_TOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"));
+ source.Reply(HOST_SET_TOOLONG, IRCD->GetMaxHost());
return;
}
@@ -177,9 +177,9 @@ public:
}
}
- if (host.length() > Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"))
+ if (host.length() > IRCD->GetMaxHost())
{
- source.Reply(HOST_SET_TOOLONG, Config->GetBlock("networkinfo")->Get<unsigned>("hostlen"));
+ source.Reply(HOST_SET_TOOLONG, IRCD->GetMaxHost());
return;
}