]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
Merge branch 'umode-B'
[ngircd-alex.git] / src / ngircd / conf.c
index 16ad98c21a40c185cc5b371f387e0372a3ee2cbe..3966dc908a1afff2bf5a95901c8cff6427b91524 100644 (file)
@@ -648,7 +648,29 @@ Conf_NickIsService(int ConfServer, const char *Nick)
        assert (ConfServer >= 0);
        assert (ConfServer < MAX_SERVERS);
 
-       return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
+       return MatchCaseInsensitiveList(Conf_Server[ConfServer].svs_mask,
+                                       Nick, ",");
+}
+
+/**
+ * Check if the given nick name is blocked for "normal client" use.
+ *
+ * @param ConfServer The server index or NONE to check all configured servers.
+ * @param Nick The nick name to check.
+ * @returns true if the given nick name belongs to an "IRC service".
+ */
+GLOBAL bool
+Conf_NickIsBlocked(const char *Nick)
+{
+       int i;
+
+       for(i = 0; i < MAX_SERVERS; i++) {
+               if (!Conf_Server[i].name[0])
+                       continue;
+               if (Conf_NickIsService(i, Nick))
+                       return true;
+       }
+       return false;
 }
 
 /**