]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
[webservice] dispatch command in post aswell
authorMatthias H <apoc@sixserv.org>
Fri, 21 Feb 2014 20:05:16 +0000 (21:05 +0100)
committerMatthias H <apoc@sixserv.org>
Fri, 21 Feb 2014 20:05:16 +0000 (21:05 +0100)
lib/rbot/core/webservice.rb

index 222561de2506cf77ae45e69468e83a6dbdc2cd30..464f0ab3461e4269abb2e76bbbfad2afca34efa3 100644 (file)
@@ -39,7 +39,11 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
     post = CGI::parse(req.body)
     ip = req.peeraddr[3]
 
-    command = uri.gsub('/', ' ').strip
+    if post['command']
+      command = post['command'].first
+    else
+      command = uri.gsub('/', ' ').strip
+    end
 
     username = post['username'].first
     password = post['password'].first