about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2012-01-02 15:22:52 +0100
committerAlexander Barton <alex@barton.de>2012-01-02 15:22:52 +0100
commit013298d4c68cc82c8b723fedb81ea87ced7fb306 (patch)
tree4748ab83a1874756f40d64ab1d6babf7b407092b /src
parentaf13732ec7bb09c9e1bc942a355990ab2767eca7 (diff)
downloadngircd-013298d4c68cc82c8b723fedb81ea87ced7fb306.tar.gz
ngircd-013298d4c68cc82c8b723fedb81ea87ced7fb306.zip
IRC_JOIN(): Code cleanup
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-channel.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c
index cc70eb47..a41f1d48 100644
--- a/src/ngircd/irc-channel.c
+++ b/src/ngircd/irc-channel.c
@@ -301,9 +301,9 @@ join_send_topic(CLIENT *Client, CLIENT *target, CHANNEL *chan,
  *
  * See RFC 2812, 3.2.1 "Join message"; RFC 2813, 4.2.1 "Join message".
  *
- * @param Client	The client from which this command has been received
- * @param Req		Request structure with prefix and all parameters
- * @returns		CONNECTED or DISCONNECTED
+ * @param Client The client from which this command has been received
+ * @param Req Request structure with prefix and all parameters
+ * @returns CONNECTED or DISCONNECTED
  */
 GLOBAL bool
 IRC_JOIN( CLIENT *Client, REQUEST *Req )
@@ -312,8 +312,8 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 	CLIENT *target;
 	CHANNEL *chan;
 
-	assert( Client != NULL );
-	assert( Req != NULL );
+	assert (Client != NULL);
+	assert (Req != NULL);
 
 	/* Bad number of arguments? */
 	if (Req->argc < 1 || Req->argc > 2)
@@ -327,7 +327,8 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 		target = Client;
 
 	if (!target)
-		return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG, Client_ID(Client), Req->prefix);
+		return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
+					  Client_ID(Client), Req->prefix);
 
 	/* Is argument "0"? */
 	if (Req->argc == 1 && !strncmp("0", Req->argv[0], 2))
@@ -359,8 +360,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 
 		chan = Channel_Search(channame);
 		if (!chan && Conf_PredefChannelsOnly) {
-			 /* channel must be created, but server does not allow this */
-			IRC_WriteStrClient(Client, ERR_BANNEDFROMCHAN_MSG, Client_ID(Client), channame);
+			 /* channel must be created, but forbidden by config */
+			IRC_WriteStrClient(Client, ERR_BANNEDFROMCHAN_MSG,
+					   Client_ID(Client), channame);
 			break;
 		}