diff options
| author | Alexander Barton <alex@barton.de> | 2015-03-28 00:05:39 +0100 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2018-02-25 03:22:05 +0100 |
| commit | 03acae970df0ebe713a4be791e6c75915d34a365 (patch) | |
| tree | 632accca938554bb3d2aa95e66a0a54b6d29177a /src | |
| parent | 8f0c705029501141528fbe7671e4107b4e1f395f (diff) | |
| download | ngircd-03acae970df0ebe713a4be791e6c75915d34a365.tar.gz ngircd-03acae970df0ebe713a4be791e6c75915d34a365.zip | |
User mode "C": Allow messages from servers, services, and IRC Ops
Update user mode "C" handling ("Only users that share a channel are
allowed to send messages") to behave like user mode "b" ("block private
messages and notices") and therefore allow messages from servers, services,
and IRC Operators, too.
Change proposed by "wowaname" in #ngircd, thanks!
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ngircd/irc.c b/src/ngircd/irc.c index dc3b2f2e..12fd8214 100644 --- a/src/ngircd/irc.c +++ b/src/ngircd/irc.c @@ -694,7 +694,10 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors) goto send_next_target; } - if (Client_HasMode(cl, 'C')) { + if (Client_HasMode(cl, 'C') && + !Client_HasMode(from, 'o') && + !(Client_Type(from) == CLIENT_SERVER) && + !(Client_Type(from) == CLIENT_SERVICE)) { cl2chan = Channel_FirstChannelOf(cl); while (cl2chan) { chan = Channel_GetChannel(cl2chan); |