From 12d798f0e23fb9ad45ef20dd6cb573c2099e9c33 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 24 Jan 2016 12:43:00 +0200 Subject: [PATCH] Send useragent with link expander requests --- src/plugins/irc-events/link.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc-events/link.js b/src/plugins/irc-events/link.js index 2a2c06d2..4f2f381e 100644 --- a/src/plugins/irc-events/link.js +++ b/src/plugins/irc-events/link.js @@ -101,7 +101,12 @@ function parse(msg, url, res, client) { function fetch(url, cb) { try { - var req = request.get(url); + var req = request.get({ + url: url, + headers: { + "User-Agent": "Mozilla/5.0 (compatible; Shout IRC Client; +https://github.com/erming/shout)" + } + }); } catch (e) { return; }