diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-10 20:54:12 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-10 20:54:12 +0000 |
commit | 23b0ee51ed995673949540ce8bb79ff3de06cef3 (patch) | |
tree | 8b64c7392205ff640c278eb366e2ca1b38ecb87c | |
parent | 87ad22b6067534329f76acc45fdad8e09688db65 (diff) |
Change display of PROP list to match the input format
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12424 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_namedmodes.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 1ba39b54a..638d1d29c 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -23,10 +23,9 @@ static void DisplayList(User* user, Channel* channel) continue; if (!channel->IsModeSet(letter)) continue; - std::string item = mh->name; + items << " +" << mh->name; if (mh->GetNumParams(true)) - item += "=" + channel->GetModeParameter(letter); - items << item << " "; + 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()); @@ -70,9 +69,8 @@ class CommandProp : public Command modes[1].append((plus ? "+" : "-") + std::string(1, letter)); if (mh->GetNumParams(plus)) { - if (i == parameters.size()) - return CMD_FAILURE; - modes.push_back(parameters[i++]); + if (i != parameters.size()) + modes.push_back(parameters[i++]); } } } @@ -93,6 +91,7 @@ class ModuleNamedModes : public Module void init() { ServerInstance->Modules->AddService(cmd); + Implementation eventlist[] = { I_OnPreMode, I_On005Numeric }; ServerInstance->Modules->Attach(eventlist, this, 2); } |