bugfixes
This commit is contained in:
parent
06915ce3e7
commit
f8d42a3f01
@ -51,7 +51,7 @@ module.exports = client => {
|
||||
if (this.server.user.hasi(msg.params[1])) {
|
||||
tmpuser = this.server.user.geti(msg.params[1]);
|
||||
if (tmpuser.channels)
|
||||
tmpchan = tmpuser.channels;
|
||||
tmpchan = new Map(tmpuser.channels);
|
||||
}
|
||||
let chans = msg.params[2].trim().split(" ");
|
||||
for (let chan in chans) {
|
||||
@ -71,3 +71,21 @@ module.exports = client => {
|
||||
this.server.user.set(msg.params[1], tmpuser);
|
||||
}.bind(client));
|
||||
};
|
||||
|
||||
Map.prototype.hasi = function (val) {
|
||||
for (let [key] of this)
|
||||
if (key.toLowerCase() === val.toLowerCase())
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
Map.prototype.geti = function (val) {
|
||||
for (let [key, value] of this)
|
||||
if (key.toLowerCase() === val.toLowerCase())
|
||||
return value;
|
||||
return false;
|
||||
};
|
||||
Map.prototype.deli = function (val) {
|
||||
for (let [key] of this)
|
||||
if (key.toLowerCase() === val.toLowerCase())
|
||||
this.delete(key);
|
||||
};
|
@ -14,7 +14,7 @@ module.exports = bot => {
|
||||
bot._trigger.set("parser", {
|
||||
call: /https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi,
|
||||
level: 0,
|
||||
active: true,
|
||||
active: false,
|
||||
clients: ["irc"],
|
||||
f: e => {
|
||||
const links = e.message.match(/https?:\/\/[\w-]+(\.[\w-]+)+\.?(:\d+)?(\/\S*)?/gi);
|
||||
|
Loading…
Reference in New Issue
Block a user