]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Fix 'Unknown command' being received from server
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 20 Dec 2006 13:26:20 +0000 (13:26 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 20 Dec 2006 13:26:20 +0000 (13:26 +0000)
lib/rbot/ircbot.rb
lib/rbot/ircsocket.rb

index bbb7c16cdec7b962873992b115b26a5615fc5fc4..66a364f90113ac997a18e44f507479c4a07562ca 100644 (file)
@@ -924,7 +924,7 @@ class IrcBot
     # we want to respond to a hung server within 30 secs or so
     @ping_timer = @timer.add(30) {
       @last_ping = Time.now
-      @socket.queue "PING :rbot"
+      sendq "PING :rbot"
     }
     @pong_timer = @timer.add(10) {
       unless @last_ping.nil?
index 6b49cf00e151b77137ace91411a9517b85e36c87..53182195597289519f7106250df01f87763f8864 100644 (file)
@@ -472,7 +472,7 @@ module Irc
         if @sock.nil?
           error "SEND attempted on closed socket"
         else
-          @sock.puts(message + "\n",0)
+          @sock.puts message
           @last_send = Time.new
           @flood_send += message.irc_send_penalty if penalty
           @lines_sent += 1