diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-03 16:38:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-03 16:38:00 +0000 |
commit | 0b1c9c3507db83882a897038cdb5e84aded16e14 (patch) | |
tree | 20f8a3daf1acd81fa5108f0c439fd9f865df1395 /src/cmd_notice.cpp | |
parent | 9b4c7f385f0175f27e8d33de87827b65d89f5318 (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
Diffstat (limited to 'src/cmd_notice.cpp')
-rw-r--r-- | src/cmd_notice.cpp | 19 |
1 files changed, 11 insertions, 8 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; |