diff options
| author | Alexander Barton <alex@barton.de> | 2009-07-17 16:16:04 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2009-07-17 16:16:04 +0200 |
| commit | 805bf0349064a1a1f6412c19a3a3bcb7fb7ccbe1 (patch) | |
| tree | 2019bde5d5730ee1dddcd9a38a2c060f529b754d /src | |
| parent | 63cbc6cd4262971d0ef795d2404bc545413e159a (diff) | |
| download | ngircd-805bf0349064a1a1f6412c19a3a3bcb7fb7ccbe1.tar.gz ngircd-805bf0349064a1a1f6412c19a3a3bcb7fb7ccbe1.zip | |
Client_CheckID(): fix connection information
This patch fixes the following silly log messages: 'ID "XXX" already registered (on connection -1)!' If the ID is already registered on a local connection, the local connection ID is printed; and if the ID is connected via a remote server, "via network" is displayed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngircd/client.c b/src/ngircd/client.c index 50648c97..1edc7550 100644 --- a/src/ngircd/client.c +++ b/src/ngircd/client.c @@ -758,18 +758,18 @@ Client_CheckID( CLIENT *Client, char *ID ) assert( Client->conn_id > NONE ); assert( ID != NULL ); - /* Nick too long? */ + /* ID too long? */ if (strlen(ID) > CLIENT_ID_LEN) { IRC_WriteStrClient(Client, ERR_ERRONEUSNICKNAME_MSG, Client_ID(Client), ID); return false; } - /* does ID already exist? */ + /* ID already in use? */ c = My_Clients; while (c) { if (strcasecmp(c->id, ID) == 0) { snprintf(str, sizeof(str), "ID \"%s\" already registered", ID); - if (Client->conn_id != c->conn_id) + if (c->conn_id != NONE) Log(LOG_ERR, "%s (on connection %d)!", str, c->conn_id); else Log(LOG_ERR, "%s (via network)!", str); |