summaryrefslogtreecommitdiffstats
path: root/plugins/commands/at.rb
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/commands/at.rb')
-rw-r--r--plugins/commands/at.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/commands/at.rb b/plugins/commands/at.rb
index df3d460..7982f4f 100644
--- a/plugins/commands/at.rb
+++ b/plugins/commands/at.rb
@@ -6,7 +6,7 @@ Client.register_command("at") { |args|
now = []
recently = []
r_msg = ""
- h = JSON.parse(Net::HTTP.get(URI(Config[:commands][:at][:url])))
+ h = JSON.parse(Net::HTTP.get(URI(Config.lookup("commands::at::url"))))
h["users"].each { |u|
if (Time.now.to_i - u["timestamp"]) > 600 then
recently << u["login"]
@@ -15,10 +15,10 @@ Client.register_command("at") { |args|
end
}
- r_msg += "now: #{now.join(' ')}#{Config[:commands][:at][:separator]} " if not now.empty?
- r_msg += "recently: #{recently.join(' ')}#{Config[:commands][:at][:separator]} " if not recently.empty?
- r_msg += Config[:commands][:at][:empty] if now.empty? and recently.empty?
- r_msg += "unknown: #{h["unknown"]}#{Config[:commands][:at][:separator]} " if h["unknown"] > 0
+ r_msg += "now: #{now.join(' ')}#{Config.lookup("commands::at::separator")} " if not now.empty?
+ r_msg += "recently: #{recently.join(' ')}#{Config.lookup("commands::at::separator")} " if not recently.empty?
+ r_msg += Config.lookup("commands::at::empty") if now.empty? and recently.empty?
+ r_msg += "unknown: #{h:"unknown"}#{Config.lookup("commands::at::separator")} " if h:"unknown" > 0
r_msg
}