Permalink
Browse files

Update Copyright year; remove old junk

  • Loading branch information...
1 parent c558286 commit 0c23b8a4c5a382ddab14f8bcd780a8d4d5d8a251 @calzoneman calzoneman committed Dec 31, 2014
Showing with 3 additions and 395 deletions.
  1. +1 −1 LICENSE
  2. +1 −2 README.md
  3. +0 −11 lib/acp.js
  4. +0 −11 lib/asyncqueue.js
  5. +0 −12 lib/bgtask.js
  6. +0 −11 lib/config.js
  7. +0 −49 lib/filter-master.js
  8. +0 −84 lib/filter-worker.js
  9. +0 −37 lib/filter.js
  10. +0 −10 lib/get-info.js
  11. +0 −11 lib/logger.js
  12. +0 −57 lib/nodefilterlist.js
  13. +0 −10 lib/poll.js
  14. +0 −11 lib/server.js
  15. +0 −11 lib/ullist.js
  16. +0 −11 lib/xss.js
  17. +1 −1 templates/footer.jade
  18. +0 −11 www/js/callbacks.js
  19. +0 −11 www/js/data.js
  20. +0 −11 www/js/player.js
  21. +0 −11 www/js/ui.js
  22. +0 −11 www/js/util.js
View
@@ -1,6 +1,6 @@
/*
The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery and contributors
+Copyright (c) 2013-2015 Calvin Montgomery and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
View
@@ -89,5 +89,4 @@ Please open a GitHub Issue.
License
-------
-Licensed under MIT
-See LICENSE for the full license text
+Licensed under MIT. See LICENSE for the full license text.
View
@@ -1,14 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
var Logger = require("./logger");
var Server = require("./server");
var db = require("./database");
View
@@ -1,14 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
var AsyncQueue = function () {
this._q = [];
this._lock = false;
View
@@ -1,15 +1,3 @@
-
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
/*
bgtask.js
View
@@ -1,14 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
var fs = require("fs");
var path = require("path");
var Logger = require("./logger");
View
@@ -1,49 +0,0 @@
-function FilterMaster(worker) {
- this.waiting = {};
- this.worker = worker;
- this.id = 0;
-
- this.worker.on("message", this.handleMessage.bind(this));
-}
-
-FilterMaster.prototype.filterMessage = function (channel, message, cb) {
- var req = {
- cmd: "filter",
- channel: channel.name,
- message: message,
- id: this.id++
- };
-
- var resdata = {
- cb: cb,
- channel: channel,
- message: message,
- time: Date.now()
- };
-
- this.waiting[req.id] = resdata;
- this.worker.send(req);
-};
-
-FilterMaster.prototype.handleMessage = function (data) {
- if (data.cmd === "filterResult") {
- var res = this.waiting[data.id];
- if (!res) return;
- delete this.waiting[data.id];
-
- if (data.error) {
- // TODO log error
- return;
- }
-
- res.cb(data.message);
- } else if (data.cmd === "needFilterData") {
- var res = this.waiting[data.id];
- if (!res) return;
-
- var data = {
- filters: res.channel.modules.filters.filters.pack(),
- channel: res.channel.name,
-
- }
-};
View
@@ -1,84 +0,0 @@
-var FilterList = require("./channel/filters").FilterList;
-
-function FilterWorker() {
- this.cache = {};
-}
-
-FilterWorker.prototype.cacheData = function (channel, filters, convertLinks) {
- this.cache[channel] = {
- filters: new FilterList(filters),
- convertLinks: convertLinks
- };
-};
-
-FilterWorker.prototype.removeData = function (channel) {
- if (this.cache.hasOwnProperty(channel)) {
- delete this.cache[channel];
- }
-};
-
-FilterWorker.prototype.hasData = function (channel) {
- return this.cache.hasOwnProperty(channel);
-};
-
-const link = /(\w+:\/\/(?:[^:\/\[\]\s]+|\[[0-9a-f:]+\])(?::\d+)?(?:\/[^\/\s]*)*)/ig;
-FilterWorker.prototype.filterMessage = function (channel, msg) {
- if (!this.hasData(channel)) {
- throw new Error("Missing channel data");
- }
-
- var parts = msg.split(link);
- var filters = this.cache[channel].filters;
- var convertLinks = this.cache[channel].convertLinks;
-
- for (var j = 0; j < parts.length; j++) {
- /* substring is a URL */
- if (convertLinks && parts[j].match(link)) {
- var original = parts[j];
- parts[j] = filters.exec(parts[j], { filterlinks: true });
-
- /* no filters changed the URL, apply link filter */
- if (parts[j] === original) {
- parts[j] = url.format(url.parse(parts[j]));
- parts[j] = parts[j].replace(link, "<a href=\"$1\" target=\"_blank\">$1</a>");
- }
-
- } else {
- /* substring is not a URL */
- parts[j] = filters.exec(parts[j], { filterlinks: false });
- }
- }
-
- msg = parts.join("");
-};
-
-var procWorker = new FilterWorker();
-process.on("message", function (data) {
- if (data.cmd === "addChannel") {
- procWorker.cacheData(data.channel.toLowerCase(), data.filters, data.convertLinks);
- } else if (data.cmd === "delChannel") {
- procWorker.removeData(data.channel.toLowerCase());
- } else if (data.cmd === "filter") {
- try {
- var filtered = procWorker.filterMessage(data.channel.toLowerCase(), data.message);
- process.send({
- cmd: "filterResult",
- id: data.id,
- message: filtered
- });
- } catch (err) {
- if (err.message === "Missing channel data") {
- process.send({
- cmd: "needFilterData",
- id: data.id
- });
- } else {
- process.send({
- cmd: "filterResult",
- id: data.id,
- error: err
- });
- }
- }
- }
-});
View
@@ -1,37 +0,0 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-var Filter = function(name, regex, flags, replace) {
- this.name = name;
- this.source = regex;
- this.flags = flags;
- this.regex = new RegExp(this.source, this.flags);
- this.replace = replace;
- this.active = true;
- this.filterlinks = false;
-}
-
-Filter.prototype.pack = function() {
- return {
- name: this.name,
- source: this.source,
- flags: this.flags,
- replace: this.replace,
- active: this.active,
- filterlinks: this.filterlinks
- }
-}
-
-Filter.prototype.filter = function(text) {
- return text.replace(this.regex, this.replace);
-}
-
-exports.Filter = Filter;
View
@@ -1,13 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
var http = require("http");
var https = require("https");
var Logger = require("./logger.js");
View
@@ -1,14 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
var fs = require("fs");
var path = require("path");
View
@@ -1,57 +0,0 @@
-function fixFilter(f) {
- if (typeof f.name !== "string" ||
- typeof f.source !== "string" ||
- typeof f.replace !== "string") {
-
- return null;
- }
-
- f.replace = f.replace.replace(/([^\\]\\(\d)/g, "$1$$$2");
-
- if (typeof f.flags !== "string") {
- f.flags = "";
- }
-
- f.active = !!f.active;
- f.filterlinks = !!f.filterlinks;
- return f;
-}
-
-function NodeFilterList(filters) {
- if (!filters) filters = [];
-
- this.filters = filters.map(function (f) {
- f.regexp = new RegExp(f.source, f.flags);
- return f;
- });
-}
-
-NodeFilterList.prototype.pack = function () {
- return this.filters.map(function (f) {
- return {
- name: f.name,
- source: f.source,
- flags: f.flags,
- replace: f.replace,
- active: f.active,
- filterlinks: f.filterlinks
- };
- });
-};
-
-NodeFilterList.prototype.addFilter = function (f) {
- this.filters.push(f);
-};
-
-NodeFilterList.prototype.updateFilter = function (f) {
- if (!f.name) return;
-
- for (var i = 0; i < this.filters.length; i++) {
- if (this.filters[i].name === filter.name) {
- for (var key in f) {
- this.filters[i][key] = f[key];
- }
- break;
- }
- }
-};
View
@@ -1,13 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
const link = /(\w+:\/\/(?:[^:\/\[\]\s]+|\[[0-9a-f:]+\])(?::\d+)?(?:\/[^\/\s]*)*)/ig;
var XSS = require("./xss");
View
@@ -1,14 +1,3 @@
-/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
const VERSION = "3.6.0";
var singleton = null;
var Config = require("./config");
View
@@ -1,15 +1,4 @@
/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/*
ullist.js
Description: Defines ULList, which represents a doubly linked list
View
@@ -1,15 +1,4 @@
/*
-The MIT License (MIT)
-Copyright (c) 2013 Calvin Montgomery
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-/*
WARNING
This file contains an XSS prevention module I wrote myself. It has not
Oops, something went wrong.

0 comments on commit 0c23b8a

Please sign in to comment.