now it can reload its configuration at runtime :)

master
Robert "ar" Gerus 2013-06-09 19:03:52 +02:00
parent 693d44191f
commit 4973d83165
2 changed files with 10 additions and 0 deletions

View File

@ -3,3 +3,9 @@ Client.register_command("reload") { |args|
"plugins reloaded..."
}
Client.register_command("load") { |args|
Client.load_config
"config reloaded..."
}

View File

@ -25,4 +25,8 @@ class Repost < EventMachine::IRC::Client
end if not Config[:plugins].nil?
end
def load_config(file = "config.rb")
load File.dirname($0) + "/" + file
end
end