X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fclient.c;h=ecd1a7c5fb462cdd6f319578376a42dccb7eb09a;hp=d53dc969cd47269c65f73314b4b8b55d95de66d2;hb=36d4f6c6015a0c93a2785e135d43dc8f23797b38;hpb=355828e64f6fa07eb96bc6b27eef964b529d8778 diff --git a/src/ngircd/client.c b/src/ngircd/client.c index d53dc969..ecd1a7c5 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -363,7 +363,8 @@ Client_SetUser( CLIENT *Client, const char *User, bool Idented ) * @param User User name to set. */ GLOBAL void -Client_SetOrigUser(CLIENT UNUSED *Client, const char UNUSED *User) { +Client_SetOrigUser(CLIENT UNUSED *Client, const char UNUSED *User) +{ assert(Client != NULL); assert(User != NULL); @@ -552,17 +553,19 @@ Client_Search( const char *Nick ) } /* Client_Search */ +/** + * Get client structure ("introducer") identfied by a server token. + * @return CLIENT structure or NULL if none could be found. + */ GLOBAL CLIENT * Client_GetFromToken( CLIENT *Client, int Token ) { - /* Client-Struktur, die den entsprechenden Introducer (=Client) - * und das gegebene Token hat, liefern. Wird keine gefunden, - * so wird NULL geliefert. */ - CLIENT *c; assert( Client != NULL ); - assert( Token > 0 ); + + if (!Token) + return NULL; c = My_Clients; while (c) { @@ -1285,7 +1288,7 @@ Client_DebugDump(void) c = My_Clients; while (c) { Log(LOG_DEBUG, - " - %s, type=%d, host=%s, user=%s, conn=%d, start=%ld, flags=%s", + " - %s: type=%d, host=%s, user=%s, conn=%d, start=%ld, flags=%s", Client_ID(c), Client_Type(c), Client_Hostname(c), Client_User(c), Client_Conn(c), Client_StartTime(c), Client_Flags(c));