Permalink
Browse files

Merge pull request #51 from ubuntu-si/fix/stran-feature

This fixes #50 - .stran still uses isup.me (which is horrible for pro…
  • Loading branch information...
2 parents b3d2ce0 + ea1dd85 commit 0bedc25e1bae4ebdf11f26cbf99977b2c5a64cf5 @zdobersek zdobersek committed Nov 29, 2016
Showing with 2 additions and 1 deletion.
  1. +2 −1 scripts/servisi.coffee
View
@@ -87,7 +87,8 @@ module.exports = (bot) ->
bot.regexp /^\.stran (.*)/i,
".stran <domena> -- Ali stran dela?",
(match, irc) ->
- domena = match[1].trim()
+ httpmatch = /^(http|https):\/\//
+ domena = match[1].trim().replace(httpmatch,'')
url = "http://isup.me/#{domena}"
bot.fetch url, (error, response, body)->
if !error and response.statusCode is 200

0 comments on commit 0bedc25

Please sign in to comment.