X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconn-func.c;h=e81a79e961a1c165b4bf4851a8f594f6d4af74ee;hp=32001f08d93c97bb3ee454c7564ae1ef0b43b184;hb=32f63abb59b5c9f47b4d517e0bbf9cc73fd044dc;hpb=b24d645ca183194b0158cd7bba1e0c1f468a7de9 diff --git a/src/ngircd/conn-func.c b/src/ngircd/conn-func.c index 32001f08..e81a79e9 100644 --- a/src/ngircd/conn-func.c +++ b/src/ngircd/conn-func.c @@ -30,13 +30,30 @@ #include "conn-func.h" +/** + * Update "idle timestamp", the time of the last visible user action + * (e. g. like sending messages, joining or leaving channels). + * + * @param Idx Connection index. + */ GLOBAL void -Conn_UpdateIdle( CONN_ID Idx ) +Conn_UpdateIdle(CONN_ID Idx) { - assert( Idx > NONE ); - My_Connections[Idx].lastprivmsg = time( NULL ); + assert(Idx > NONE); + My_Connections[Idx].lastprivmsg = time(NULL); } +/** + * Update "ping timestamp", the time of the last outgoing PING request. + * + * @param Idx Connection index. + */ +GLOBAL void +Conn_UpdatePing(CONN_ID Idx) +{ + assert(Idx > NONE); + My_Connections[Idx].lastping = time(NULL); +} /* * Get signon time of a connection.