summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index eaee04f75..22e9816b3 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1290,6 +1290,11 @@ void handle_mode(char **parameters, int pcnt, userrec *user)
return;
}
}
+ if ((Ptr) && (!has_channel(user,Ptr)))
+ {
+ WriteServ(user->fd,"442 %s %s :You're not on that channel!",user->nick, Ptr->name);
+ return;
+ }
process_modes(parameters,user,Ptr,cstatus(user,Ptr),pcnt,false,false,false);
}