summaryrefslogtreecommitdiff
path: root/src/modules/m_namedmodes.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-22 21:49:58 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-22 21:49:58 +0000
commit4663fd393f925e0ff976dddd8df42cab3e5d2893 (patch)
treef062e496e0367dfa7d04a6e3eb53773854dfe5ff /src/modules/m_namedmodes.cpp
parentb332dda6a32f4033bfd7d9dd86150e1c23e3cf62 (diff)
Display namedmodes on a single line
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11955 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_namedmodes.cpp')
-rw-r--r--src/modules/m_namedmodes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp
index bc8279f69..6f6dda491 100644
--- a/src/modules/m_namedmodes.cpp
+++ b/src/modules/m_namedmodes.cpp
@@ -46,6 +46,7 @@ class ModuleNamedModes : public Module
void DisplayList(User* user, Channel* channel)
{
+ std::stringstream items;
for(char letter = 'A'; letter <= 'z'; letter++)
{
ModeHandler* mh = ServerInstance->Modes->FindMode(letter, MODETYPE_CHANNEL);
@@ -56,8 +57,11 @@ class ModuleNamedModes : public Module
std::string item = mh->name;
if (mh->GetNumParams(true))
item += "=" + channel->GetModeParameter(letter);
- user->WriteNumeric(961, "%s %s %s", user->nick.c_str(), channel->name.c_str(), item.c_str());
+ items << item << " ";
}
+ 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);
user->WriteNumeric(960, "%s %s :End of mode list", user->nick.c_str(), channel->name.c_str());
}