Handle "throttling" in a single function
authorAlexander Barton <alex@barton.de>
Tue, 18 Mar 2014 13:48:52 +0000 (14:48 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 18 Mar 2014 13:53:29 +0000 (14:53 +0100)
commit35f1db5f28245579efbbb06eed6eaf1a3d6d84bc
tree1f43bd429df0f93b945cd0db52f9883c8996f6e6
parent4c2acd55c6ecb8d9a6a1c6c5c86295fdd859820c
Handle "throttling" in a single function

ngIRCd uses "command throttling" and "bps throttling" (bytes per second).
The states are detected in different functions, Conn_Handler() and
Read_Request(), but handle the actual "throttling" in a common function:
this enables us to guarantee consistent behavior and to disable throttling
for special connections in only one place, eventually.
src/ngircd/conn.c