diff options
author | Attila Molnar <attilamolnar@hush.com> | 2016-02-22 12:52:18 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-02-22 12:52:18 +0100 |
commit | 0b63ccd0b5cb26883d6becb196fb98e4f95d0397 (patch) | |
tree | d9c660b46e106d76c5953579eca45e49c4486cbf /src/modules/m_namedmodes.cpp | |
parent | 7b6bd133ca4472f6cb8058d5e34e3c8b2af7e99a (diff) | |
parent | 1624ab03b86542a2cb02eda809303144974755f3 (diff) |
Merge insp20
Diffstat (limited to 'src/modules/m_namedmodes.cpp')
-rw-r--r-- | src/modules/m_namedmodes.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index 1735df924..617ee43b3 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -30,7 +30,12 @@ static void DisplayList(User* user, Channel* channel) continue; items << " +" << mh->name; if (mh->GetNumParams(true)) - items << " " << channel->GetModeParameter(mh); + { + if ((mh->name == "key") && (!channel->HasUser(user)) && (!user->HasPrivPermission("channels/auspex"))) + items << " <key>"; + else + items << " " << channel->GetModeParameter(mh); + } } const std::string line = ":" + ServerInstance->Config->ServerName + " 961 " + user->nick + " " + channel->name; user->SendText(line, items); @@ -64,6 +69,8 @@ class CommandProp : public Command while (i < parameters.size()) { std::string prop = parameters[i++]; + if (prop.empty()) + continue; bool plus = prop[0] != '-'; if (prop[0] == '+' || prop[0] == '-') prop.erase(prop.begin()); |