From 0b1c9c3507db83882a897038cdb5e84aded16e14 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 3 Feb 2006 16:38:00 +0000 Subject: 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 --- src/cmd_notice.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/cmd_notice.cpp') 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)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)fd,"404 %s %s :Cannot send to channel (+m)", user->nick, chan->name); + return; + } } int MOD_RESULT = 0; -- cgit v1.2.3