Don't allow remote servers to send messages to our &channels (Bug #721494)
[ircu2.10.12-pk.git] / ircd / ircd_relay.c
index 3ac0850e3a9ef1bf8a645a8a7431d898a06c612a..f2bf04dfdca6e638f29b6ecb1756f28219058143 100644 (file)
@@ -110,7 +110,7 @@ void server_relay_channel_message(struct Client* sptr, const char* name, const c
   assert(0 != name);
   assert(0 != text);
 
-  if (0 == (chptr = FindChannel(name))) {
+  if (IsLocalChannel(name) || 0 == (chptr = FindChannel(name))) {
     /*
      * XXX - do we need to send this back from a remote server?
      */
@@ -136,7 +136,7 @@ void server_relay_channel_notice(struct Client* sptr, const char* name, const ch
   assert(0 != name);
   assert(0 != text);
 
-  if (0 == (chptr = FindChannel(name)))
+  if (IsLocalChannel(name) || 0 == (chptr = FindChannel(name)))
     return;
   /*
    * This first: Almost never a server/service