Permalink
Browse files

This fixes #50 - .stran still uses isup.me (which is horrible for pro…

…tocols) but without protocols
  • Loading branch information...
1 parent 2bab960 commit ce719b9f7c352a8222f2a3913c8ad0e8a39d62b6 @CrazyLemon CrazyLemon committed Nov 18, 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 ce719b9

Please sign in to comment.