about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-08-26 12:27:51 +0200
committerAlexander Barton <alex@barton.de>2012-08-26 12:27:51 +0200
commit9d8974d5098e9426f9185f31b2b3853e55513f3e (patch)
tree85375fc8f9fffc0eb4ea70341ad9d110b4d76c1d /src
parent037b4b76df6122f86d8c9536eb761664a5d71e53 (diff)
downloadngircd-9d8974d5098e9426f9185f31b2b3853e55513f3e.tar.gz
ngircd-9d8974d5098e9426f9185f31b2b3853e55513f3e.zip
Rename Conf_IsService() to Conf_NickIsService()
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/client.c4
-rw-r--r--src/ngircd/conf.c9
-rw-r--r--src/ngircd/conf.h2
3 files changed, 10 insertions, 5 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 49e27395..2466c717 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -1,6 +1,6 @@
 /*
  * 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
@@ -1175,7 +1175,7 @@ Client_Introduce(CLIENT *From, CLIENT *Client, int Type)
 	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).",
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 923cdc02..16ad98c2 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -636,13 +636,18 @@ Conf_AddServer(const char *Name, UINT16 Port, const char *Host,
 }
 
 /**
- * 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);
 }
 
diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h
index 4e7e3796..72c80390 100644
--- a/src/ngircd/conf.h
+++ b/src/ngircd/conf.h
@@ -244,7 +244,7 @@ GLOBAL bool Conf_EnablePassiveServer PARAMS((const char *Name));
 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];