diff options
| author | Alexander Barton <alex@barton.de> | 2012-01-05 00:22:57 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-01-05 00:22:57 +0100 |
| commit | 566a451299cab41810bafc5ed11a5021e30d9b3d (patch) | |
| tree | 0d962492dbdadb49732d494cc1332c467373fab8 /src | |
| parent | e0f8ce093ad2cc389fe8ffd404addaf609451b3f (diff) | |
| download | ngircd-566a451299cab41810bafc5ed11a5021e30d9b3d.tar.gz ngircd-566a451299cab41810bafc5ed11a5021e30d9b3d.zip | |
WHOIS command: make sure the reply ends with RPL_ENDOFWHOIS
Up to now, each reply for itself ended in RPL_ENDOFWHOIS and queries for unknown nick names lacked the RPL_ENDOFWHOIS -- both is wrong.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-info.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 5e56949f..c2f4910e 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -1109,8 +1109,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) Client_Away(c))) return DISCONNECTED; - return IRC_WriteStrClient(from, RPL_ENDOFWHOIS_MSG, - Client_ID(from), Client_ID(c)); + return CONNECTED; } /* IRC_WHOIS_SendReply */ @@ -1219,10 +1218,12 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req ) } if (match_count == 0) - return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, - Client_ID(Client), Req->argv[Req->argc - 1]); + IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, + Client_ID(Client), + Req->argv[Req->argc - 1]); } - return CONNECTED; + return IRC_WriteStrClient(from, RPL_ENDOFWHOIS_MSG, + Client_ID(from), Req->argv[Req->argc - 1]); } /* IRC_WHOIS */ |