Commit Diff


commit - c74083645a38a28dfb58a1091c0e7d4f522efb59
commit + bc4ed22635b00f4906ec1f8dcce44bc86bf00444
blob - 041073b542766d52ad055f1a603f6a252349dfe0
blob + 87e352759d2a4f05bae3946530a6c850b0fb09e3
--- src/ngircd/irc-channel.c
+++ src/ngircd/irc-channel.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-channel.c,v 1.2 2002/03/12 14:37:52 alex Exp $
+ * $Id: irc-channel.c,v 1.3 2002/03/25 17:08:54 alex Exp $
  *
  * irc-channel.c: IRC-Channel-Befehle
  */
@@ -47,7 +47,7 @@ GLOBAL BOOLEAN IRC_JOIN( CLIENT *Client, REQUEST *Req 
 	if(( Req->argc > 1 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
 	/* Wer ist der Absender? */
-	if( Client_Type( Client ) == CLIENT_SERVER ) target = Client_GetFromID( Req->prefix );
+	if( Client_Type( Client ) == CLIENT_SERVER ) target = Client_Search( Req->prefix );
 	else target = Client;
 	if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
 
@@ -144,7 +144,7 @@ GLOBAL BOOLEAN IRC_PART( CLIENT *Client, REQUEST *Req 
 	if(( Req->argc > 2 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
 	/* Wer ist der Absender? */
-	if( Client_Type( Client ) == CLIENT_SERVER ) target = Client_GetFromID( Req->prefix );
+	if( Client_Type( Client ) == CLIENT_SERVER ) target = Client_Search( Req->prefix );
 	else target = Client;
 	if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
 
@@ -180,7 +180,7 @@ GLOBAL BOOLEAN IRC_TOPIC( CLIENT *Client, REQUEST *Req
 	/* Falsche Anzahl Parameter? */
 	if(( Req->argc < 1 ) || ( Req->argc > 2 )) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
-	if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_GetFromID( Req->prefix );
+	if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
 	else from = Client;
 	if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->prefix );
 
blob - 48e2173a9490fd9d0d732e02e0ddc8f682b975a5
blob + c0fefe7759669998dffee43910b223cc951fa8a7
--- src/ngircd/irc-login.c
+++ src/ngircd/irc-login.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-login.c,v 1.9 2002/03/19 16:38:37 alex Exp $
+ * $Id: irc-login.c,v 1.10 2002/03/25 17:10:49 alex Exp $
  *
  * irc-login.c: Anmeldung und Abmeldung im IRC
  */
@@ -100,7 +100,7 @@ GLOBAL BOOLEAN IRC_NICK( CLIENT *Client, REQUEST *Req 
 		/* "Ziel-Client" ermitteln */
 		if( Client_Type( Client ) == CLIENT_SERVER )
 		{
-			target = Client_GetFromID( Req->prefix );
+			target = Client_Search( Req->prefix );
 			if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHNICK_MSG, Client_ID( Client ), Req->argv[0] );
 		}
 		else
@@ -162,7 +162,7 @@ GLOBAL BOOLEAN IRC_NICK( CLIENT *Client, REQUEST *Req 
 		if( Req->argc != 7 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
 
 		/* Nick ueberpruefen */
-		c = Client_GetFromID( Req->argv[0] );
+		c = Client_Search( Req->argv[0] );
 		if( c )
 		{
 			/* Der neue Nick ist auf diesem Server bereits registriert:
@@ -298,12 +298,12 @@ GLOBAL BOOLEAN IRC_PING( CLIENT *Client, REQUEST *Req 
 	if( Req->argc > 1 )
 	{
 		/* es wurde ein Ziel-Client angegeben */
-		target = Client_GetFromID( Req->argv[1] );
+		target = Client_Search( Req->argv[1] );
 		if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] );
 		if( target != Client_ThisServer( ))
 		{
 			/* ok, forwarden */
-			if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_GetFromID( Req->prefix );
+			if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
 			else from = Client;
 			if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->prefix );
 			return IRC_WriteStrClientPrefix( target, from, "PING %s :%s", Client_ID( from ), Req->argv[1] );
@@ -331,12 +331,12 @@ GLOBAL BOOLEAN IRC_PONG( CLIENT *Client, REQUEST *Req 
 	/* forwarden? */
 	if( Req->argc == 2 )
 	{
-		target = Client_GetFromID( Req->argv[1] );
+		target = Client_Search( Req->argv[1] );
 		if( ! target ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[1] );
 		if( target != Client_ThisServer( ))
 		{
 			/* ok, forwarden */
-			if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_GetFromID( Req->prefix );
+			if( Client_Type( Client ) == CLIENT_SERVER ) from = Client_Search( Req->prefix );
 			else from = Client;
 			if( ! from ) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->prefix );
 			return IRC_WriteStrClientPrefix( target, from, "PONG %s :%s", Client_ID( from ), Req->argv[1] );
@@ -398,7 +398,7 @@ LOCAL VOID Kill_Nick( CHAR *Nick, CHAR *Reason )
 	IRC_WriteStrServers( NULL, "KILL %s :%s", Nick, Reason );
 
 	/* Ggf. einen eigenen Client toeten */
-	c = Client_GetFromID( Nick );
+	c = Client_Search( Nick );
 	if( c && ( Client_Conn( c ) != NONE )) Conn_Close( Client_Conn( c ), NULL, Reason, TRUE );
 } /* Kill_Nick */
 
blob - db5772086ae2f8e7ff6274424e13068c42125470
blob + 6ea1d2681e1f05f0c32c380523e48ab256df2e27
--- src/ngircd/irc-server.c
+++ src/ngircd/irc-server.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: irc-server.c,v 1.6 2002/03/12 14:37:52 alex Exp $
+ * $Id: irc-server.c,v 1.7 2002/03/25 17:12:22 alex Exp $
  *
  * irc-server.c: IRC-Befehle fuer Server-Links
  */
@@ -200,7 +200,7 @@ GLOBAL BOOLEAN IRC_SERVER( CLIENT *Client, REQUEST *Re
 		ptr = strchr( Req->argv[3] + 2, '[' );
 		if( ! ptr ) ptr = Req->argv[3];
 
-		from = Client_GetFromID( Req->prefix );
+		from = Client_Search( Req->prefix );
 		if( ! from )
 		{
 			/* Hm, Server, der diesen einfuehrt, ist nicht bekannt!? */
@@ -262,7 +262,7 @@ GLOBAL BOOLEAN IRC_NJOIN( CLIENT *Client, REQUEST *Req
 			ptr++;
 		}
 
-		c = Client_GetFromID( ptr );
+		c = Client_Search( ptr );
 		if( c )
 		{
 			Channel_Join( c, channame );
@@ -315,7 +315,7 @@ GLOBAL BOOLEAN IRC_SQUIT( CLIENT *Client, REQUEST *Req
 	/* SQUIT an alle Server weiterleiten */
 	IRC_WriteStrServers( Client, "SQUIT %s :%s", Req->argv[0], Req->argv[1] );
 
-	target = Client_GetFromID( Req->argv[0] );
+	target = Client_Search( Req->argv[0] );
 	if( ! target )
 	{
 		/* Den Server kennen wir nicht (mehr), also nichts zu tun. */
blob - 636a867fb7175be754f8051f873d2526f0571451
blob + b1782ef40cb13d41b937d740eacfef2e7564f9f1
--- src/ngircd/parse.c
+++ src/ngircd/parse.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: parse.c,v 1.30 2002/03/12 14:37:52 alex Exp $
+ * $Id: parse.c,v 1.31 2002/03/25 17:13:46 alex Exp $
  *
  * parse.c: Parsen der Client-Anfragen
  */
@@ -224,7 +224,7 @@ LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Re
 		/* Befehl ist ein Statuscode */
 
 		/* Zielserver ermitteln */
-		if(( Client_Type( client ) == CLIENT_SERVER ) && ( Req->argc > 0 )) target = Client_GetFromID( Req->argv[0] );
+		if(( Client_Type( client ) == CLIENT_SERVER ) && ( Req->argc > 0 )) target = Client_Search( Req->argv[0] );
 		else target = NULL;
 		if( ! target )
 		{
@@ -244,7 +244,7 @@ LOCAL BOOLEAN Handle_Request( CONN_ID Idx, REQUEST *Re
 			Log( LOG_WARNING, "Got status code without prefix!?" );
 			return TRUE;
 		}
-		else prefix = Client_GetFromID( Req->prefix );
+		else prefix = Client_Search( Req->prefix );
 		if( ! prefix )
 		{
 			Log( LOG_WARNING, "Got status code from unknown source: \"%s\"", Req->prefix );