mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
do not fail broken regex
This commit is contained in:
parent
ae989d60ae
commit
554a9e995b
@ -16,7 +16,8 @@ var kill_namespam = function(dbot) {
|
|||||||
// Here we listen for atropos
|
// Here we listen for atropos
|
||||||
if(event.channel == this.config.cliconn_channel) {
|
if(event.channel == this.config.cliconn_channel) {
|
||||||
if(event.message.match('▶')) {
|
if(event.message.match('▶')) {
|
||||||
var matchedPattern = _.find(this.config.cliconn_patterns, function(p) { return event.message.match(p); })
|
var matchedPattern = _.find(this.config.cliconn_patterns,
|
||||||
|
function(p) { try { return event.message.match(p); } catch(e) {}; }); // ok.jpg
|
||||||
if(matchedPattern) {
|
if(matchedPattern) {
|
||||||
var ip = event.message.split(' ')[1]
|
var ip = event.message.split(' ')[1]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user