Skip to content
Snippets Groups Projects
Unverified Commit 9a025e76 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

Removed trim string settings

parent e53a9034
No related branches found
No related tags found
No related merge requests found
# codex-blackboard-hubot-scripts
Meteor doesn't interact really well with NPM and the NPM module
loading mechanism which hubot uses for its scripts. So we've
split out most of hubot's scripts into this separate module.
......@@ -14,9 +12,9 @@ $ npm install --save hubot-pugme
```
* **If it is included in the old [hubot-scripts repository](https://github.com/github/hubot-scripts/tree/master/src/scripts)**,
just add it to the `hubot-scripts.json` file. For example:
just add it to the admin settings:
```
["redis-brain.coffee", "shipit.coffee", "whatis.coffee", "<new-script-name>.coffee"]
redis-brain.coffee,shipit.coffee,whatis.coffee,<new-script-name>.coffee
```
* **If it is a custom script**, or a forked/tweaked version of a
......
[]
......@@ -10,7 +10,7 @@ path = Npm.require('path')
# 'use strict'
# Log messages?
DEBUG = true
DEBUG = false
# Monkey-patch Hubot to support private messages
Hubot.Response::priv = (strings...) ->
......@@ -166,7 +166,7 @@ class HubotScripts
console.log "can't load #{modulePath}".red
console.log e
scriptsToLoad = (RocketChat.settings.get('InternalHubot_ScriptsToLoad') + '').split(',')
scriptsToLoad = RocketChat.settings.get('InternalHubot_ScriptsToLoad').replace(' ', '').split(',') or []
for scriptFile in scriptsToLoad
try
......@@ -293,10 +293,8 @@ init = =>
# username: "rocketbot"
# action: true
RocketChat.models.Settings.findByIds([ 'InternalHubot_Username', 'InternalHubot_Enabled', 'InternalHubot_ScriptsToLoad']).observe
added: ->
init()
changed: ->
init()
removed: ->
init()
Meteor.startup ->
init()
RocketChat.models.Settings.findByIds([ 'InternalHubot_Username', 'InternalHubot_Enabled', 'InternalHubot_ScriptsToLoad']).observe
changed: ->
init()
......@@ -23,7 +23,7 @@ getUrlContent = (urlObj, redirectCount = 5, callback) ->
parsedUrl = _.pick urlObj, ['host', 'hash', 'pathname', 'protocol', 'port', 'query', 'search', 'hostname']
ignoredHosts = RocketChat.settings.get('API_EmbedIgnoredHosts').split(',') or []
ignoredHosts = RocketChat.settings.get('API_EmbedIgnoredHosts').replace(' ', '').split(',') or []
if parsedUrl.hostname in ignoredHosts or ipRangeCheck(parsedUrl.hostname, ignoredHosts)
return callback()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment