diff options
author | Matthias H <apoc@sixserv.org> | 2014-02-21 21:05:16 +0100 |
---|---|---|
committer | Matthias H <apoc@sixserv.org> | 2014-02-21 21:05:16 +0100 |
commit | 77d48adcf5d489f146d81666d9631bf358deb540 (patch) | |
tree | f3dd6ef9d555232103fa3ee0e468cd87763112a3 | |
parent | 8830f3c7bea6b885bb46cd7682b623f7e04333a8 (diff) |
[webservice] dispatch command in post aswell
-rw-r--r-- | lib/rbot/core/webservice.rb | 6 |
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 |