summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-19 20:19:45 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-08-19 20:19:45 +0200
commit43b5cd9777cc13c6d3ac14a4015a0c8e8d9e5b50 (patch)
treefe0435f849ec3dc429512171b23b02b60feb948d /lib/rbot/ircbot.rb
parent9340ab24696230a7f5debecf272b44ad91886b9c (diff)
IRC socket: get rid of delay/burst
The penalty system should be enough to prevent the bot from being disconnected because of excess flood, making the old sendq delay/burst code unnecessary. So get rid of the latter altogether. (If the penalty system as implemented ever happens to be insufficient as implemented, it should just get fixed rather than rely on the sendq delay/burst assistance.)
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 4f5018e3..55b10d41 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -277,14 +277,6 @@ class Bot
Config.register Config::IntegerValue.new('server.reconnect_wait',
:default => 5, :validate => Proc.new{|v| v >= 0},
:desc => "Seconds to wait before attempting to reconnect, on disconnect")
- Config.register Config::FloatValue.new('server.sendq_delay',
- :default => 2.0, :validate => Proc.new{|v| v >= 0},
- :desc => "(flood prevention) the delay between sending messages to the server (in seconds)",
- :on_change => Proc.new {|bot, v| bot.socket.sendq_delay = v })
- Config.register Config::IntegerValue.new('server.sendq_burst',
- :default => 4, :validate => Proc.new{|v| v >= 0},
- :desc => "(flood prevention) max lines to burst to the server before throttling. Most ircd's allow bursts of up 5 lines",
- :on_change => Proc.new {|bot, v| bot.socket.sendq_burst = v })
Config.register Config::IntegerValue.new('server.ping_timeout',
:default => 30, :validate => Proc.new{|v| v >= 0},
:desc => "reconnect if server doesn't respond to PING within this many seconds (set to 0 to disable)")
@@ -589,7 +581,7 @@ class Bot
debug "server.list is now #{@config['server.list'].inspect}"
end
- @socket = Irc::Socket.new(@config['server.list'], @config['server.bindhost'], @config['server.sendq_delay'], @config['server.sendq_burst'], :ssl => @config['server.ssl'])
+ @socket = Irc::Socket.new(@config['server.list'], @config['server.bindhost'], :ssl => @config['server.ssl'])
@client = Client.new
@plugins.scan