summaryrefslogtreecommitdiff
path: root/src/modes/cmode_v.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cmode_v.cpp')
-rw-r--r--src/modes/cmode_v.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp
index 87d391109..a72e6bf18 100644
--- a/src/modes/cmode_v.cpp
+++ b/src/modes/cmode_v.cpp
@@ -26,6 +26,23 @@ ModeChannelVoice::ModeChannelVoice() : ModeHandler('v', 1, 1, true, MODETYPE_CHA
{
}
+std::pair<bool,std::string> ModeChannelVoice::ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string &parameter)
+{
+ userrec* x = Find(parameter);
+ if (x)
+ {
+ if (cstatus(x, channel) == STATUS_VOICE)
+ {
+ return std::make_pair(true, x->nick);
+ }
+ else
+ {
+ return std::make_pair(false, parameter);
+ }
+ }
+ return std::make_pair(false, parameter);
+}
+
ModeAction ModeChannelVoice::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string &parameter, bool adding)
{
int status = cstatus(source, channel);