X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-server.c;h=92186aff7fcdbae8d8a7e5c02f7c177e1d231281;hp=b0abb7cdf2622cac13792c4a2c708baeeaa12e48;hb=a534e71e8da9a7bab55e7e76358a60dcbd3e25d5;hpb=62865f7e1910d08ad8d72cb89f830f6d9411ffa2 diff --git a/src/ngircd/irc-server.c b/src/ngircd/irc-server.c index b0abb7cd..92186aff 100644 --- a/src/ngircd/irc-server.c +++ b/src/ngircd/irc-server.c @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors. + * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,31 +16,25 @@ * IRC commands for server links */ -#include "imp.h" #include #include #include #include #include -#include "defines.h" -#include "conn.h" #include "conn-func.h" #include "conn-zip.h" #include "conf.h" #include "channel.h" -#include "lists.h" #include "log.h" #include "messages.h" #include "parse.h" #include "numeric.h" #include "ngircd.h" #include "irc-info.h" -#include "irc-macros.h" #include "irc-write.h" #include "op.h" -#include "exp.h" #include "irc-server.h" /** @@ -72,12 +66,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 +177,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 +225,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 */ /*