]>
Commit | Line | Data |
---|---|---|
6f7f2f85 NC |
1 | ### |
2 | # Copyright (c) 2016, Nicolas Coevoet | |
3 | # All rights reserved. | |
4 | # | |
5 | # Redistribution and use in source and binary forms, with or without | |
6 | # modification, are permitted provided that the following conditions are met: | |
7 | # | |
8 | # * Redistributions of source code must retain the above copyright notice, | |
9 | # this list of conditions, and the following disclaimer. | |
10 | # * Redistributions in binary form must reproduce the above copyright notice, | |
11 | # this list of conditions, and the following disclaimer in the | |
12 | # documentation and/or other materials provided with the distribution. | |
13 | # * Neither the name of the author of this software nor the name of | |
14 | # contributors to this software may be used to endorse or promote products | |
15 | # derived from this software without specific prior written consent. | |
16 | # | |
17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
19 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
20 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
21 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
22 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
23 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
25 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
26 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
27 | # POSSIBILITY OF SUCH DAMAGE. | |
28 | ||
29 | ### | |
30 | ||
31 | import supybot.conf as conf | |
32 | import supybot.registry as registry | |
33 | try: | |
34 | from supybot.i18n import PluginInternationalization | |
35 | _ = PluginInternationalization('Sigyn') | |
36 | except: | |
37 | # Placeholder that allows to run the plugin on a bot | |
38 | # without the i18n module | |
39 | _ = lambda x:x | |
40 | ||
41 | def configure(advanced): | |
42 | # This will be called by supybot to configure this module. advanced is | |
43 | # a bool that specifies whether the user identified himself as an advanced | |
44 | # user or not. You should effect your configuration by manipulating the | |
45 | # registry as appropriate. | |
46 | from supybot.questions import expect, anything, something, yn | |
47 | conf.registerPlugin('Sigyn', True) | |
48 | ||
49 | ||
50 | Sigyn = conf.registerPlugin('Sigyn') | |
51 | ||
52 | conf.registerGlobalValue(Sigyn, 'enable', | |
53 | registry.Boolean(False, """set to True to enable kill and klines, otherwise bot will only report to logChannel""")) | |
54 | ||
c22f5ade NC |
55 | conf.registerGlobalValue(Sigyn, 'mainChannel', |
56 | registry.String("#freenode","""main channel, where bot stay opped and op staffer on +z""")) | |
57 | ||
70bd3e0c NC |
58 | conf.registerGlobalValue(Sigyn, 'snoopChannel', |
59 | registry.String("", """channel where services stuff are announced""")) | |
60 | ||
61 | conf.registerGlobalValue(Sigyn, 'mxbl', | |
62 | registry.CommaSeparatedListOfStrings([''],"""patterns to match""")) | |
63 | ||
9fd9b4f6 NC |
64 | conf.registerGlobalValue(Sigyn, 'wordsList', |
65 | registry.CommaSeparatedListOfStrings([''],"""paths of files contains one word per line""")) | |
a15240d5 NC |
66 | conf.registerGlobalValue(Sigyn, 'wordMinimum', |
67 | registry.PositiveInteger(4,"""minimum length of words to use for detection""")) | |
9fd9b4f6 | 68 | |
21efdd22 NC |
69 | conf.registerGlobalValue(Sigyn, 'minimumUsersInChannel', |
70 | registry.Integer(-1,"""if /invite enabled, ( see lastActionTaken ), bot will do /list #channel to ensure it has enough users before joining""")) | |
71 | ||
6f7f2f85 NC |
72 | conf.registerGlobalValue(Sigyn, 'logChannel', |
73 | registry.String("", """channel where bot's actions is announced""")) | |
74 | conf.registerGlobalValue(Sigyn, 'useNotice', | |
75 | registry.Boolean(False, """use notices for announces in logChannel""")) | |
76 | ||
b78d8847 | 77 | conf.registerGlobalValue(Sigyn,'resolverTimeout', |
1d9adcdf | 78 | registry.PositiveInteger(3, """max duration of dns request/resolve in seconds""")) |
b78d8847 | 79 | |
6f7f2f85 NC |
80 | conf.registerGlobalValue(Sigyn, 'klineDuration', |
81 | registry.Integer(-1, """kline duration, in minutes, with -1, bot will not kill or kline""")) | |
82 | conf.registerGlobalValue(Sigyn, 'klineMessage', | |
83 | registry.String("Please do not spam users or channels on freenode. If in error, please contact kline@freenode.net.", """default reason used in kline's message""")) | |
06bd28a0 | 84 | conf.registerChannelValue(Sigyn, 'killMessage', |
6f7f2f85 NC |
85 | registry.String("Spam is off topic on freenode.", """kill reason""")) |
86 | ||
87 | conf.registerGlobalValue(Sigyn, 'operatorNick', | |
84747938 | 88 | registry.String("", """oper's nick, must be filled""", private=True)) |
6f7f2f85 | 89 | conf.registerGlobalValue(Sigyn, 'operatorPassword', |
84747938 | 90 | registry.String("", """oper's password, must be filled""", private=True)) |
6f7f2f85 NC |
91 | |
92 | conf.registerGlobalValue(Sigyn, 'alertPeriod', | |
93 | registry.PositiveInteger(1,"""interval between 2 alerts of same type in logChannel""")) | |
94 | conf.registerGlobalValue(Sigyn, 'netsplitDuration', | |
95 | registry.PositiveInteger(1,"""duration of netsplit ( which disable some protections )""")) | |
96 | ||
97 | conf.registerGlobalValue(Sigyn, 'alertOnWideKline', | |
98 | registry.Integer(-1,"""alert if a kline hits more than expected users""")) | |
99 | ||
730f1fc2 NC |
100 | conf.registerGlobalValue(Sigyn, 'decloakPermit', |
101 | registry.Integer(-1,"""-1 to disable, alert in logChannel if limit reached""")) | |
102 | conf.registerGlobalValue(Sigyn, 'decloakLife', | |
103 | registry.PositiveInteger(1,"""duration of stored akick add/del in seconds""")) | |
104 | ||
18f102f7 NC |
105 | conf.registerGlobalValue(Sigyn, 'banPermit', |
106 | registry.Integer(-1, """-1 to disable, number of ban/quiet allowed during banLife""")) | |
107 | conf.registerGlobalValue(Sigyn, 'banLife', | |
108 | registry.PositiveInteger(1, """duration of ban computation, used to alert that someone is collecting bans""")) | |
109 | ||
28164a19 NC |
110 | conf.registerGlobalValue(Sigyn, 'lagPermit', |
111 | registry.Integer(-1, """max lag allowed in seconds, otherwise entering netsplit mode""")) | |
112 | conf.registerGlobalValue(Sigyn, 'lagInterval', | |
87804149 | 113 | registry.PositiveInteger(1, """interval between two check about lag, also used to garbage collect useless items in internal state""")) |
28164a19 | 114 | |
b21941a8 NC |
115 | conf.registerGlobalValue(Sigyn, 'serverFilteringPermit', |
116 | registry.Integer(-1, """-1 to disable, enable dnsbling and klining when server trigger filtering messages""")) | |
117 | conf.registerGlobalValue(Sigyn, 'serverFilteringLife', | |
118 | registry.PositiveInteger(1, """life of message in buffer in seconds""")) | |
119 | ||
8732a8a6 NC |
120 | conf.registerGlobalValue(Sigyn, 'ghostPermit', |
121 | registry.Integer(-1, """max number of ghost connections allowed""")) | |
122 | ||
5ecb3350 NC |
123 | conf.registerGlobalValue(Sigyn, 'saslPermit', |
124 | registry.Integer(-1,"""sasl attempts allowed, -1 to disable""")) | |
125 | conf.registerGlobalValue(Sigyn, 'saslLife', | |
126 | registry.PositiveInteger(300, """life of messages to keep""")) | |
127 | conf.registerGlobalValue(Sigyn, 'saslDuration', | |
128 | registry.PositiveInteger(240, """dline duration in minutes""")) | |
129 | conf.registerGlobalValue(Sigyn, 'saslMessage', | |
130 | registry.String("Banned due to too many failed login attempts in a short period, email kline@freenode.net when corrected. Thanks!", """dline message""")) | |
131 | ||
e35a4b0e NC |
132 | conf.registerChannelValue(Sigyn, 'lastActionTaken', |
133 | registry.Float(0.0, """store date of last action taken in a channel""")) | |
eedaff77 NC |
134 | conf.registerChannelValue(Sigyn, 'leaveChannelIfNoActivity', |
135 | registry.Integer(-1, """leave channel after days of inactivity, -1 to disable""")) | |
2550c850 | 136 | |
b888f64b NC |
137 | conf.registerGlobalValue(Sigyn, 'announcePermit', |
138 | registry.Integer(-1,"""number of announce permit in logChannel,if triggered the bot will stay quiet for alertPeriod, -1 to disable""")) | |
139 | conf.registerGlobalValue(Sigyn, 'announceLife', | |
140 | registry.PositiveInteger(1,"""life of announce in memory (seconds)""")) | |
141 | ||
45ac582a NC |
142 | conf.registerGlobalValue(Sigyn, 'ipv4AbusePermit', |
143 | registry.Integer(-1, """check /24 on ipv4 klines made by the bot, -1 to disable, if triggered, announce in logChannel""")) | |
144 | conf.registerGlobalValue(Sigyn, 'ipv4AbuseLife', | |
145 | registry.PositiveInteger(1, """life duration of those kline in seconds""")) | |
6f7f2f85 | 146 | |
4165a619 NC |
147 | conf.registerGlobalValue(Sigyn, 'useWhoWas', |
148 | registry.Boolean(False, """use whowas for resolving ip""")) | |
149 | ||
f35897a2 NC |
150 | conf.registerGlobalValue(Sigyn, 'useOperServ', |
151 | registry.Boolean(False, """use OperServ AKILL instead of KLINE""")) | |
152 | ||
7f2e65ae NC |
153 | conf.registerGlobalValue(Sigyn,'msgInviteConfirm', |
154 | registry.String("Your request has been submitted to freenode staff.","""sent to op who requested /invite""")) | |
155 | ||
2842e065 | 156 | conf.registerGlobalValue(Sigyn,'msgTooManyGhost', |
7f2e65ae NC |
157 | registry.String("Banned due to too many connections in a short period, email kline@freenode.net when corrected.","""sent to op who requested /invite""")) |
158 | ||
159 | conf.registerGlobalValue(Sigyn,'staffCloak', | |
f35897a2 | 160 | registry.String("freenode/staff/","""used to identify staffers""")) |
7f2e65ae | 161 | |
03ed488b NC |
162 | # to fight some specific spambot |
163 | conf.registerGlobalValue(Sigyn, 'channelCreationPermit', | |
164 | registry.Integer(-1,"""-1 to disable, announce always, kline on defcon""")) | |
165 | conf.registerGlobalValue(Sigyn, 'channelCreationLife', | |
166 | registry.PositiveInteger(60, """life of messages to keep""")) | |
09e2c886 NC |
167 | conf.registerGlobalValue(Sigyn, 'lethalChannels', |
168 | registry.CommaSeparatedListOfStrings([''],"""patterns to match""")) | |
03ed488b | 169 | |
b888f64b | 170 | # dronebl submit |
6f7f2f85 | 171 | conf.registerGlobalValue(Sigyn, 'droneblKey', |
06bd28a0 | 172 | registry.String("", """dronebl key for rpc calls""", private=True)) |
6f7f2f85 NC |
173 | conf.registerGlobalValue(Sigyn, 'droneblHost', |
174 | registry.String("http://dronebl.org/RPC2", """where bot must do rpc calls""")) | |
f7007307 NC |
175 | conf.registerGlobalValue(Sigyn, 'droneblPatterns', |
176 | registry.CommaSeparatedListOfStrings([''],"""patterns to match""")) | |
e4bec0e3 NC |
177 | |
178 | conf.registerGlobalValue(Sigyn, 'secretChannel', | |
179 | registry.String("","""secretChannel""")) | |
6f7f2f85 NC |
180 | # report |
181 | conf.registerGlobalValue(Sigyn, 'reportChannel', | |
182 | registry.String("","""channel of the instance""")) | |
b888f64b NC |
183 | conf.registerGlobalValue(Sigyn, 'reportNicks', |
184 | registry.CommaSeparatedListOfStrings([''],"""bots nicks""")) | |
6f7f2f85 NC |
185 | conf.registerGlobalValue(Sigyn, 'reportPermit', |
186 | registry.Integer(-1,"""number of proxy detected, -1 to disable""")) | |
187 | conf.registerGlobalValue(Sigyn, 'reportLife', | |
188 | registry.PositiveInteger(1,"""life duration of proxies, in seconds""")) | |
189 | conf.registerGlobalValue(Sigyn, 'defcon', | |
190 | registry.PositiveInteger(1,"""duration of defcon mode in seconds, where bot is more agressive, with lowered abuse triggers and no ignores""")) | |
191 | ||
192 | # amsg | |
e6957b3f | 193 | conf.registerGlobalValue(Sigyn, 'amsgMinimum', |
6f7f2f85 NC |
194 | registry.PositiveInteger(1,"""length of text necessary to start amsg check""")) |
195 | conf.registerGlobalValue(Sigyn, 'amsgPermit', | |
196 | registry.Integer(-1,"""number of channels allowed with same message""")) | |
197 | conf.registerGlobalValue(Sigyn, 'amsgLife', | |
198 | registry.PositiveInteger(1,"""life of channels in seconds""")) | |
199 | conf.registerGlobalValue(Sigyn, 'amsgPercent', | |
200 | registry.Probability(1.00,"""percent of similarity between two messages""")) | |
201 | ||
202 | # service notices | |
203 | ||
b888f64b NC |
204 | # user nick changes snote |
205 | conf.registerGlobalValue(Sigyn, 'nickChangePermit', | |
206 | registry.Integer(-1,"""number of server notices (nick changes) allowed for a given period""")) | |
207 | conf.registerGlobalValue(Sigyn, 'nickChangeLife', | |
208 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
209 | ||
6f7f2f85 NC |
210 | # channel flood snote |
211 | conf.registerGlobalValue(Sigyn, 'channelFloodPermit', | |
212 | registry.Integer(-1,"""number of server notices (possible flooder) from various host allowed for a given channel""")) | |
213 | conf.registerGlobalValue(Sigyn, 'channelFloodLife', | |
214 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
215 | ||
216 | # user flood snote | |
217 | conf.registerGlobalValue(Sigyn, 'userFloodPermit', | |
218 | registry.Integer(-1,"""number of snotes about flood targeted a given user with differents hosts""")) | |
219 | conf.registerGlobalValue(Sigyn, 'userFloodLife', | |
220 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
221 | ||
222 | # join/spam snote | |
223 | conf.registerGlobalValue(Sigyn, 'joinRatePermit', | |
224 | registry.Integer(-1,"""number of snotes about join floodfor a given channel with differents users""")) | |
225 | conf.registerGlobalValue(Sigyn, 'joinRateLife', | |
226 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
227 | ||
68303e96 NC |
228 | conf.registerGlobalValue(Sigyn, 'crawlPermit', |
229 | registry.Integer(-1,"""number of snotes about join floodfor a given channel with differents users""")) | |
230 | conf.registerGlobalValue(Sigyn, 'crawlLife', | |
231 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
232 | ||
6f7f2f85 | 233 | # NickServ ID failures |
6f7f2f85 NC |
234 | conf.registerGlobalValue(Sigyn, 'idPermit', |
235 | registry.Integer(-1,"""number of snotes about id failure from a given user and different account""")) | |
236 | conf.registerGlobalValue(Sigyn, 'idLife', | |
237 | registry.PositiveInteger(1,"""life duration of message in those snote""")) | |
238 | ||
03ed488b NC |
239 | conf.registerGlobalValue(Sigyn, 'registerPermit', |
240 | registry.Integer(-1,"""number of register allowed per ip during registerLife""")) | |
241 | conf.registerGlobalValue(Sigyn, 'registerLife', | |
242 | registry.PositiveInteger(1,"""life of notices in seconds""")) | |
243 | ||
c27f7c2a | 244 | # change modes on defcon |
47e9a74a NC |
245 | conf.registerChannelValue(Sigyn, 'defconMode', |
246 | registry.Boolean(False,"""changes +qz $~a -qz $~a on defcon""")) | |
247 | ||
54deeac6 NC |
248 | # unicode exploits |
249 | conf.registerChannelValue(Sigyn, 'badunicodeLimit', | |
250 | registry.Integer(-1,"""score of message with bad unicode limit""")) | |
251 | conf.registerChannelValue(Sigyn, 'badunicodePermit', | |
252 | registry.Integer(-1,"""number bad unicode message allowed""")) | |
253 | conf.registerChannelValue(Sigyn, 'badunicodeLife', | |
254 | registry.PositiveInteger(1,"""life of bad unicode message""")) | |
e6957b3f NC |
255 | conf.registerChannelValue(Sigyn, 'badunicodeScore', |
256 | registry.PositiveInteger(1,"""score of message to trigger limit""")) | |
54deeac6 | 257 | |
6f7f2f85 NC |
258 | # Quit flood |
259 | conf.registerChannelValue(Sigyn, 'brokenPermit', | |
260 | registry.Integer(-1,"""number of quit allowed""")) | |
261 | conf.registerChannelValue(Sigyn, 'brokenLife', | |
262 | registry.PositiveInteger(1,"""life duration of buffer for broken client detection""")) | |
263 | conf.registerChannelValue(Sigyn, 'brokenDuration', | |
264 | registry.PositiveInteger(1,"""kline duration in minutes""")) | |
265 | conf.registerChannelValue(Sigyn, 'brokenReason', | |
266 | registry.String("Your irc client seems broken and is flooding lots of channels. Banned for %s min, if in error, please contact kline@freenode.net.","""kline reason""")) | |
267 | conf.registerChannelValue(Sigyn, 'brokenHost', | |
268 | registry.CommaSeparatedListOfStrings([''], """list of knowns broken host""")) | |
269 | ||
c27f7c2a | 270 | # ignores feature |
54deeac6 NC |
271 | conf.registerChannelValue(Sigyn, 'ignoreRegisteredUser', |
272 | registry.Boolean(False, """ignore registered users in the channel""")) | |
6f7f2f85 NC |
273 | conf.registerChannelValue(Sigyn, 'ignoreChannel', |
274 | registry.Boolean(False, """ignore everything in the channel""")) | |
8a5d024b NC |
275 | conf.registerChannelValue(Sigyn, 'ignoreVoicedUser', |
276 | registry.Boolean(False, """ignore voiced users in the channel""")) | |
6f7f2f85 NC |
277 | conf.registerChannelValue(Sigyn, 'ignoreDuration', |
278 | registry.Integer(-1, """in secondes: if -1 disabled, otherwise bot ignores user's privmsg/notices after <seconds> in channel""")) | |
279 | ||
280 | # abuses lowered thresold for given channel and a given abuse, and lift ignores | |
281 | conf.registerChannelValue(Sigyn, 'abusePermit', | |
8895121b | 282 | registry.Integer(-1,"""-1 to disable, reduces threshold of triggers when they occurs more than abusePermit during abuseLife""")) |
6f7f2f85 NC |
283 | conf.registerChannelValue(Sigyn, 'abuseLife', |
284 | registry.PositiveInteger(1,"""life duration of message in the buffer detection, in seconds""")) | |
285 | conf.registerChannelValue(Sigyn, 'abuseDuration', | |
286 | registry.PositiveInteger(1,"""duration in seconds of abuse state""")) | |
287 | ||
288 | # ignored users can still trigger klines if desired | |
289 | conf.registerChannelValue(Sigyn, 'bypassIgnorePermit', | |
290 | registry.Integer(-1,"""number of triggers allowed while ignored, -1 to disable""")) | |
291 | conf.registerChannelValue(Sigyn, 'bypassIgnoreLife', | |
292 | registry.PositiveInteger(1,"""in seconds""")) | |
293 | ||
294 | # channel protections | |
c27f7c2a NC |
295 | conf.registerChannelValue(Sigyn, 'clearTmpPatternOnUnkline', |
296 | registry.Boolean(False, """clean channel's temporary patterns on unkline requested by channel's op""")) | |
297 | ||
70bd3e0c | 298 | conf.registerChannelValue(Sigyn, 'massJoinPermit', |
c27f7c2a | 299 | registry.Integer(-1,"""number of joins allowed during massJoinLife, -1 to disable""")) |
70bd3e0c | 300 | conf.registerChannelValue(Sigyn, 'massJoinLife', |
c27f7c2a NC |
301 | registry.PositiveInteger(1,"""life duration of messages in the massJoin detection""")) |
302 | ||
303 | conf.registerChannelValue(Sigyn, 'massJoinNickPermit', | |
304 | registry.Integer(-1,"""number of smiliar nick joins allowed during massJoinNickLife, -1 to disable""")) | |
305 | conf.registerChannelValue(Sigyn, 'massJoinNickLife', | |
306 | registry.PositiveInteger(1,"""life duration of messages in the massJoinNick detection""")) | |
307 | ||
308 | conf.registerChannelValue(Sigyn, 'massJoinHostPermit', | |
309 | registry.Integer(-1,"""number of smiliar host joins allowed during massJoinHostLife, -1 to disable""")) | |
310 | conf.registerChannelValue(Sigyn, 'massJoinHostLife', | |
311 | registry.PositiveInteger(1,"""life duration of messages in the massJoinHost detection""")) | |
312 | ||
313 | conf.registerChannelValue(Sigyn, 'massJoinGecosPermit', | |
314 | registry.Integer(-1,"""number of smiliar gecos joins allowed during massJoinGecosLife, -1 to disable""")) | |
315 | conf.registerChannelValue(Sigyn, 'massJoinGecosLife', | |
316 | registry.PositiveInteger(1,"""life duration of messages in the massJoinGecos detection""")) | |
317 | ||
70bd3e0c | 318 | conf.registerChannelValue(Sigyn, 'massJoinPercent', |
c27f7c2a | 319 | registry.Probability(1.00,"""percent of similarity between two pattern ( for nicks and gecos )""")) |
70bd3e0c | 320 | conf.registerChannelValue(Sigyn, 'massJoinMinimum', |
c27f7c2a NC |
321 | registry.PositiveInteger(1,"""length of pattern to match as least""")) |
322 | ||
323 | conf.registerChannelValue(Sigyn, 'massJoinTakeAction', | |
324 | registry.Boolean(False, """takes actions against massJoin found hosts/gecos/nicks""")) | |
70bd3e0c | 325 | |
6f7f2f85 NC |
326 | conf.registerChannelValue(Sigyn, 'floodPermit', |
327 | registry.Integer(-1,"""number of messages allowed during floodLife, -1 to disable""")) | |
328 | conf.registerChannelValue(Sigyn, 'floodLife', | |
329 | registry.PositiveInteger(1,"""life duration of message in the flood buffer detection""")) | |
330 | conf.registerChannelValue(Sigyn, 'floodMinimum', | |
331 | registry.PositiveInteger(1,"""minimun number of chars to enter flood detection""")) | |
332 | ||
333 | conf.registerChannelValue(Sigyn, 'lowFloodPermit', | |
334 | registry.Integer(-1,"""number of messages allowed during lowFoodLife, -1 to disable""")) | |
335 | conf.registerChannelValue(Sigyn, 'lowFloodLife', | |
336 | registry.PositiveInteger(1,"""life duration of message in the lowFlood buffer detection""")) | |
337 | ||
645a036d NC |
338 | conf.registerChannelValue(Sigyn, 'capPermit', |
339 | registry.Integer(-1,"""number of uppercase messages allowed, -1 to disable""")) | |
340 | conf.registerChannelValue(Sigyn, 'capLife', | |
341 | registry.PositiveInteger(1,"""life duration of message in the uppercase buffer detection""")) | |
342 | conf.registerChannelValue(Sigyn, 'capPercent', | |
343 | registry.PositiveInteger(80,"""percent of the message in uppercase""")) | |
344 | conf.registerChannelValue(Sigyn, 'capMinimum', | |
345 | registry.PositiveInteger(1,"""minimun number of chars to enter cap detection""")) | |
346 | ||
6f7f2f85 | 347 | conf.registerChannelValue(Sigyn, 'repeatPermit', |
c56a3fc6 | 348 | registry.Integer(-1,"""number of repeated trigger allowed during repeatLife, -1 to disable""")) |
6f7f2f85 NC |
349 | conf.registerChannelValue(Sigyn, 'repeatLife', |
350 | registry.PositiveInteger(1,"""life duration of message in the repeat buffer detection""")) | |
351 | conf.registerChannelValue(Sigyn, 'repeatPercent', | |
c56a3fc6 | 352 | registry.Probability(1.00,"""percent of similarity between two pattern to trigger repeat detection""")) |
6f7f2f85 | 353 | conf.registerChannelValue(Sigyn, 'repeatCount', |
c56a3fc6 NC |
354 | registry.PositiveInteger(1,"""if pattern is smaller than computedPattern, bot may still add it anyway, if occured more than repeatCount""")) |
355 | conf.registerChannelValue(Sigyn, 'repeatMinimum', | |
6f7f2f85 NC |
356 | registry.PositiveInteger(1,"""minimal length of a pattern, in that case, the pattern must be repeated more than at least repeatCount in the message""")) |
357 | ||
358 | conf.registerChannelValue(Sigyn, 'lowRepeatPermit', | |
c56a3fc6 | 359 | registry.Integer(-1,"""number of repeated messages allowed during lowrepeatLife, -1 to disable""")) |
6f7f2f85 | 360 | conf.registerChannelValue(Sigyn, 'lowRepeatLife', |
c56a3fc6 | 361 | registry.PositiveInteger(1,"""life duration of message in the lowrepeat buffer detection""")) |
6f7f2f85 | 362 | conf.registerChannelValue(Sigyn, 'lowRepeatPercent', |
c56a3fc6 NC |
363 | registry.Probability(1.00,"""percent of similarity between two messages to trigger lowrepeat detection""")) |
364 | conf.registerChannelValue(Sigyn, 'lowRepeatCount', | |
365 | registry.PositiveInteger(1,"""keep this value to 1, this settings only exist because repeat and lowrepeat use nearly the same code""")) | |
6f7f2f85 | 366 | conf.registerChannelValue(Sigyn, 'lowRepeatMinimum', |
c56a3fc6 | 367 | registry.PositiveInteger(1,"""minimun number of chars to enter lowRepeat detection""")) |
6f7f2f85 NC |
368 | |
369 | conf.registerChannelValue(Sigyn, 'massRepeatPermit', | |
370 | registry.Integer(-1,"""number of mass repeat permit duration massRepeatLife, -1 to disable""")) | |
371 | conf.registerChannelValue(Sigyn, 'massRepeatLife', | |
372 | registry.PositiveInteger(1,"""Duration of messages's life in massRepeat counter, in seconds""")) | |
373 | conf.registerChannelValue(Sigyn, 'massRepeatPercent', | |
374 | registry.Probability(1.00,"""percentage similarity between previous and current message to trigger a massRepeat count""")) | |
375 | conf.registerChannelValue(Sigyn, 'massRepeatMinimum', | |
8895121b | 376 | registry.PositiveInteger(1,"""minimum number of chars to enter massRepeat detection""")) |
6f7f2f85 | 377 | |
730f1fc2 NC |
378 | conf.registerChannelValue(Sigyn, 'joinSpamPartPermit', |
379 | registry.Integer(-1,"""number of messages before leaving channel, -1 to disable""")) | |
380 | conf.registerChannelValue(Sigyn, 'joinSpamPartLife', | |
381 | registry.PositiveInteger(1,"""duration in seconds of user presence in channel""")) | |
382 | ||
645a036d NC |
383 | |
384 | ||
6f7f2f85 | 385 | conf.registerChannelValue(Sigyn, 'computedPattern', |
8895121b | 386 | registry.Integer(-1,"""minimun number of chars needed to keep it as a spam pattern, -1 to disable""")) |
6f7f2f85 | 387 | conf.registerChannelValue(Sigyn, 'computedPatternLife', |
8895121b | 388 | registry.PositiveInteger(1,"""life in seconds of computed pattern""")) |
2f79d105 NC |
389 | conf.registerChannelValue(Sigyn, 'shareComputedPatternID', |
390 | registry.Integer(-1,"""share the temporary pattern created to all channels with the same number, -1 to disable""")) | |
391 | ||
6f7f2f85 NC |
392 | conf.registerChannelValue(Sigyn, 'lowMassRepeatPermit', |
393 | registry.Integer(-1,"""number of mass repeat permit duration massRepeatLife, -1 to disable""")) | |
394 | conf.registerChannelValue(Sigyn, 'lowMassRepeatLife', | |
395 | registry.PositiveInteger(1,"""Duration of messages's life in massRepeat counter, in seconds""")) | |
396 | conf.registerChannelValue(Sigyn, 'lowMassRepeatPercent', | |
397 | registry.Probability(1.00,"""percentage similarity between previous and current message to trigger a massRepeat count""")) | |
398 | conf.registerChannelValue(Sigyn, 'lowMassRepeatMinimum', | |
399 | registry.PositiveInteger(1,"""minimun number of chars to enter massRepeat detection""")) | |
400 | ||
401 | conf.registerChannelValue(Sigyn, 'hilightNick', | |
402 | registry.Integer(-1,"""number nick allowed per message, -1 to disable""")) | |
403 | conf.registerChannelValue(Sigyn, 'hilightPermit', | |
404 | registry.Integer(-1,"""number of hilight detection allowed during hilightLife, -1 to disable""")) | |
405 | conf.registerChannelValue(Sigyn, 'hilightLife', | |
406 | registry.PositiveInteger(1,"""life duration of hilight buffer""")) | |
407 | ||
408 | conf.registerChannelValue(Sigyn, 'lowHilightNick', | |
409 | registry.Integer(-1,"""number nick allowed per message, -1 to disable""")) | |
410 | conf.registerChannelValue(Sigyn, 'lowHilightPermit', | |
411 | registry.Integer(-1,"""number of hilight detection allowed during hilightLife, -1 to disable""")) | |
412 | conf.registerChannelValue(Sigyn, 'lowHilightLife', | |
413 | registry.PositiveInteger(1,"""life duration of hilight buffer""")) | |
414 | ||
415 | conf.registerChannelValue(Sigyn, 'cyclePermit', | |
416 | registry.Integer(-1,"""number of cycle allowed during cycleLife""")) | |
417 | conf.registerChannelValue(Sigyn, 'cycleLife', | |
418 | registry.PositiveInteger(1,"""life duration of part/quit in the cycle buffer detection""")) | |
419 | ||
420 | conf.registerChannelValue(Sigyn, 'ctcpPermit', | |
421 | registry.Integer(-1,"""number of channel's ctcp allowed""")) | |
422 | conf.registerChannelValue(Sigyn, 'ctcpLife', | |
c27f7c2a NC |
423 | registry.PositiveInteger(1,"""life duration of channel's ctcp buffer detection""")) |
424 | ||
425 | conf.registerChannelValue(Sigyn, 'noticePermit', | |
426 | registry.Integer(-1,"""number of channel's notice allowed""")) | |
427 | conf.registerChannelValue(Sigyn, 'noticeLife', | |
428 | registry.PositiveInteger(1,"""life duration of channel's notice buffer detection""")) | |
6f7f2f85 NC |
429 | |
430 | conf.registerChannelValue(Sigyn, 'nickPermit', | |
431 | registry.Integer(-1,"""number of nick change allowed during cycleLife""")) | |
432 | conf.registerChannelValue(Sigyn, 'nickLife', | |
433 | registry.PositiveInteger(1,"""life duration of nick changes buffer detection""")) | |
54deeac6 | 434 |