summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 16:38:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-03 16:38:00 +0000
commit0b1c9c3507db83882a897038cdb5e84aded16e14 (patch)
tree20f8a3daf1acd81fa5108f0c439fd9f865df1395
parent9b4c7f385f0175f27e8d33de87827b65d89f5318 (diff)
Allow for NOTICE and PRIVMSG from outside chan with a remote client
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3045 e03df62e-2008-0410-955e-edbf42e46eb7
-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];