X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Firc-server.c;h=b0abb7cdf2622cac13792c4a2c708baeeaa12e48;hb=4ab688c5e82281c4d9ad2a4498523b1722c1f738;hp=80bb6a6141169fe0b03b18063496a2b9d0494800;hpb=08f9d31d60220e8a389a2d24f42625be7749f090;p=ngircd-alex.git diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index 80bb6a61..b0abb7cd 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -53,7 +53,7 @@ GLOBAL bool IRC_SERVER( CLIENT *Client, REQUEST *Req ) { - char str[LINE_LEN]; + char str[100]; CLIENT *from, *c; int i; @@ -72,10 +72,12 @@ 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) + if (Req->argc != 2 && Req->argc != 3) { + IRC_SetPenalty(Client, 2); 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++) @@ -183,9 +185,11 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req ) { /* New server is being introduced to the network */ - if (Req->argc != 4) + if (Req->argc != 4) { + IRC_SetPenalty(Client, 2); 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])) @@ -231,9 +235,11 @@ IRC_SERVER( CLIENT *Client, REQUEST *Req ) Client_MyToken(c), Client_Info(c)); return CONNECTED; - } else + } else { + IRC_SetPenalty(Client, 2); return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, Client_ID(Client), Req->command); + } } /* IRC_SERVER */ /*