GLOBAL bool
IRC_SERVER( CLIENT *Client, REQUEST *Req )
{
- char str[LINE_LEN];
+ char str[100];
CLIENT *from, *c;
int i;
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++)
{
/* 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]))
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 */
/*
assert( Client != NULL );
assert( Req != NULL );
- _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
strlcpy( nick_in, Req->argv[1], sizeof( nick_in ));
strcpy( nick_out, "" );
&& !Client_HasMode(Client, 'o'))
return Op_NoPrivileges(Client, Req);
- _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
if (Client_Type(Client) == CLIENT_SERVER && Req->prefix) {
from = Client_Search(Req->prefix);
if (Client_Type(from) != CLIENT_SERVER