/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2012 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Client_SetType(Client, Type);
if (From) {
- if (Conf_IsService(Conf_GetServer(Client_Conn(From)),
+ if (Conf_NickIsService(Conf_GetServer(Client_Conn(From)),
Client_ID(Client)))
Client_SetType(Client, CLIENT_SERVICE);
LogDebug("%s \"%s\" (+%s) registered (via %s, on %s, %d hop%s).",
}
/**
- * Check if the given nick name is an service.
+ * Check if the given nick name is reserved for services on a particular server.
*
+ * @param ConfServer The server index to check.
+ * @param Nick The nick name to check.
* @returns true if the given nick name belongs to an "IRC service".
*/
GLOBAL bool
-Conf_IsService(int ConfServer, const char *Nick)
+Conf_NickIsService(int ConfServer, const char *Nick)
{
+ assert (ConfServer >= 0);
+ assert (ConfServer < MAX_SERVERS);
+
return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
}
GLOBAL bool Conf_DisableServer PARAMS(( const char *Name ));
GLOBAL bool Conf_AddServer PARAMS(( const char *Name, UINT16 Port, const char *Host, const char *MyPwd, const char *PeerPwd ));
-GLOBAL bool Conf_IsService PARAMS((int ConfServer, const char *Nick));
+GLOBAL bool Conf_NickIsService PARAMS((int ConfServer, const char *Nick));
/* Password required by WEBIRC command */
GLOBAL char Conf_WebircPwd[CLIENT_PASS_LEN];