about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-01-13 10:40:20 +0100
committerAlexander Barton <alex@barton.de>2012-01-13 10:40:20 +0100
commit77f68b4fd140404848e203a6634ecd472294723f (patch)
tree858870eedcd67ddfcb42a3d79719f842b856c087 /src
parent2f8877ded4f0831a2f6033c589fcd36d9cecd0ba (diff)
downloadngircd-77f68b4fd140404848e203a6634ecd472294723f.tar.gz
ngircd-77f68b4fd140404848e203a6634ecd472294723f.zip
JOIN command: don't check channel limit if already member
Don't check the channel limit and don't report "too many channels"
when trying to join a channel that the client is already a member of.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-channel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index 52ba0930..196b5477 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -369,6 +369,12 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 
 		/* Local client? */
 		if (Client_Type(Client) == CLIENT_USER) {
+			if (chan) {
+				/* Already existing channel: already member? */
+				if (Channel_IsMemberOf(chan, Client))
+				    goto join_next;
+			}
+
 			/* Test if the user has reached the channel limit */
 			if ((Conf_MaxJoins > 0) &&
 			    (Channel_CountForUser(Client) >= Conf_MaxJoins))