diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/ircsocket.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rbot/ircsocket.rb b/lib/rbot/ircsocket.rb index b3c3dc8a..4ee3be23 100644 --- a/lib/rbot/ircsocket.rb +++ b/lib/rbot/ircsocket.rb @@ -162,8 +162,7 @@ module Irc @throttle_bytes = 0 if @throttle_bytes < 0 @last_throttle = now end - end - if @throttle_bytes == 0 + else @throttle_div = 1 end @throttle_bytes += more @@ -230,6 +229,8 @@ module Irc break if @sendq.empty? mess = @sendq[0] if @throttle_bytes == 0 or mess.length+@throttle_bytes < @bytes_per + debug "(flood protection: sending message of length #{mess.length})" + debug "(byterate: #{byterate}, throttle bytes: #{@throttle_bytes})" puts_critical(@sendq.shift) else debug "(flood protection: throttling message of length #{mess.length})" |