summaryrefslogtreecommitdiffstats
path: root/bot.rb
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-01-01 18:34:23 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-01-01 18:34:23 +0100
commit9d1555604557b7ca385869a6fcebaf4dc0665059 (patch)
tree6269c57f48331f1704907b633d7a3660b3a647a1 /bot.rb
parent0b95e32f2f9f21ad288bc53f2423c135532b933e (diff)
downloadlain-9d1555604557b7ca385869a6fcebaf4dc0665059.tar
lain-9d1555604557b7ca385869a6fcebaf4dc0665059.zip
Add credits module, more core improvements
Diffstat (limited to 'bot.rb')
-rw-r--r--bot.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/bot.rb b/bot.rb
index c6d96ce..80eb45e 100644
--- a/bot.rb
+++ b/bot.rb
@@ -6,17 +6,13 @@ require_relative 'sasl'
require_relative 'config'
module Lain
+ Version = '0.1'
+
class Bot
- Version = '0.1'
def initialize
$stderr.puts "Lain #{Version} starting..."
- @cl = Jabber::Client.new(Jabber::JID.new(Config::JID))
- @cl.connect
- @cl.auth(Config::Password)
- @cl.send(Jabber::Presence.new)
-
@modules = {}
$stderr.puts 'Loading modules...'
@@ -26,6 +22,13 @@ module Lain
@modules[mod] = Modules.const_get(mod).new self
}
+ $stderr.puts 'Connecting...'
+
+ @cl = Jabber::Client.new(Jabber::JID.new(Config::JID))
+ @cl.connect
+ @cl.auth(Config::Password)
+ @cl.send(Jabber::Presence.new)
+
@mucs = {}
Config::Rooms.each { |r|