]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/opserv.c
sync all done, dont worry the language files for en_UK (now en_GB) are still there...
[irc/evilnet/x3.git] / src / opserv.c
index 6c8cd14410a8c417b7a72c33be6c4c88a07777c5..626afda39c3a5d32458eee19ce22750579ac16eb 100644 (file)
@@ -1959,9 +1959,10 @@ int
 opserv_bad_channel(const char *name)
 {
     unsigned int found;
+    int present;
 
-    dict_find(opserv_exempt_channels, name, &found);
-    if (found)
+    dict_find(opserv_exempt_channels, name, &present);
+    if (present)
         return 0;
 
     if (gline_find(name))
@@ -2740,9 +2741,14 @@ opserv_add_user_alert(struct userNode *req, const char *name, opserv_alert_react
         alert->discrim->reason = strdup(name);
     alert->reaction = reaction;
     dict_insert(opserv_user_alerts, name_dup, alert);
-    if (alert->discrim->channel)
+    /* Stick the alert into the appropriate additional alert dict(s).
+     * For channel alerts, we only use channels and min_channels;
+     * max_channels would have to be checked on /part, which we do not
+     * yet do, and which seems of questionable value.
+     */
+    if (alert->discrim->channel || alert->discrim->min_channels)
         dict_insert(opserv_channel_alerts, name_dup, alert);
-    else if (alert->discrim->mask_nick)
+    if (alert->discrim->mask_nick)
         dict_insert(opserv_nick_based_alerts, name_dup, alert);
     return alert;
 }