Module: ngircd.git Branch: master Commit: fee591b7597dfd9b438b6902d7971787dfd69d60 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=fee59...
Author: Alexander Barton alex@barton.de Date: Sun Aug 26 16:51:34 2012 +0200
Remove Can_Send_To_Channel_Identified()
Move the functionality directly into Can_Send_To_Channel() function. There should be no functional change ...
---
src/ngircd/channel.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index 1d1645f..0f21a45 100644 --- a/src/ngircd/channel.c +++ b/src/ngircd/channel.c @@ -832,26 +832,14 @@ Can_Send_To_Channel(CHANNEL *Chan, CLIENT *From) if (strchr(Channel_Modes(Chan), 'n') && !is_member) return false;
- if (is_op || has_voice) - return true; - - if (strchr(Channel_Modes(Chan), 'm')) + if (strchr(Channel_Modes(Chan), 'M') && !Client_HasMode(From, 'R') + && !Client_HasMode(From, 'o')) return false;
- if (Lists_Check(&Chan->list_excepts, From)) - return true; - - return !Lists_Check(&Chan->list_bans, From); -} - - -static bool -Can_Send_To_Channel_Identified(CHANNEL *Chan, CLIENT *From) -{ - if ((Client_ThisServer() == From) || Client_HasMode(From, 'o')) + if (is_op || has_voice) return true;
- if (strchr(Channel_Modes(Chan), 'M') && !Client_HasMode(From, 'R')) + if (strchr(Channel_Modes(Chan), 'm')) return false;
if (Lists_Check(&Chan->list_excepts, From)) @@ -872,13 +860,6 @@ Channel_Write(CHANNEL *Chan, CLIENT *From, CLIENT *Client, const char *Command, Client_ID(From), Channel_Name(Chan)); }
- if (!Can_Send_To_Channel_Identified(Chan, From)) { - if (! SendErrors) - return CONNECTED; - return IRC_WriteStrClient(From, ERR_CANNOTSENDTOCHAN_MSG, - Client_ID(From), Channel_Name(Chan)); - } - if (Client_Conn(From) > NONE) Conn_UpdateIdle(Client_Conn(From));
ngircd-commits@lists.barton.de