summaryrefslogtreecommitdiff
path: root/lib/rbot/ircbot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/ircbot.rb')
-rw-r--r--lib/rbot/ircbot.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index f9f1758a..564403f5 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -444,17 +444,19 @@ class Bot
end
end
- def $stdout.write(str=nil)
+ def $stdout.write(*args)
+ str = args.map { |s| s.to_s }.join("")
log str, 2
- return str.to_s.size
+ return str.bytesize
end
- def $stderr.write(str=nil)
+ def $stderr.write(*args)
+ str = args.map { |s| s.to_s }.join("")
if str.to_s.match(/:\d+: warning:/)
warning str, 2
else
error str, 2
end
- return str.to_s.size
+ return str.bytesize
end
LoggerManager.instance.log_session_start