summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cmd_notice.cpp19
-rw-r--r--src/cmd_privmsg.cpp20
2 files changed, 22 insertions, 17 deletions
diff --git a/src/cmd_notice.cpp b/src/cmd_notice.cpp
index 581e49d1d..41122374d 100644
--- a/src/cmd_notice.cpp
+++ b/src/cmd_notice.cpp
@@ -87,15 +87,18 @@ void cmd_notice::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_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_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;
+ }
}
int MOD_RESULT = 0;
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];