diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-05 12:13:09 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-05 12:13:09 +0000 |
commit | 74650a43a45e67a35deb72375a6c0d2cbb64b79e (patch) | |
tree | 845192512d00b9ec5c82cabd9bdd56506eb7fe49 | |
parent | dcc2a88cb8529d7e393f1b96e84f6c94a864e4f9 (diff) |
Fix horrible bug in reworked sendmsg code that prevented it from working correctly with messages with embedded newlines
-rw-r--r-- | lib/rbot/ircbot.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 956415f9..5cd0ac4d 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -792,7 +792,7 @@ class IrcBot if(left >= msg.length) sendq "#{fixed}#{msg}", chan, ring log_sent(type, where, msg) - return + break end if opts[:max_lines] and cmd_lines == max_lines - 1 debug "Max lines count reached for message #{original_message.inspect} while sending #{msg.inspect}, truncating" @@ -816,8 +816,8 @@ class IrcBot end sendq "#{fixed}#{line}", chan, ring log_sent(type, where, line) - cmd_lines += 1 end while(msg.length > 0) + cmd_lines += 1 } end |