X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-server.c;fp=src%2Fngircd%2Firc-server.c;h=7dbaba86a6bc20bc70d0d59b6db9969653b234b0;hp=b0abb7cdf2622cac13792c4a2c708baeeaa12e48;hb=48ea69d778279e7256a167e6f4147eb5766bbdda;hpb=80d0613bf256f48b1dd20bface4c52b57cff8d28 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 */ /*