diff options
Diffstat (limited to 'lib')
-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 |