Module: ngircd.git Branch: master Commit: 7adc4b8e99c64c150861c6ad5a197d88141afa13 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=7adc4...
Author: Federico G. Schwindt fgsch@lodoss.net Date: Thu Jul 18 19:52:17 2013 +0100
Handle services in IRC_WHOIS_SendReply()
If the target is a service, advertise it as such and ignore operator mode.
---
src/ngircd/irc-info.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c index 668f5ed..046648f 100644 --- a/src/ngircd/irc-info.c +++ b/src/ngircd/irc-info.c @@ -361,8 +361,15 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) return DISCONNECTED; }
+ /* IRC-Services? */ + if (Client_Type(c) == CLIENT_SERVICE && + !IRC_WriteStrClient(from, RPL_WHOISSERVICE_MSG, + Client_ID(from), Client_ID(c))) + return DISCONNECTED; + /* IRC-Operator? */ - if (Client_HasMode(c, 'o') && + if (Client_Type(c) != CLIENT_SERVICE && + Client_HasMode(c, 'o') && !IRC_WriteStrClient(from, RPL_WHOISOPERATOR_MSG, Client_ID(from), Client_ID(c))) return DISCONNECTED;
ngircd-commits@lists.barton.de