-
Notifications
You must be signed in to change notification settings - Fork 9
/
config.js
116 lines (116 loc) · 4.08 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// comment out the next line to disable the webserver
module.exports.port = 40091;
module.exports.api_url = 'http://meme.loqi.me';
module.exports.default_image = 'http://meme.loqi.me/img/aliens.jpg';
module.exports.default_pos = 'bottom';
module.exports.debug = false;
module.exports.meme_on_topic_change = false;
module.exports.throttleSeconds = 0;
module.exports.detectors = [
{
regex: /(^I don't always .+) (but when I do,? .+$)/i,
img: 'http://meme.loqi.me/img/most_interesting.jpg',
testString: "I don't always test my code, but when I do, I do it in production."
},
{
regex: /(\w+(?: \w+)?) (all the .+s)[!\.]*$/i,
img: 'http://meme.loqi.me/img/all_the_things.jpg',
testString: "Refactor all the things!"
},
{
regex: /(^one does not simply) (.+$)/i,
img: 'http://meme.loqi.me/img/boromir.jpg',
testString: "One does not simply meme in IRC."
},
{
regex: /(^not sure if [^\|]+)(?: \|)? (or .+$)/i,
img: 'http://meme.loqi.me/img/fry.png',
testString: "Not sure if this is working, or is awesome."
},
{
regex: /(^yo,? (?:dawg|dog)[\.,]* I hea?rd (?:you|u) like .+) (so (?:i|we) .+$)/i,
img: 'http://meme.loqi.me/img/xzibit.jpg',
testString: "Yo dawg I herd you like regex. so we put a regex in yo regex so you can match while you match."
},
{
regex: /(^the .+) (is too (?:damn )?high[!\.]?$)/i,
img: 'http://meme.loqi.me/img/too_damn_high.jpg',
testString: "The amount of memes in this channel is too damn high!"
},
{
regex: /(^(?:brace yourselves,? )?)(.+ (?:is|are) coming[!\.]?$)/i,
img: 'http://meme.loqi.me/img/ned_stark.jpg',
testString: "Brace yourselves the memes are coming."
},
{
regex: /(^what if) (.+[\?!]+$)/i,
img: 'http://meme.loqi.me/img/conspiracy_keanu.jpg',
testString: "What if space nachos?!"
},
{
regex: /(^.+) (and you should feel bad\.?$)/i,
img: 'http://meme.loqi.me/img/you_should_feel_bad.jpg',
testString: "This meme is bad; and you should feel bad."
},
{
regex: /(^.+) (y u no .+$)/i,
img: 'http://meme.loqi.me/img/y_u_no.jpg',
testString: "IRC y u no do memes yourself?"
},
{
regex: /(^am i the only one around here) (.+$)/i,
img: 'http://meme.loqi.me/img/walter.jpg',
testString: "Am I the only one around here who gives a shit about the rules?!"
},
{
regex: /(^.+) (so hot right now[\.!]*$)/i,
img: 'http://meme.loqi.me/img/mugatu.jpg',
testString: "Memes, so hot right now."
},
{
regex: /(^ermahgerd[!\.]*) (.+$)/i,
img: 'http://meme.loqi.me/img/ermahgerd.jpg',
testString: "ermahgerd! Space nachos!"
},
{
regex: /(^.+) (is strong with this one[!\.]*$)/i,
img: 'http://meme.loqi.me/img/emperor.jpg',
testString: "The force is strong with this one."
},
{
regex: /(^this is) (.+!$)/i,
img: 'http://meme.loqi.me/img/sparta.jpg',
testString: "This is IRC!"
},
{
regex: /(^.+,?) (ain'?t nobody got time for? (?:th|d)at[!\.]*)$/i,
img: 'http://meme.loqi.me/img/time_for.jpg',
testString: "Bronchitis, ain't nobody got time for that!"
},
{
regex: /(.+) (\w+ go(?:es)? to (?:eleven|11))!?$/i,
img: 'http://meme.loqi.me/img/goes_to_eleven.jpg',
testString: "The memes, they go to eleven!"
},
{
regex: /^()(fantastic)!*$/i,
img: 'http://meme.loqi.me/img/fantastic-doctor.jpg',
testString: "fantastic!"
},
{
regex: /(.+ over )([0-9]+)([\.!]*)$/i,
img: 'http://meme.loqi.me/img/over_9000.jpg',
testString: "His karma, it's over 9000!",
postProc: function(match) {
var num = parseInt(match[2])
if ( num < 1000 ) {
num = num * 1000;
}
return {
message: match[1] + num + match[3],
t1: false,
t2: false
};
}
}
];