summaryrefslogtreecommitdiffstats
path: root/bot.rb
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-01-02 05:06:04 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-01-02 05:06:04 +0100
commit4b3975fc0a495ea18ae3bcaf0fbf5ee2c924ed8c (patch)
tree14fdf5784b38489de17f57387d3f4b5780a8f272 /bot.rb
parent58649c9843707c5d8b4211d07535fcf51421ebec (diff)
downloadlain-4b3975fc0a495ea18ae3bcaf0fbf5ee2c924ed8c.tar
lain-4b3975fc0a495ea18ae3bcaf0fbf5ee2c924ed8c.zip
Adjust strings.
Diffstat (limited to 'bot.rb')
-rw-r--r--bot.rb17
1 files changed, 12 insertions, 5 deletions
diff --git a/bot.rb b/bot.rb
index 6a4065b..55fbac7 100644
--- a/bot.rb
+++ b/bot.rb
@@ -11,26 +11,31 @@ module Lain
class Bot
def initialize
- $stderr.puts "Lain #{Version} starting..."
+ $stderr.puts "Lain #{Version}"
@modules = {}
- $stderr.puts 'Loading modules...'
+ $stderr.print 'Loading modules...'
Config::Modules.each { |mod, cfg|
+ $stderr.print " #{mod}"
require_relative "modules/#{mod}"
@modules[mod] = Modules.const_get(mod).new(self, cfg)
}
+ $stderr.puts '.'
+
@commands = @modules.values.reduce({}) { |c, mod| c.merge mod.commands }.to_a.sort
- $stderr.puts 'Connecting...'
+ $stderr.print 'Connecting... '
@cl = Jabber::Client.new(Jabber::JID.new(Config::JID))
@cl.connect
@cl.auth(Config::Password)
@cl.send(Jabber::Presence.new)
+ $stderr.puts 'connection established.'
+
@mucs = {}
Config::Rooms.each { |r|
@@ -48,7 +53,7 @@ module Lain
end
}
- $stderr.puts "Joining room `#{r}'..."
+ $stderr.print "Trying to access room `#{r}'... "
muc.join(r)
@@ -56,9 +61,11 @@ module Lain
muc.configure
rescue
end
+
+ $stderr.puts "access granted."
}
- $stderr.puts 'Startup finished.'
+ $stderr.puts 'Initialization finished.'
end
def commands