} else if (Client_Type(Client) == CLIENT_UNKNOWN ||
Client_Type(Client) == CLIENT_UNKNOWNSERVER) {
/* Unregistered connection, but wrong number of arguments: */
- IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
} else {
/* Server or service introduces new client */
/* Bad number of parameters? */
- if (Req->argc != 2 && Req->argc != 7) {
- IRC_SetPenalty(Client, 2);
+ if (Req->argc != 2 && Req->argc != 7)
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
- }
if (Req->argc >= 7) {
/* RFC 2813 compatible syntax */
/* Search the target */
target = Client_Search(Req->argv[0]);
- if (!target || Client_Type(target) != CLIENT_USER) {
+ if (!target || Client_Type(target) != CLIENT_USER)
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
Client_ID(Client), Req->argv[0]);
- }
if (Client_Conn(target) <= NONE) {
/* We have to forward the message to the server handling
Client_SetUser(Client, Req->argv[1], true);
Client_SetOrigUser(Client, Req->argv[1]);
- Client_SetHostname(Client, Req->argv[2]);
+ if (Conf_DNS)
+ Client_SetHostname(Client, Req->argv[2]);
+ else
+ Client_SetHostname(Client, Req->argv[3]);
Client_SetIPAText(Client, Req->argv[3]);
return CONNECTED;