summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-28 08:27:01 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-28 08:27:01 +0000
commit2f909788778208bac970faa2128949bcb3bc6c01 (patch)
tree2935f11eb539593b558ffa5af72275273cedddc5 /lib/rbot
parentd9f1c04e912d44c218a90b9b0debcb0a11b87631 (diff)
Too much stuff was being sent with each line, go back to 400 bytes max
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/ircbot.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 4bf3e8d3..4be0c444 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -650,10 +650,12 @@ class IrcBot
# relevant say() or notice() methods. This one should be used for IRCd
# extensions you want to use in modules.
def sendmsg(type, where, message, chan=nil, ring=0)
- # Split the message so that each line sent is not longher than 510 bytes
+ # Split the message so that each line sent is not longher than 400 bytes
# TODO allow something to do for commands that produce too many messages
# TODO example: math 10**10000
- left = 510 - type.length - where.to_s.length - 3
+ # TODO try to use the maximum line length allowed by the server, if there is
+ # a way to know what it is
+ left = 400 - type.length - where.to_s.length - 3
begin
if(left >= message.length)
sendq "#{type} #{where} :#{message}", chan, ring