X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconn-func.c;h=964767442ce8dfb1b3bc70ee443a4ceec8b6579c;hb=0e63fb3fa7ac4ca048e8c2b648d2be3fd0572311;hp=23c2075895c1d3157402ed1d80d9cfc967f46b2f;hpb=d2df7396a89b3e8de44379c305916bfee93ceb9b;p=ngircd-alex.git diff --git a/src/ngircd/conn-func.c b/src/ngircd/conn-func.c index 23c20758..96476744 100644 --- a/src/ngircd/conn-func.c +++ b/src/ngircd/conn-func.c @@ -43,6 +43,17 @@ Conn_UpdateIdle(CONN_ID Idx) 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. @@ -106,24 +117,6 @@ Conn_SetPenalty(CONN_ID Idx, time_t Seconds) } /* Conn_SetPenalty */ -/** - * Reset the "penalty time" for one connection. - * - * @param Idx Connection index. - * @see Conn_SetPenalty - */ -GLOBAL void -Conn_ResetPenalty(CONN_ID Idx) -{ - assert(Idx > NONE); - - My_Connections[Idx].delaytime = 0; -#ifdef DEBUG - Log(LOG_DEBUG, "Penalty time on connection %d has been reset."); -#endif -} /* Conn_ResetPenalty */ - - GLOBAL void Conn_ClearFlags( void ) {