summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-02-21 21:05:16 +0100
committerMatthias H <apoc@sixserv.org>2014-02-21 21:05:16 +0100
commit77d48adcf5d489f146d81666d9631bf358deb540 (patch)
treef3dd6ef9d555232103fa3ee0e468cd87763112a3 /lib
parent8830f3c7bea6b885bb46cd7682b623f7e04333a8 (diff)
[webservice] dispatch command in post aswell
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/webservice.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rbot/core/webservice.rb b/lib/rbot/core/webservice.rb
index 222561de..464f0ab3 100644
--- a/lib/rbot/core/webservice.rb
+++ b/lib/rbot/core/webservice.rb
@@ -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