diff options
-rw-r--r-- | lib/rbot/ircbot.rb | 6 |
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 |