summaryrefslogtreecommitdiff
path: root/src/modules/m_namedmodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_namedmodes.cpp')
-rw-r--r--src/modules/m_namedmodes.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp
index 4db1f70b9..3e27092a7 100644
--- a/src/modules/m_namedmodes.cpp
+++ b/src/modules/m_namedmodes.cpp
@@ -35,9 +35,8 @@ static void DisplayList(User* user, Channel* channel)
if (mh->GetNumParams(true))
items << " " << channel->GetModeParameter(letter);
}
- char pfx[MAXBUF];
- snprintf(pfx, MAXBUF, ":%s 961 %s %s", ServerInstance->Config->ServerName.c_str(), user->nick.c_str(), channel->name.c_str());
- user->SendText(std::string(pfx), items);
+ const std::string line = ":" + ServerInstance->Config->ServerName + " 961 " + user->nick + " " + channel->name;
+ user->SendText(line, items);
user->WriteNumeric(960, "%s %s :End of mode list", user->nick.c_str(), channel->name.c_str());
}
@@ -106,7 +105,7 @@ class ModuleNamedModes : public Module
{
}
- void init()
+ void init() CXX11_OVERRIDE
{
ServerInstance->Modules->AddService(cmd);
ServerInstance->Modules->AddService(dummyZ);
@@ -115,7 +114,7 @@ class ModuleNamedModes : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the ability to manipulate modes via long names.",VF_VENDOR);
}
@@ -125,7 +124,7 @@ class ModuleNamedModes : public Module
ServerInstance->Modules->SetPriority(this, I_OnPreMode, PRIORITY_FIRST);
}
- ModResult OnPreMode(User* source, User* dest, Channel* channel, const std::vector<std::string>& parameters)
+ ModResult OnPreMode(User* source, User* dest, Channel* channel, const std::vector<std::string>& parameters) CXX11_OVERRIDE
{
if (!channel)
return MOD_RES_PASSTHRU;