Started implementing protocol version 1.1 and narrowing down
[silc.git] / apps / silcd / server_util.c
index 147346dea24c7ec8e68c1863c3b710aab77029ab..01870b9593dd545d81e6c7f0d18937bc3177c2f8 100644 (file)
@@ -1056,6 +1056,28 @@ bool silc_server_check_cmode_rights(SilcServer server,
     }
   }
   
+  if (mode & SILC_CHANNEL_MODE_SILENCE_USERS) {
+    if (!(channel->mode & SILC_CHANNEL_MODE_SILENCE_USERS))
+      if (is_op && !is_fo)
+       return FALSE;
+  } else {
+    if (channel->mode & SILC_CHANNEL_MODE_SILENCE_USERS) {
+      if (is_op && !is_fo)
+       return FALSE;
+    }
+  }
+  
+  if (mode & SILC_CHANNEL_MODE_SILENCE_OPERS) {
+    if (!(channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS))
+      if (is_op && !is_fo)
+       return FALSE;
+  } else {
+    if (channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS) {
+      if (is_op && !is_fo)
+       return FALSE;
+    }
+  }
+  
   return TRUE;
 }