aboutsummaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-08-05 09:10:54 -0400
committerGravatar Daniel De Graaf2010-08-05 09:10:54 -0400
commit818f9f79047e27979720495dd67df8a6ead9d212 (patch)
treef1d44a54d60351c9992407c1c84f28a1e04e4c57 /src/mode.cpp
parentCall OnCheckJoin for override joins so hooks are still run (diff)
Allow OnParameterMissing to fill in the missing parameter
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 2e6f72d69..979413730 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -114,7 +114,7 @@ void ModeHandler::DisplayEmptyList(User*, Channel*)
{
}
-void ModeHandler::OnParameterMissing(User* user, User* dest, Channel* channel)
+void ModeHandler::OnParameterMissing(User* user, User* dest, Channel* channel, std::string& param)
{
}
@@ -511,8 +511,9 @@ void ModeParser::Parse(const std::vector<std::string>& parameters, User *user, E
if (pcnt && param_at == parameters.size())
{
/* No parameter, continue to the next mode */
- mh->OnParameterMissing(user, targetuser, targetchannel);
- continue;
+ mh->OnParameterMissing(user, targetuser, targetchannel, parameter);
+ if (parameter.empty())
+ continue;
}
else if (pcnt)
{