forked from GitHub/dbot
fix all the module regexen
This commit is contained in:
parent
1a5f809bdc
commit
a554b8d1cf
@ -22,8 +22,8 @@ var charybdis = function(dbot) {
|
||||
}
|
||||
}
|
||||
};
|
||||
this.commands['~chanserv'].regex = [/^~chanserv (\+.)/, 2]
|
||||
this.commands['~chanmode'].regex = [/^~chanmode (\+.)/, 2]
|
||||
this.commands['~chanserv'].regex = [/^chanserv (\+.)/, 2]
|
||||
this.commands['~chanmode'].regex = [/^chanmode (\+.)/, 2]
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -25,10 +25,10 @@ var crypto = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
this.commands['~md5'].regex = /^~md5 ([^ ]+)$/;
|
||||
this.commands['~sha1'].regex = /^~sha1 ([^ ]+)$/;
|
||||
this.commands['~sha256'].regex = /^~sha256 ([^ ]+)$/;
|
||||
this.commands['~aes'].regex = /^~aes "(.*)" "(.*)"$/;
|
||||
this.commands['~md5'].regex = /^md5 ([^ ]+)$/;
|
||||
this.commands['~sha1'].regex = /^sha1 ([^ ]+)$/;
|
||||
this.commands['~sha256'].regex = /^sha256 ([^ ]+)$/;
|
||||
this.commands['~aes'].regex = /^aes "(.*)" "(.*)"$/;
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -53,11 +53,11 @@ var dent = function(dbot) {
|
||||
event.reply('Dent posted (probably).');
|
||||
}
|
||||
};
|
||||
this.commands['~dent'].regex = [/^~dent (.+)$/, 2];
|
||||
this.commands['~dent'].regex = [/^dent (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
if(this.config.dentQuotes === true && _.has(dbot.modules, 'quotes')) {
|
||||
dbot.api.event.addHook('~qadd', function(key, text) {
|
||||
dbot.api.event.addHook('qadd', function(key, text) {
|
||||
if(text.indexOf('~~') == -1) {
|
||||
this.api.post(key + ': ' + text);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ var flashy = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
this.commands['~flashy'].regex = [/^~flashy ([^ ]+) (.+)$/, 3];
|
||||
this.commands['~flashy'].regex = [/^flashy ([^ ]+) (.+)$/, 3];
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -257,10 +257,10 @@ var ignore = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
commands['~ban'].regex = [/^~ban ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~unban'].regex = [/^~unban ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~ignorechannel'].regex = [/^~ignorechannel ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~unignorechannel'].regex = [/^~unignorechannel ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~ban'].regex = [/^ban ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~unban'].regex = [/^unban ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~ignorechannel'].regex = [/^ignorechannel ([^ ]+) ([^ ]+)$/, 3];
|
||||
commands['~unignorechannel'].regex = [/^unignorechannel ([^ ]+) ([^ ]+)$/, 3];
|
||||
|
||||
commands['~ban'].access = 'moderator';
|
||||
commands['~unban'].access = 'moderator';
|
||||
|
@ -47,7 +47,7 @@ var imdb = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~imdb'].regex = [/^~imdb (.+)$/, 2];
|
||||
this.commands['~imdb'].regex = [/^imdb (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
dbot.api.link.addHandler('imdb', /https?:\/\/(www\.)?imdb\.com\/title\/([a-zA-Z0-9]+)/, function(matches, name, callback) {
|
||||
|
@ -271,7 +271,7 @@ var imgur = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
this.commands['~imgur'].regex = [/^~imgur ([\d\w\s-]*)/, 2];
|
||||
this.commands['~imgur'].regex = [/^imgur ([\d\w\s-]*)/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
var imgurHandler = function(matches, name, callback) {
|
||||
|
@ -37,8 +37,8 @@ var js = function(dbot) {
|
||||
}
|
||||
}
|
||||
};
|
||||
commands['~js'].regex = [/^~js (.*)/, 2];
|
||||
commands['~ajs'].regex = [/^~ajs (.*)/, 2];
|
||||
commands['~js'].regex = [/^js (.*)/, 2];
|
||||
commands['~ajs'].regex = [/^ajs (.*)/, 2];
|
||||
commands['~ajs'].access = 'admin';
|
||||
|
||||
this.name = 'js';
|
||||
|
@ -277,10 +277,10 @@ var commands = function(dbot) {
|
||||
commands['~quiet'].access = 'voice';
|
||||
commands['~unquiet'].access = 'voice';
|
||||
|
||||
commands['~ckick'].regex = /^~ckick (#[^ ]+ )?([^ ]+) ?(.*)?$/;
|
||||
commands['~nban'].regex = /^~nban ([\d\.^ ]+)?([^ ]+) (.+)$/;
|
||||
commands['~quiet'].regex = /^~quiet ([\d\.^ ]+)?(#[^ ]+ )?([^ ]+) ?(.*)?$/;
|
||||
commands['~unquiet'].regex = /^~unquiet (#[^ ]+ )?([^ ]+) ?$/;
|
||||
commands['~ckick'].regex = /^ckick (#[^ ]+ )?([^ ]+) ?(.*)?$/;
|
||||
commands['~nban'].regex = /^nban ([\d\.^ ]+)?([^ ]+) (.+)$/;
|
||||
commands['~quiet'].regex = /^quiet ([\d\.^ ]+)?(#[^ ]+ )?([^ ]+) ?(.*)?$/;
|
||||
commands['~unquiet'].regex = /^unquiet (#[^ ]+ )?([^ ]+) ?$/;
|
||||
|
||||
return commands;
|
||||
};
|
||||
|
@ -418,8 +418,8 @@ var lastfm = function(dbot) {
|
||||
});
|
||||
}
|
||||
};
|
||||
this.commands['~taste'].regex = [/^~taste ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
this.commands['~artists'].regex = [/^~artists ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
this.commands['~taste'].regex = [/^taste ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
this.commands['~artists'].regex = [/^artists ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
|
||||
_.each(this.commands, function(command) {
|
||||
command.resolver = function(event, callback) {
|
||||
|
@ -141,7 +141,7 @@ var link = function(dbot) {
|
||||
});
|
||||
}
|
||||
};
|
||||
commands['~ud'].regex = [/~ud (.+)/, 2];
|
||||
commands['~ud'].regex = [/ud (.+)/, 2];
|
||||
this.commands = commands;
|
||||
|
||||
this.listener = function(event) {
|
||||
|
@ -193,12 +193,12 @@ var commands = function(dbot) {
|
||||
});
|
||||
}
|
||||
};
|
||||
commands['~newpoll'].regex = [/~newpoll ([^ ]+) options=([^ ]+) (.+)/, 4];
|
||||
commands['~addoption'].regex = [/~addoption ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~rmoption'].regex = [/~rmoption ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~vote'].regex = [/~vote ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~pdesc'].regex = [/~pdesc ([^ ]+)/, 2];
|
||||
commands['~count'].regex = [/~count ([^ ]+)/, 2];
|
||||
commands['~newpoll'].regex = [/newpoll ([^ ]+) options=([^ ]+) (.+)/, 4];
|
||||
commands['~addoption'].regex = [/addoption ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~rmoption'].regex = [/rmoption ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~vote'].regex = [/vote ([^ ]+) ([^ ]+)/, 3];
|
||||
commands['~pdesc'].regex = [/pdesc ([^ ]+)/, 2];
|
||||
commands['~count'].regex = [/count ([^ ]+)/, 2];
|
||||
|
||||
return commands;
|
||||
};
|
||||
|
@ -31,7 +31,7 @@ var commands = function(dbot){
|
||||
event.reply(dbot.api.web.getUrl('profile/' + event.server + '/' + user));
|
||||
}
|
||||
};
|
||||
commands['~set'].regex = [/~set ([^ ]+) (.+)/, 3];
|
||||
commands['~set'].regex = [/set ([^ ]+) (.+)/, 3];
|
||||
|
||||
return commands;
|
||||
};
|
||||
|
@ -367,15 +367,14 @@ var commands = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
commands['~'].regex = [/^~([\d\w\s-]*)/, 2];
|
||||
commands['~q'].regex = [/^~q ([\d\w\s-]*)/, 2];
|
||||
commands['~qsearch'].regex = [/^~qsearch ([\d\w\s*-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~rm'].regex = [/^~rm ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~rmlast'].regex = [/^~rmlast ([\d\w\s-]*)/, 2];
|
||||
commands['~qadd'].regex = [/^~qadd ([\d\w-]+[\d\w\s-]*)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~qrename'].regex = [/^~qrename ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~qmerge'].regex = [/^~qmerge ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~link'].regex = [/^~link ([\d\w\s-]*)/, 2];
|
||||
commands['~q'].regex = [/^q ([\d\w\s-]*)/, 2];
|
||||
commands['~qsearch'].regex = [/^qsearch ([\d\w\s*-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~rm'].regex = [/^rm ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~rmlast'].regex = [/^rmlast ([\d\w\s-]*)/, 2];
|
||||
commands['~qadd'].regex = [/^qadd ([\d\w-]+[\d\w\s-]*)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~qrename'].regex = [/^qrename ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~qmerge'].regex = [/^qmerge ([\d\w\s-]+?)[ ]?=[ ]?(.+)$/, 3];
|
||||
commands['~link'].regex = [/^link ([\d\w\s-]*)/, 2];
|
||||
|
||||
commands['~rmconfirm'].access = 'moderator';
|
||||
commands['~rmdeny'].access = 'moderator';
|
||||
|
@ -32,7 +32,7 @@ var rain = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
commands['~rain'].regex = [/~rain (.+)/, 2];
|
||||
commands['~rain'].regex = [/rain (.+)/, 2];
|
||||
this.commands = commands;
|
||||
this.on = 'PRIVMSG';
|
||||
|
||||
|
@ -201,8 +201,8 @@ var reddit = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~addredditfeed'].regex = [/^~addredditfeed ([^ ]+) ([^ ]+) ([^ ]+)$/, 4];
|
||||
this.commands['~rmredditfeed'].regex = [/^~rmredditfeed ([^ ]+) ([^ ]+)$/, 3];
|
||||
this.commands['~addredditfeed'].regex = [/^addredditfeed ([^ ]+) ([^ ]+) ([^ ]+)$/, 4];
|
||||
this.commands['~rmredditfeed'].regex = [/^rmredditfeed ([^ ]+) ([^ ]+)$/, 3];
|
||||
this.commands['~addredditfeed'].access = 'moderator';
|
||||
this.commands['~rmredditfeed'].access = 'moderator';
|
||||
|
||||
|
@ -124,10 +124,10 @@ var commands = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
commands['~report'].regex = [/^~report ([^ ]+) ([^ ]+) (.+)$/, 4];
|
||||
commands['~notify'].regex = [/^~notify ([^ ]+) (.+)$/, 3];
|
||||
commands['~nunsub'].regex = [/^~nunsub ([^ ]+)$/, 2];
|
||||
commands['~ununsub'].regex = [/^~ununsub ([^ ]+)$/, 2];
|
||||
commands['~report'].regex = [/^report ([^ ]+) ([^ ]+) (.+)$/, 4];
|
||||
commands['~notify'].regex = [/^notify ([^ ]+) (.+)$/, 3];
|
||||
commands['~nunsub'].regex = [/^nunsub ([^ ]+)$/, 2];
|
||||
commands['~ununsub'].regex = [/^ununsub ([^ ]+)$/, 2];
|
||||
|
||||
return commands;
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ var soundcloud = function(dbot) {
|
||||
});
|
||||
}
|
||||
};
|
||||
this.commands['~soundcloud'].regex = [/^~soundcloud (.+)$/, 2];
|
||||
this.commands['~soundcloud'].regex = [/^soundcloud (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
dbot.api.link.addHandler(this.name,
|
||||
|
@ -115,7 +115,7 @@ var spotify = function(dbot) {
|
||||
}
|
||||
}
|
||||
};
|
||||
commands['~spotify'].regex = [/^~spotify (.*)/, 2];
|
||||
commands['~spotify'].regex = [/^spotify (.*)/, 2];
|
||||
this.commands = commands;
|
||||
|
||||
this.onLoad = function() {
|
||||
|
@ -231,9 +231,9 @@ var commands = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
commands['~wordusers'].regex = [/^~wordusers ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~word'].regex = [/^~word ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~trackword'].regex = [/^~trackword ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~wordusers'].regex = [/^wordusers ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~word'].regex = [/^word ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~trackword'].regex = [/^trackword ([\d\w[\]{}^|\\<>`_-]+?)/, 2];
|
||||
commands['~trackword'].access = 'power_user';
|
||||
return commands;
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ var steam = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~games'].regex = [/^~games ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
this.commands['~games'].regex = [/^games ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
|
||||
_.each(this.commands, function(command) {
|
||||
command.resolver = function(event, callback) {
|
||||
|
@ -199,11 +199,11 @@ var commands = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
commands['~alias'].regex = [/^~alias ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~time'].regex = [/^~time ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~setaliasparent'].regex = [/^~setaliasparent ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~mergeusers'].regex = [/^~mergeusers ([\d\w[\]{}^|\\`_-]+?)\s*?([\d\w[\]{}^|\\`_-]+?)/, 3];
|
||||
commands['~addalias'].regex = [/^~addalias ([\d\w[\]{}^|\\`_-]+?) ([\d\w[\]{}^|\\`_-]+?)$/, 3];
|
||||
commands['~alias'].regex = [/^alias ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~time'].regex = [/^time ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~setaliasparent'].regex = [/^setaliasparent ([\d\w[\]{}^|\\`_-]+?)/, 2];
|
||||
commands['~mergeusers'].regex = [/^mergeusers ([\d\w[\]{}^|\\`_-]+?)\s*?([\d\w[\]{}^|\\`_-]+?)/, 3];
|
||||
commands['~addalias'].regex = [/^addalias ([\d\w[\]{}^|\\`_-]+?) ([\d\w[\]{}^|\\`_-]+?)$/, 3];
|
||||
|
||||
commands['~setaliasparent'].access = 'moderator';
|
||||
commands['~mergeusers'].access = 'moderator';
|
||||
|
@ -65,7 +65,7 @@ var warning = function(dbot) {
|
||||
}
|
||||
};
|
||||
|
||||
this.commands['~warn'].regex = [/~warn ([^ ]+) (.+)/, 3];
|
||||
this.commands['~warn'].regex = [/warn ([^ ]+) (.+)/, 3];
|
||||
this.commands['~warn'].access = 'power_user';
|
||||
};
|
||||
|
||||
|
@ -166,7 +166,7 @@ var webInterface = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~setwebpass'].regex = [/^~setwebpass ([^ ]+)$/, 2]
|
||||
this.commands['~setwebpass'].regex = [/^setwebpass ([^ ]+)$/, 2]
|
||||
};
|
||||
|
||||
exports.fetch = function(dbot) {
|
||||
|
@ -32,7 +32,7 @@ var words = function(dbot) {
|
||||
}).join(''));
|
||||
}
|
||||
};
|
||||
this.commands['~jimble'].regex = [/^~jimble (.+)$/, 2];
|
||||
this.commands['~jimble'].regex = [/^jimble (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
this.wn = new Wordnik({
|
||||
|
@ -74,7 +74,7 @@ var youtube = function(dbot) {
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
this.commands['~youtube'].regex = [/^~youtube (.+)$/, 2];
|
||||
this.commands['~youtube'].regex = [/^youtube (.+)$/, 2];
|
||||
|
||||
this.onLoad = function() {
|
||||
dbot.api.link.addHandler(this.name, this.LinkRegex,
|
||||
|
Loading…
Reference in New Issue
Block a user