]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix horrible bug in reworked sendmsg code that prevented it from working correctly...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 5 Feb 2007 12:13:09 +0000 (12:13 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 5 Feb 2007 12:13:09 +0000 (12:13 +0000)
lib/rbot/ircbot.rb

index 956415f95476cd27d478c5ce62421191f666e53e..5cd0ac4d11fd07e270300f98e64bf06bda2b5019 100644 (file)
@@ -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