From 7adc4b8e99c64c150861c6ad5a197d88141afa13 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Thu, 18 Jul 2013 19:52:17 +0100 Subject: [PATCH] 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 668f5ed6..046648fd 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;