if (Client_Conn(Client) <= NONE)
return IRC_WriteStrClient(Client, ERR_UNKNOWNCOMMAND_MSG,
Client_ID(Client), Req->command);
-
+
if (Client_Type(Client) == CLIENT_UNKNOWN && Req->argc == 1) {
/* Not yet registered "unknown" connection, PASS with one
* argument: either a regular client, service, or server
protolow = atoi(&Req->argv[1][2]);
Req->argv[1][2] = '\0';
protohigh = atoi(Req->argv[1]);
-
+
Req->argv[1][2] = c2;
Req->argv[1][4] = c4;
} else
type = &Req->argv[1][4];
else
type = NULL;
-
+
/* Protocol flags/options */
if (Req->argc >= 4)
orig_flags = Req->argv[3];
else
{
/* Nickname change */
- if( Client_Conn( target ) > NONE )
- {
+ if (Client_Conn(target) > NONE) {
/* Local client */
- Log( LOG_INFO,
- "User \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".",
- Client_Mask( target ), Client_Conn( target ),
- Client_ID( target ), Req->argv[0] );
+ Log(LOG_INFO,
+ "User \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".",
+ Client_Mask(target), Client_Conn(target),
+ Client_ID(target), Req->argv[0]);
+ Conn_UpdateIdle(Client_Conn(target));
}
else
{
{
CLIENT *target;
char quitmsg[LINE_LEN];
-
+
assert( Client != NULL );
assert( Req != NULL );
-
+
/* Wrong number of arguments? */
if( Req->argc > 1 )
return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
/* User, Service, oder noch nicht registriert */
Conn_Close( Client_Conn( Client ), "Got QUIT command.", Req->argc == 1 ? quitmsg : NULL, true);
-
+
return DISCONNECTED;
}
} /* IRC_QUIT */