summary refs log tree commit diff
path: root/src/ngircd/irc-server.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@lodoss.net>2013-11-06 18:28:09 +0000
committerFederico G. Schwindt <fgsch@lodoss.net>2013-11-06 18:28:09 +0000
commit48ea69d778279e7256a167e6f4147eb5766bbdda (patch)
tree085359afe6b47ea185fb0c5e93fe84bbef1fdf72 /src/ngircd/irc-server.c
parent80d0613bf256f48b1dd20bface4c52b57cff8d28 (diff)
downloadngircd-48ea69d778279e7256a167e6f4147eb5766bbdda.tar.gz
ngircd-48ea69d778279e7256a167e6f4147eb5766bbdda.zip
Remove unneded IRC_SetPenalty() calls
IRC_WriteErrClient() already calls IRC_SetPenalty().  While here convert
some IRC_SetPenalty() + IRC_WriteStrClient() to IRC_WriteErrClient().
Diffstat (limited to 'src/ngircd/irc-server.c')
-rw-r--r--src/ngircd/irc-server.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c
index b0abb7cd..7dbaba86 100644
--- a/src/ngircd/irc-server.c
+++ b/src/ngircd/irc-server.c
@@ -72,12 +72,10 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 		LogDebug("Connection %d: got SERVER command (new server link) ...",
 			Client_Conn(Client));
 
-		if (Req->argc != 2 && Req->argc != 3) {
-			IRC_SetPenalty(Client, 2);
+		if (Req->argc != 2 && Req->argc != 3)
 			return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
 						  Client_ID(Client),
 						  Req->command);
-		}
 
 		/* Get configuration index of new remote server ... */
 		for (i = 0; i < MAX_SERVERS; i++)
@@ -185,11 +183,9 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 	{
 		/* New server is being introduced to the network */
 
-		if (Req->argc != 4) {
-			IRC_SetPenalty(Client, 2);
+		if (Req->argc != 4)
 			return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
 						  Client_ID(Client), Req->command);
-		}
 
 		/* check for existing server with same ID */
 		if (!Client_CheckID(Client, Req->argv[0]))
@@ -235,11 +231,9 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req )
 					  Client_MyToken(c), Client_Info(c));
 
 		return CONNECTED;
-	} else {
-		IRC_SetPenalty(Client, 2);
+	} else
 		return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
 					  Client_ID(Client), Req->command);
-	}
 } /* IRC_SERVER */
 
 /*