Fix case-sensitive feed URLs
This commit is contained in:
parent
9ec788b71a
commit
96351f888d
5
bot.js
5
bot.js
@ -67,7 +67,10 @@ async function opt(chan, user, setting, setting2, value, value2) {
|
|||||||
async function feed(chan, nick, provfeed, n) {
|
async function feed(chan, nick, provfeed, n) {
|
||||||
var userconf = fs.readFileSync('./config/usersettings.json')
|
var userconf = fs.readFileSync('./config/usersettings.json')
|
||||||
var uconfig = JSON.parse(userconf)
|
var uconfig = JSON.parse(userconf)
|
||||||
var provfeed = provfeed.toLowerCase()
|
if (isValidUrl(provfeed) === false) {
|
||||||
|
consoleLog('[bot.feed] Provided feed is not a URL, transforming to lowercase')
|
||||||
|
var provfeed = provfeed.toLowerCase()
|
||||||
|
}
|
||||||
var predefinedFeeds = ['twitter', 'github']
|
var predefinedFeeds = ['twitter', 'github']
|
||||||
var predefString = provfeed.split("/")
|
var predefString = provfeed.split("/")
|
||||||
if (provfeed === undefined) {
|
if (provfeed === undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user