mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 10:20:28 +00:00
Reset client idle time on NICK, JOIN, and PART
This commit is contained in:
parent
e19f7a8c19
commit
956bbe2c28
@ -26,6 +26,7 @@ static char UNUSED id[] = "$Id: irc-channel.c,v 1.45 2008/02/24 18:57:38 fw Exp
|
|||||||
#include "conn.h"
|
#include "conn.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
#include "conn-func.h"
|
||||||
#include "lists.h"
|
#include "lists.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "match.h"
|
#include "match.h"
|
||||||
@ -253,6 +254,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
|||||||
} else
|
} else
|
||||||
if (!join_allowed(Client, target, chan, channame, key))
|
if (!join_allowed(Client, target, chan, channame, key))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Local client: update idle time */
|
||||||
|
Conn_UpdateIdle(Client_Conn(Client));
|
||||||
} else {
|
} else {
|
||||||
/* Remote server: we don't need to know whether the
|
/* Remote server: we don't need to know whether the
|
||||||
* client is invited or not, but we have to make sure
|
* client is invited or not, but we have to make sure
|
||||||
@ -333,6 +337,11 @@ IRC_PART(CLIENT * Client, REQUEST * Req)
|
|||||||
Req->argc > 1 ? Req->argv[1] : Client_ID(target));
|
Req->argc > 1 ? Req->argv[1] : Client_ID(target));
|
||||||
chan = strtok(NULL, ",");
|
chan = strtok(NULL, ",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Update idle time, if local client */
|
||||||
|
if (Client_Conn(Client) > NONE)
|
||||||
|
Conn_UpdateIdle(Client_Conn(Client));
|
||||||
|
|
||||||
return CONNECTED;
|
return CONNECTED;
|
||||||
} /* IRC_PART */
|
} /* IRC_PART */
|
||||||
|
|
||||||
|
@ -256,13 +256,13 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Nickname change */
|
/* Nickname change */
|
||||||
if( Client_Conn( target ) > NONE )
|
if (Client_Conn(target) > NONE) {
|
||||||
{
|
|
||||||
/* Local client */
|
/* Local client */
|
||||||
Log( LOG_INFO,
|
Log(LOG_INFO,
|
||||||
"User \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".",
|
"User \"%s\" changed nick (connection %d): \"%s\" -> \"%s\".",
|
||||||
Client_Mask( target ), Client_Conn( target ),
|
Client_Mask(target), Client_Conn(target),
|
||||||
Client_ID( target ), Req->argv[0] );
|
Client_ID(target), Req->argv[0]);
|
||||||
|
Conn_UpdateIdle(Client_Conn(target));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user