summaryrefslogtreecommitdiff
path: root/modules/commands/os_svs.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/commands/os_svs.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/commands/os_svs.cpp')
-rw-r--r--modules/commands/os_svs.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/commands/os_svs.cpp b/modules/commands/os_svs.cpp
index 13b29e84c..9fb1d63c3 100644
--- a/modules/commands/os_svs.cpp
+++ b/modules/commands/os_svs.cpp
@@ -34,11 +34,12 @@ class CommandOSSVSNick : public Command
return;
}
- /* Truncate long nicknames to Config->NickLen characters */
- if (newnick.length() > Config->NickLen)
+ /* Truncate long nicknames to nicklen characters */
+ unsigned nicklen = Config->GetBlock("networkinfo")->Get<unsigned>("nicklen");
+ if (newnick.length() > nicklen)
{
- source.Reply(_("Nick \002%s\002 was truncated to %d characters."), newnick.c_str(), Config->NickLen, newnick.c_str());
- newnick = params[1].substr(0, Config->NickLen);
+ source.Reply(_("Nick \002%s\002 was truncated to %d characters."), newnick.c_str(), nicklen, newnick.c_str());
+ newnick = params[1].substr(0, nicklen);
}
/* Check for valid characters */