]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/irc.c
User mode "C": Allow messages from servers, services, and IRC Ops
[ngircd.git] / src / ngircd / irc.c
index 7acd84ee7857fa0a9a3b5e7af54b9384c9547f0f..12fd8214f4235165941b3606f99b112d08284f42 100644 (file)
@@ -483,11 +483,8 @@ Help(CLIENT *Client, const char *Topic)
  * @return Pointer to static (global) string buffer.
  */
 static char *
-#ifdef ZLIB
+#if defined(SSL_SUPPORT) || defined(ZLIB)
 Option_String(CONN_ID Idx)
-#else
-Option_String(UNUSED CONN_ID Idx)
-#endif
 {
        static char option_txt[8];
        UINT16 options;
@@ -507,6 +504,11 @@ Option_String(UNUSED CONN_ID Idx)
 #endif
 
        return option_txt;
+#else
+Option_String(UNUSED CONN_ID Idx)
+{
+       return "";
+#endif
 } /* Option_String */
 
 /**
@@ -692,7 +694,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
                                goto send_next_target;
                        }
 
-                       if (Client_HasMode(cl, 'C')) {
+                       if (Client_HasMode(cl, 'C') &&
+                           !Client_HasMode(from, 'o') &&
+                           !(Client_Type(from) == CLIENT_SERVER) &&
+                           !(Client_Type(from) == CLIENT_SERVICE)) {
                                cl2chan = Channel_FirstChannelOf(cl);
                                while (cl2chan) {
                                        chan = Channel_GetChannel(cl2chan);