puts("[LIMITS]");
printf(" ConnectRetry = %d\n", Conf_ConnectRetry);
- printf(" MaxConnections = %ld\n", Conf_MaxConnections);
+ printf(" MaxConnections = %d\n", Conf_MaxConnections);
printf(" MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
printf(" MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1);
printf(" MaxNickLength = %u\n", Conf_MaxNickLength - 1);
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;
}
/**
return;
}
if (strcasecmp(Var, "MaxConnections") == 0) {
- Conf_MaxConnections = atol(Arg);
+ Conf_MaxConnections = atoi(Arg);
if (!Conf_MaxConnections && strcmp(Arg, "0"))
Config_Error_NaN(Line, Var);
return;