summaryrefslogtreecommitdiff
path: root/src/cmd_privmsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_privmsg.cpp')
-rw-r--r--src/cmd_privmsg.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/cmd_privmsg.cpp b/src/cmd_privmsg.cpp
index ae17a2269..55ff8fb36 100644
--- a/src/cmd_privmsg.cpp
+++ b/src/cmd_privmsg.cpp
@@ -87,17 +87,19 @@ void cmd_privmsg::Handle (char **parameters, int pcnt, userrec *user)
chan = FindChan(parameters[0]);
if (chan)
{
- if ((chan->binarymodes & CM_NOEXTERNAL) && (!has_channel(user,chan)))
+ if (IS_LOCAL(user))
{
- WriteServ(user->fd,"404 %s %s :Cannot send to channel (no external messages)", user->nick, chan->name);
- return;
+ if ((chan->binarymodes & CM_NOEXTERNAL) && (!has_channel(user,chan)))
+ {
+ WriteServ(user->fd,"404 %s %s :Cannot send to channel (no external messages)", user->nick, chan->name);
+ return;
+ }
+ if ((chan->binarymodes & CM_MODERATED) && (cstatus(user,chan)<STATUS_VOICE))
+ {
+ WriteServ(user->fd,"404 %s %s :Cannot send to channel (+m)", user->nick, chan->name);
+ return;
+ }
}
- if ((chan->binarymodes & CM_MODERATED) && (cstatus(user,chan)<STATUS_VOICE))
- {
- WriteServ(user->fd,"404 %s %s :Cannot send to channel (+m)", user->nick, chan->name);
- return;
- }
-
int MOD_RESULT = 0;
std::string temp = parameters[1];