Commits

jilles  committed a380744

[svn] Remove server_exists() which checked whether the
server name existed taking hostmasking into account
and just check with find_server(); admittedly
this checks if the name is a SID but that's not
a real problem.

  • Participants
  • Parent commits 11a6e22

Comments (0)

Files changed (3)

+jilles      2007/02/01 00:19:14 UTC	(20070201-3177)
+  Log:
+  Remove hash_find_masked_server(), which made it possible
+  to specify the full (unmasked) name of a server behind
+  a hostmask. As a result find_any_client() (for prefixes)
+  becomes equal to find_client(), so remove that too.
+  
+
+  Changes:	Modified:
+  +0 -1		trunk/include/hash.h (File Modified) 
+  +1 -75	trunk/src/hash.c (File Modified) 
+  +1 -1		trunk/src/parse.c (File Modified) 
+
+
 jilles      2007/02/01 00:02:35 UTC	(20070201-3175)
   Log:
   Remove '*' from valid server name characters.

File include/serno.h

-#define SERNO "20070201-3175"
+#define SERNO "20070201-3177"

File modules/core/m_server.c

  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: m_server.c 2733 2006-11-10 00:04:08Z jilles $
+ *  $Id: m_server.c 3179 2007-02-01 00:34:33Z jilles $
  */
 
 #include "stdinc.h"
 
 mapi_clist_av1 server_clist[] = { &server_msgtab, &sid_msgtab, NULL };
 
-DECLARE_MODULE_AV1(server, NULL, NULL, server_clist, NULL, NULL, "$Revision: 2733 $");
+DECLARE_MODULE_AV1(server, NULL, NULL, server_clist, NULL, NULL, "$Revision: 3179 $");
 
 int bogus_host(const char *host);
-struct Client *server_exists(const char *);
 static int set_server_gecos(struct Client *, const char *);
 
 /*
 		break;
 	}
 
-	if((target_p = server_exists(name)))
+	if((target_p = find_server(NULL, name)))
 	{
 		/*
 		 * This link is trying feed me a server that I already have
 	hop = atoi(parv[2]);
 	strlcpy(info, parv[3], sizeof(info));
 
-	if((target_p = server_exists(name)))
+	if((target_p = find_server(NULL, name)))
 	{
 		/*
 		 * This link is trying feed me a server that I already have
 	hop = atoi(parv[2]);
 
 	/* collision on the name? */
-	if((target_p = server_exists(parv[1])) != NULL)
+	if((target_p = find_server(NULL, parv[1])) != NULL)
 	{
 		sendto_one(client_p, "ERROR :Server %s already exists", parv[1]);
 		sendto_realops_snomask(SNO_GENERAL, L_ALL,
 
 	return 0;
 }
-
-/*
- * server_exists()
- * 
- * inputs	- servername
- * output	- 1 if server exists, 0 if doesnt exist
- */
-struct Client *
-server_exists(const char *servername)
-{
-	struct Client *target_p;
-	dlink_node *ptr;
-
-	DLINK_FOREACH(ptr, global_serv_list.head)
-	{
-		target_p = ptr->data;
-
-		if(match(target_p->name, servername) || match(servername, target_p->name))
-			return target_p;
-	}
-
-	return NULL;
-}