Commit Diff


commit - 98493077a2d044aa08ee5cb4bd7054579e30fb57
commit + 888664435aa81f20b204e2f9629678b606697bc5
blob - 9afe90780188ba1941874d9796427323af852816
blob + 7eb81cfad680b19732518c106c6ccceedbda4c40
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
@@ -492,7 +492,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Ori
 			break;
 		case 'k': /* Channel key */
 			if (mode_arg_count++ >= MAX_CMODES_ARG)
-				break;
+				goto chan_exit;
 			if (!set) {
 				if (modeok)
 					x[0] = *mode_ptr;
@@ -528,7 +528,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Ori
 			break;
 		case 'l': /* Member limit */
 			if (mode_arg_count++ >= MAX_CMODES_ARG)
-				break;
+				goto chan_exit;
 			if (!set) {
 				if (modeok)
 					x[0] = *mode_ptr;
@@ -640,7 +640,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Ori
 		case 'I': /* Invite lists */
 		case 'b': /* Ban lists */
 			if (mode_arg_count++ >= MAX_CMODES_ARG)
-				break;
+				goto chan_exit;
 			if (arg_arg > mode_arg) {
 				/* modify list */
 				if (modeok) {