Merge lp:~stefanor/ibid/rename-feature-attr into lp:~ibid-core/ibid/old-trunk-1.6
- rename-feature-attr
- Merge into old-trunk-1.6
Proposed by
Stefano Rivera
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Stefano Rivera | ||||
Approved revision: | 920 | ||||
Merged at revision: | 921 | ||||
Proposed branch: | lp:~stefanor/ibid/rename-feature-attr | ||||
Merge into: | lp:~ibid-core/ibid/old-trunk-1.6 | ||||
Diff against target: |
1289 lines (+127/-124) 41 files modified
docs/api/ibid.plugins.rst (+1/-1) docs/tutorial.rst (+2/-2) ibid/plugins/__init__.py (+2/-2) ibid/plugins/admin.py (+8/-8) ibid/plugins/ascii.py (+2/-2) ibid/plugins/buildbot.py (+1/-1) ibid/plugins/bzr.py (+1/-1) ibid/plugins/calc.py (+3/-3) ibid/plugins/codecontest.py (+1/-1) ibid/plugins/conversions.py (+9/-6) ibid/plugins/eval.py (+3/-3) ibid/plugins/factoid.py (+6/-6) ibid/plugins/feeds.py (+2/-2) ibid/plugins/film.py (+2/-2) ibid/plugins/fun.py (+4/-4) ibid/plugins/games.py (+5/-5) ibid/plugins/gameservers.py (+2/-2) ibid/plugins/geography.py (+4/-4) ibid/plugins/google.py (+2/-2) ibid/plugins/help.py (+2/-2) ibid/plugins/icecast.py (+1/-1) ibid/plugins/identity.py (+8/-8) ibid/plugins/karma.py (+3/-3) ibid/plugins/languages.py (+2/-2) ibid/plugins/lotto.py (+1/-1) ibid/plugins/meetings.py (+3/-3) ibid/plugins/memo.py (+4/-4) ibid/plugins/memory.py (+2/-2) ibid/plugins/network.py (+8/-8) ibid/plugins/oeis.py (+1/-1) ibid/plugins/quotes.py (+6/-6) ibid/plugins/rfc.py (+1/-1) ibid/plugins/seen.py (+2/-2) ibid/plugins/social.py (+2/-2) ibid/plugins/sources.py (+5/-5) ibid/plugins/strings.py (+6/-6) ibid/plugins/svn.py (+1/-1) ibid/plugins/sysadmin.py (+4/-4) ibid/plugins/test.py (+1/-1) ibid/plugins/trac.py (+1/-1) ibid/plugins/urlinfo.py (+3/-3) |
||||
To merge this branch: | bzr merge lp:~stefanor/ibid/rename-feature-attr | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Keegan Carruthers-Smith | Approve | ||
Max Rabkin | Approve | ||
Michael Gorven | Approve | ||
Review via email: mp+22297@code.launchpad.net |
Commit message
Rename Processor.feature -> features as we changed it to a list
Description of the change
This should have been done before 0.1.0
To post a comment you must log in.
- 920. By Stefano Rivera
-
Merge from trunk
Revision history for this message
Max Rabkin (max-rabkin) wrote : | # |
Revision history for this message
Stefano Rivera (stefanor) wrote : | # |
No, it's an API change. For 2.x I think.
Revision history for this message
Michael Gorven (mgorven) wrote : | # |
Looks fine.
review approve
review:
Approve
Revision history for this message
Max Rabkin (max-rabkin) wrote : | # |
Oops, for some reason I thought you were proposing to merge this into 0.1.
review:
Approve
Revision history for this message
Keegan Carruthers-Smith (keegan-csmith) wrote : | # |
Looked for anything you may have missed out, couldn't find anything. Approve
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'docs/api/ibid.plugins.rst' |
2 | --- docs/api/ibid.plugins.rst 2010-03-02 20:37:03 +0000 |
3 | +++ docs/api/ibid.plugins.rst 2010-03-27 17:38:22 +0000 |
4 | @@ -31,7 +31,7 @@ |
5 | |
6 | Default: ``None`` |
7 | |
8 | - .. attribute:: feature |
9 | + .. attribute:: features |
10 | |
11 | List: Strings naming each feature that this Processor is part of. |
12 | Used in locating "usage" strings for on-line documentation. |
13 | |
14 | === modified file 'docs/tutorial.rst' |
15 | --- docs/tutorial.rst 2010-03-02 20:51:25 +0000 |
16 | +++ docs/tutorial.rst 2010-03-27 17:38:22 +0000 |
17 | @@ -247,7 +247,7 @@ |
18 | class Dice(Processor): |
19 | usage = u'roll <number> dice' |
20 | |
21 | - feature = ('dice',) |
22 | + features = ('dice',) |
23 | |
24 | @match(r'^roll\s+(\d+)\s+dic?e$') |
25 | def multithrow(self, event, number): |
26 | @@ -262,7 +262,7 @@ |
27 | and if necessary add a category to it from your module. |
28 | |
29 | The Processor can be linked to a feature by specifying it in the |
30 | -`feature` attribute. |
31 | +`features` attribute. |
32 | Usage for the Processor's functions (in BNF) goes in a `usage` |
33 | attribute. |
34 | "reload tutorial" and you should see "dice" appear in the features for |
35 | |
36 | === modified file 'ibid/plugins/__init__.py' |
37 | --- ibid/plugins/__init__.py 2010-03-23 15:21:27 +0000 |
38 | +++ ibid/plugins/__init__.py 2010-03-27 17:38:22 +0000 |
39 | @@ -259,7 +259,7 @@ |
40 | isLeaf = True |
41 | |
42 | def __init__(self): |
43 | - ibid.rpc[self.feature[0]] = self |
44 | + ibid.rpc[self.features[0]] = self |
45 | self.form = templates.get_template('plugin_form.html') |
46 | self.list = templates.get_template('plugin_functions.html') |
47 | |
48 | @@ -306,7 +306,7 @@ |
49 | if name.startswith('remote_'): |
50 | functions.append(name.replace('remote_', '', 1)) |
51 | |
52 | - return self.list.render(object=self.feature[0], functions=functions) \ |
53 | + return self.list.render(object=self.features[0], functions=functions) \ |
54 | .encode('utf-8') |
55 | |
56 | args, varargs, varkw, defaults = getargspec(function) |
57 | |
58 | === modified file 'ibid/plugins/admin.py' |
59 | --- ibid/plugins/admin.py 2010-02-20 21:58:38 +0000 |
60 | +++ ibid/plugins/admin.py 2010-03-27 17:38:22 +0000 |
61 | @@ -21,7 +21,7 @@ |
62 | } |
63 | class ListPLugins(Processor): |
64 | usage = u'list plugins' |
65 | - feature = ('plugins',) |
66 | + features = ('plugins',) |
67 | |
68 | @match(r'^lsmod|list\s+plugins$') |
69 | def handler(self, event): |
70 | @@ -38,7 +38,7 @@ |
71 | } |
72 | class ReloadCoreModules(Processor): |
73 | usage = u'reload (reloader|dispatcher|databases|auth)' |
74 | - feature = ('core',) |
75 | + features = ('core',) |
76 | |
77 | priority = -5 |
78 | permission = u'core' |
79 | @@ -56,7 +56,7 @@ |
80 | |
81 | class LoadModules(Processor): |
82 | usage = u'(load|unload|reload) <plugin|processor>' |
83 | - feature = ('plugins',) |
84 | + features = ('plugins',) |
85 | |
86 | permission = u'plugins' |
87 | |
88 | @@ -79,7 +79,7 @@ |
89 | } |
90 | class Die(Processor): |
91 | usage = u'die' |
92 | - feature = ('die',) |
93 | + features = ('die',) |
94 | |
95 | permission = u'admin' |
96 | |
97 | @@ -95,7 +95,7 @@ |
98 | class Admin(Processor): |
99 | usage = u"""(connect|disconnect) (to|from) <source> |
100 | load <source> source""" |
101 | - feature = ('sources',) |
102 | + features = ('sources',) |
103 | |
104 | permission = u'sources' |
105 | |
106 | @@ -129,7 +129,7 @@ |
107 | |
108 | class Info(Processor): |
109 | usage = u'(sources|list configured sources)' |
110 | - feature = ('sources',) |
111 | + features = ('sources',) |
112 | |
113 | @match(r'^sources$') |
114 | def list(self, event): |
115 | @@ -149,7 +149,7 @@ |
116 | } |
117 | class Version(Processor): |
118 | usage = u'version' |
119 | - feature = ('version',) |
120 | + features = ('version',) |
121 | |
122 | @match(r'^version$') |
123 | def show_version(self, event): |
124 | @@ -167,7 +167,7 @@ |
125 | usage = u"""reread config |
126 | set config <name> to <value> |
127 | get config <name>""" |
128 | - feature = ('config',) |
129 | + features = ('config',) |
130 | |
131 | priority = -10 |
132 | permission = u'config' |
133 | |
134 | === modified file 'ibid/plugins/ascii.py' |
135 | --- ibid/plugins/ascii.py 2010-02-20 21:58:38 +0000 |
136 | +++ ibid/plugins/ascii.py 2010-03-27 17:38:22 +0000 |
137 | @@ -35,7 +35,7 @@ |
138 | } |
139 | class DrawImage(Processor): |
140 | usage = u'draw <url> [in colour] [width <width>] [height <height>]' |
141 | - feature = ('draw-aa',) |
142 | + features = ('draw-aa',) |
143 | |
144 | max_filesize = IntOption('max_filesize', 'Only request this many KiB', 200) |
145 | def_height = IntOption('def_height', 'Default height for libaa output', 10) |
146 | @@ -153,7 +153,7 @@ |
147 | class WriteFiglet(Processor): |
148 | usage = u"""figlet <text> [in <font>] |
149 | list figlet fonts [from <index>]""" |
150 | - feature = ('figlet',) |
151 | + features = ('figlet',) |
152 | |
153 | max_width = IntOption('max_width', 'Maximum width for ascii output', 60) |
154 | fonts_ = Option('fonts', 'Directory or Zip file containing figlet fonts', |
155 | |
156 | === modified file 'ibid/plugins/buildbot.py' |
157 | --- ibid/plugins/buildbot.py 2010-02-20 21:58:38 +0000 |
158 | +++ ibid/plugins/buildbot.py 2010-03-27 17:38:22 +0000 |
159 | @@ -15,7 +15,7 @@ |
160 | }} |
161 | class BuildBot(Processor, RPC): |
162 | usage = u'rebuild <branch> [ (revision|r) <number> ]' |
163 | - feature = ('buildbot',) |
164 | + features = ('buildbot',) |
165 | autoload = False |
166 | |
167 | server = Option('server', 'Buildbot server hostname', 'localhost') |
168 | |
169 | === modified file 'ibid/plugins/bzr.py' |
170 | --- ibid/plugins/bzr.py 2010-02-21 09:45:01 +0000 |
171 | +++ ibid/plugins/bzr.py 2010-03-27 17:38:22 +0000 |
172 | @@ -62,7 +62,7 @@ |
173 | class Bazaar(Processor, RPC): |
174 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] |
175 | repositories""" |
176 | - feature = ('bzr',) |
177 | + features = ('bzr',) |
178 | autoload = False |
179 | |
180 | repositories = DictOption('repositories', 'Dict of repositories names and URLs') |
181 | |
182 | === modified file 'ibid/plugins/calc.py' |
183 | --- ibid/plugins/calc.py 2010-02-24 12:55:40 +0000 |
184 | +++ ibid/plugins/calc.py 2010-03-27 17:38:22 +0000 |
185 | @@ -37,7 +37,7 @@ |
186 | class BC(Processor): |
187 | usage = u'bc <expression>' |
188 | |
189 | - feature = ('bc',) |
190 | + features = ('bc',) |
191 | |
192 | bc = Option('bc', 'Path to bc executable', 'bc') |
193 | bc_timeout = FloatOption('bc_timeout', 'Maximum BC execution time (sec)', 2.0) |
194 | @@ -141,7 +141,7 @@ |
195 | |
196 | class Calc(Processor): |
197 | usage = u'<expression>' |
198 | - feature = ('calc',) |
199 | + features = ('calc',) |
200 | |
201 | priority = 500 |
202 | |
203 | @@ -212,7 +212,7 @@ |
204 | } |
205 | class Random(Processor): |
206 | usage = u'random [ <max> | <min> <max> ]' |
207 | - feature = ('random',) |
208 | + features = ('random',) |
209 | |
210 | @match('^rand(?:om)?(?:\s+(\d+)(?:\s+(\d+))?)?$') |
211 | def random(self, event, begin, end): |
212 | |
213 | === modified file 'ibid/plugins/codecontest.py' |
214 | --- ibid/plugins/codecontest.py 2010-02-20 21:58:38 +0000 |
215 | +++ ibid/plugins/codecontest.py 2010-03-27 17:38:22 +0000 |
216 | @@ -38,7 +38,7 @@ |
217 | admin_user = Option('admin_user', 'Admin user on USACO', None) |
218 | admin_password = Option('admin_password', 'Admin password on USACO', None) |
219 | |
220 | - feature = ('usaco',) |
221 | + features = ('usaco',) |
222 | # Clashes with identity, so lower our priority since if we match, then |
223 | # this is the better match |
224 | priority = -20 |
225 | |
226 | === modified file 'ibid/plugins/conversions.py' |
227 | --- ibid/plugins/conversions.py 2010-03-20 11:27:28 +0000 |
228 | +++ ibid/plugins/conversions.py 2010-03-27 17:38:22 +0000 |
229 | @@ -9,6 +9,7 @@ |
230 | |
231 | import ibid |
232 | from ibid.plugins import Processor, handler, match |
233 | +from ibid.compat import any |
234 | from ibid.config import Option |
235 | from ibid.utils import file_in_path, get_country_codes, human_join, \ |
236 | unicode_output |
237 | @@ -26,7 +27,7 @@ |
238 | [convert] ascii <text> to base <number> |
239 | [convert] <sequence> from base <number> to ascii""" |
240 | |
241 | - feature = ('base',) |
242 | + features = ('base',) |
243 | |
244 | abbr_named_bases = { |
245 | "hex": 16, |
246 | @@ -173,7 +174,8 @@ |
247 | 'base': self._base_name(base_to), |
248 | }) |
249 | |
250 | - if base_to == 64 and [True for plugin in ibid.processors if getattr(plugin, 'feature', None) == 'base64']: |
251 | + if base_to == 64 and any(True for plugin in ibid.processors |
252 | + if 'base64' in getattr(plugin, 'features', [])): |
253 | event.addresponse(u'If you want a base64 encoding, use the "base64" feature') |
254 | |
255 | @handler |
256 | @@ -213,7 +215,8 @@ |
257 | return |
258 | |
259 | event.addresponse(u'That is "%s"', output) |
260 | - if base_from == 64 and [True for plugin in ibid.processors if getattr(plugin, 'feature', None) == 'base64']: |
261 | + if base_from == 64 and any(True for plugin in ibid.processors |
262 | + if 'base64' in getattr(plugin, 'features', [])): |
263 | event.addresponse(u'If you want a base64 encoding, use the "base64" feature') |
264 | |
265 | features['units'] = { |
266 | @@ -222,7 +225,7 @@ |
267 | } |
268 | class Units(Processor): |
269 | usage = u'convert [<value>] <unit> to <unit>' |
270 | - feature = ('units',) |
271 | + features = ('units',) |
272 | priority = 10 |
273 | |
274 | units = Option('units', 'Path to units executable', 'units') |
275 | @@ -303,7 +306,7 @@ |
276 | usage = u"""exchange <amount> <currency> for <currency> |
277 | currencies for <country>""" |
278 | |
279 | - feature = ('currency',) |
280 | + features = ('currency',) |
281 | |
282 | headers = {'User-Agent': 'Mozilla/5.0', 'Referer': 'http://www.xe.com/'} |
283 | currencies = {} |
284 | @@ -433,7 +436,7 @@ |
285 | usage = u"""U+<hex code> |
286 | unicode (<character>|<character name>|<decimal code>|0x<hex code>)""" |
287 | |
288 | - feature = ('unicode',) |
289 | + features = ('unicode',) |
290 | |
291 | bidis = {'AL': u'right-to-left Arabic', 'AN': u'Arabic number', |
292 | 'B': u'paragraph separator', 'BN': u'boundary neutral', |
293 | |
294 | === modified file 'ibid/plugins/eval.py' |
295 | --- ibid/plugins/eval.py 2010-02-20 21:58:38 +0000 |
296 | +++ ibid/plugins/eval.py 2010-03-27 17:38:22 +0000 |
297 | @@ -20,7 +20,7 @@ |
298 | |
299 | class Python(Processor): |
300 | usage = u'py <code>' |
301 | - feature = ('eval',) |
302 | + features = ('eval',) |
303 | |
304 | permission = u'eval' |
305 | |
306 | @@ -40,7 +40,7 @@ |
307 | |
308 | class Perl(Processor): |
309 | usage = u'pl <code>' |
310 | - feature = ('eval',) |
311 | + features = ('eval',) |
312 | |
313 | permission = u'eval' |
314 | |
315 | @@ -56,7 +56,7 @@ |
316 | |
317 | class Lua(Processor): |
318 | usage = u'lua <code>' |
319 | - feature = ('eval',) |
320 | + features = ('eval',) |
321 | |
322 | permission = u'eval' |
323 | |
324 | |
325 | === modified file 'ibid/plugins/factoid.py' |
326 | --- ibid/plugins/factoid.py 2010-02-24 12:42:45 +0000 |
327 | +++ ibid/plugins/factoid.py 2010-03-27 17:38:22 +0000 |
328 | @@ -267,7 +267,7 @@ |
329 | |
330 | class Utils(Processor): |
331 | usage = u'literal <name> [( #<from number> | /<pattern>/[r] )]' |
332 | - feature = ('factoid',) |
333 | + features = ('factoid',) |
334 | |
335 | @match(r'^literal\s+(.+?)(?:\s+#(\d+)|\s+(?:/(.+?)/(r?)))?$') |
336 | def literal(self, event, name, number, pattern, is_regex): |
337 | @@ -282,7 +282,7 @@ |
338 | class Forget(Processor): |
339 | usage = u"""forget <name> [( #<number> | /<pattern>/[r] )] |
340 | <name> is the same as <other name>""" |
341 | - feature = ('factoid',) |
342 | + features = ('factoid',) |
343 | |
344 | priority = 10 |
345 | permission = u'factoid' |
346 | @@ -378,7 +378,7 @@ |
347 | |
348 | class Search(Processor): |
349 | usage = u'search [for] [<limit>] [(facts|values) [containing]] (<pattern>|/<pattern>/[r]) [from <start>]' |
350 | - feature = ('factoid',) |
351 | + features = ('factoid',) |
352 | |
353 | limit = IntOption('search_limit', u'Maximum number of results to return', 30) |
354 | default = IntOption('search_default', u'Default number of results to return', 10) |
355 | @@ -453,7 +453,7 @@ |
356 | |
357 | class Get(Processor, RPC): |
358 | usage = u'<factoid> [( #<number> | /<pattern>/[r] )]' |
359 | - feature = ('factoid',) |
360 | + features = ('factoid',) |
361 | |
362 | priority = 200 |
363 | |
364 | @@ -505,7 +505,7 @@ |
365 | class Set(Processor): |
366 | usage = u"""<name> (<verb>|=<verb>=) [also] <value> |
367 | last set factoid""" |
368 | - feature = ('factoid',) |
369 | + features = ('factoid',) |
370 | |
371 | interrogatives = ListOption('interrogatives', 'Question words to strip', default_interrogatives) |
372 | verbs = ListOption('verbs', 'Verbs that split name from value', default_verbs) |
373 | @@ -583,7 +583,7 @@ |
374 | class Modify(Processor): |
375 | usage = u"""<name> [( #<number> | /<pattern>/[r] )] += <suffix> |
376 | <name> [( #<number> | /<pattern>/[r] )] ~= ( s/<regex>/<replacement>/[g][i][r] | y/<source>/<dest>/ )""" |
377 | - feature = ('factoid',) |
378 | + features = ('factoid',) |
379 | |
380 | permission = u'factoid' |
381 | permissions = (u'factoidadmin',) |
382 | |
383 | === modified file 'ibid/plugins/feeds.py' |
384 | --- ibid/plugins/feeds.py 2010-02-20 21:58:38 +0000 |
385 | +++ ibid/plugins/feeds.py 2010-03-27 17:38:22 +0000 |
386 | @@ -103,7 +103,7 @@ |
387 | poll <name> feed notify <channel> on <source> |
388 | stop polling <name> feed |
389 | """ |
390 | - feature = ('feeds',) |
391 | + features = ('feeds',) |
392 | |
393 | permission = u'feeds' |
394 | |
395 | @@ -208,7 +208,7 @@ |
396 | class Retrieve(Processor): |
397 | usage = u"""latest [ <count> ] articles from <name> [ starting at <number> ] |
398 | article ( <number> | /<pattern>/ ) from <name>""" |
399 | - feature = ('feeds',) |
400 | + features = ('feeds',) |
401 | |
402 | interval = IntOption('interval', 'Feed Poll interval (in seconds)', 300) |
403 | |
404 | |
405 | === modified file 'ibid/plugins/film.py' |
406 | --- ibid/plugins/film.py 2010-03-08 15:51:53 +0000 |
407 | +++ ibid/plugins/film.py 2010-03-27 17:38:22 +0000 |
408 | @@ -26,7 +26,7 @@ |
409 | class TVShow(Processor): |
410 | usage = u'tvshow <show>' |
411 | |
412 | - feature = ('tvshow',) |
413 | + features = ('tvshow',) |
414 | |
415 | def remote_tvrage(self, show): |
416 | info_url = 'http://services.tvrage.com/tools/quickinfo.php?%s' |
417 | @@ -88,7 +88,7 @@ |
418 | } |
419 | class IMDB(Processor): |
420 | usage = u'imdb [search] [character|company|episode|movie|person] <terms> [#<index>]' |
421 | - feature = ('imdb',) |
422 | + features = ('imdb',) |
423 | |
424 | access_system = Option("accesssystem", "Method of querying IMDB", "http") |
425 | adult_search = BoolOption("adultsearch", "Include adult films in search results", True) |
426 | |
427 | === modified file 'ibid/plugins/fun.py' |
428 | --- ibid/plugins/fun.py 2010-02-20 21:58:38 +0000 |
429 | +++ ibid/plugins/fun.py 2010-03-27 17:38:22 +0000 |
430 | @@ -20,7 +20,7 @@ |
431 | } |
432 | class Nickometer(Processor): |
433 | usage = u'nickometer [<nick>] [with reasons]' |
434 | - feature = ('nickometer',) |
435 | + features = ('nickometer',) |
436 | |
437 | @match(r'^(?:nick|lame)-?o-?meter(?:(?:\s+for)?\s+(.+?))?(\s+with\s+reasons)?$') |
438 | def handle_nickometer(self, event, nick, wreasons): |
439 | @@ -45,7 +45,7 @@ |
440 | } |
441 | class Choose(Processor): |
442 | usage = u'choose <choice> or <choice>...' |
443 | - feature = ('choose',) |
444 | + features = ('choose',) |
445 | |
446 | choose_re = re.compile(r'(?:\s*,\s*(?:or\s+)?)|(?:\s+or\s+)', re.I) |
447 | |
448 | @@ -59,7 +59,7 @@ |
449 | } |
450 | class Coffee(Processor): |
451 | usage = u'coffee (on|please)' |
452 | - feature = ('coffee',) |
453 | + features = ('coffee',) |
454 | |
455 | pots = {} |
456 | |
457 | @@ -114,7 +114,7 @@ |
458 | class Insult(Processor): |
459 | usage = u"""(flame | insult) <person> |
460 | (swear | cuss | explete) [at <person>]""" |
461 | - feature = ('insult',) |
462 | + features = ('insult',) |
463 | |
464 | adjectives = ListOption('adjectives', 'List of adjectives', ( |
465 | u'acidic', u'antique', u'artless', u'base-court', u'bat-fowling', |
466 | |
467 | === modified file 'ibid/plugins/games.py' |
468 | --- ibid/plugins/games.py 2010-02-20 21:58:38 +0000 |
469 | +++ ibid/plugins/games.py 2010-03-27 17:38:22 +0000 |
470 | @@ -28,7 +28,7 @@ |
471 | I throw the gauntlet down at <user>'s feet [over <something>] |
472 | """ |
473 | |
474 | - feature = ('duel',) |
475 | + features = ('duel',) |
476 | |
477 | accept_timeout = FloatOption('accept_timeout', 'How long do we wait for acceptance?', 60.0) |
478 | start_delay = IntOption('start_delay', 'Time between acceptance and start of duel (rounded down to the highest minute)', 30) |
479 | @@ -219,7 +219,7 @@ |
480 | usage = u"""draw [my <weapon>] |
481 | bam|pew|bang|kapow|pewpew|holyhandgrenadeofantioch""" |
482 | |
483 | - feature = ('duel',) |
484 | + features = ('duel',) |
485 | |
486 | # Parameters for Processor: |
487 | event_types = (u'message', u'action') |
488 | @@ -402,7 +402,7 @@ |
489 | )), duel.names[shooter], address=False) |
490 | |
491 | class DuelFlee(Processor): |
492 | - feature = ('duel',) |
493 | + features = ('duel',) |
494 | addressed = False |
495 | event_types = (u'state',) |
496 | |
497 | @@ -461,7 +461,7 @@ |
498 | ( kill | see | eat ) <villager> |
499 | vote for <villager> |
500 | """ |
501 | - feature = ('werewolf',) |
502 | + features = ('werewolf',) |
503 | state = None |
504 | |
505 | player_limit = IntOption('min_players', 'The minimum number of players', 5) |
506 | @@ -848,7 +848,7 @@ |
507 | return self.state.__name__ |
508 | |
509 | class WerewolfState(Processor): |
510 | - feature = ('werewolf',) |
511 | + features = ('werewolf',) |
512 | event_types = (u'state',) |
513 | |
514 | @handler |
515 | |
516 | === modified file 'ibid/plugins/gameservers.py' |
517 | --- ibid/plugins/gameservers.py 2010-03-19 12:24:38 +0000 |
518 | +++ ibid/plugins/gameservers.py 2010-03-27 17:38:22 +0000 |
519 | @@ -16,7 +16,7 @@ |
520 | |
521 | class Bnet(Processor): |
522 | usage = u'dota players | who is playing dota' |
523 | - feature = ('gameservers',) |
524 | + features = ('gameservers',) |
525 | autoload = False |
526 | |
527 | bnet_host = Option('bnet_host', 'Bnet server hostname / IP', '127.0.0.1') |
528 | @@ -54,7 +54,7 @@ |
529 | |
530 | class CounterStrike(Processor): |
531 | usage = u'cs players | who is playing cs' |
532 | - feature = ('gameservers',) |
533 | + features = ('gameservers',) |
534 | autoload = False |
535 | |
536 | cs_host = Option('cs_host', 'CS server hostname / IP', '127.0.0.1') |
537 | |
538 | === modified file 'ibid/plugins/geography.py' |
539 | --- ibid/plugins/geography.py 2010-03-22 10:15:49 +0000 |
540 | +++ ibid/plugins/geography.py 2010-03-27 17:38:22 +0000 |
541 | @@ -37,7 +37,7 @@ |
542 | # http://www.mathforum.com/library/drmath/view/51711.html |
543 | # http://mathworld.wolfram.com/GreatCircle.html |
544 | |
545 | - feature = ('distance',) |
546 | + features = ('distance',) |
547 | |
548 | default_unit_names = { |
549 | 'km': "kilometres", |
550 | @@ -118,7 +118,7 @@ |
551 | usage = u"""weather in <city> |
552 | forecast for <city>""" |
553 | |
554 | - feature = ('weather',) |
555 | + features = ('weather',) |
556 | |
557 | defaults = { 'ct': 'Cape Town, South Africa', |
558 | 'jhb': 'Johannesburg, South Africa', |
559 | @@ -236,7 +236,7 @@ |
560 | class TimeZone(Processor): |
561 | usage = u"""when is <time> <place|timezone> in <place|timezone> |
562 | time in <place|timezone>""" |
563 | - feature = ('timezone',) |
564 | + features = ('timezone',) |
565 | |
566 | zoneinfo = Option('zoneinfo', 'Timezone info directory', '/usr/share/zoneinfo') |
567 | custom_zones = DictOption('timezones', 'Custom timezone names', CUSTOM_ZONES) |
568 | @@ -402,7 +402,7 @@ |
569 | usage = u"""airport [in] <name|location|code> |
570 | [<cheapest|quickest>] flight from <departure> to <destination> from <depart_date> [anytime|morning|afternoon|evening|<time>] to <return_date> [anytime|morning|afternoon|evening|<time>]""" |
571 | |
572 | - feature = ('flight',) |
573 | + features = ('flight',) |
574 | |
575 | airports_url = u'http://openflights.svn.sourceforge.net/viewvc/openflights/openflights/data/airports.dat' |
576 | max_results = IntOption('max_results', 'Maximum number of results to list', 5) |
577 | |
578 | === modified file 'ibid/plugins/google.py' |
579 | --- ibid/plugins/google.py 2010-03-06 18:18:29 +0000 |
580 | +++ ibid/plugins/google.py 2010-03-27 17:38:22 +0000 |
581 | @@ -23,7 +23,7 @@ |
582 | usage = u"""google[.<tld>] [for] <term> |
583 | googlefight [for] <term> and <term>""" |
584 | |
585 | - feature = ('google',) |
586 | + features = ('google',) |
587 | |
588 | api_key = Option('api_key', 'Your Google API Key (optional)', None) |
589 | referer = Option('referer', 'The referer string to use (API searches)', default_referer) |
590 | @@ -89,7 +89,7 @@ |
591 | usage = u"""gcalc <expression> |
592 | gdefine <term>""" |
593 | |
594 | - feature = ('google',) |
595 | + features = ('google',) |
596 | |
597 | user_agent = Option('user_agent', 'HTTP user agent to present to Google (for non-API searches)', default_user_agent) |
598 | google_scrape_url = "http://www.google.com/search?q=%s" |
599 | |
600 | === modified file 'ibid/plugins/help.py' |
601 | --- ibid/plugins/help.py 2010-03-05 15:10:37 +0000 |
602 | +++ ibid/plugins/help.py 2010-03-27 17:38:22 +0000 |
603 | @@ -31,7 +31,7 @@ |
604 | how do I use <feature> |
605 | help <(category|feature)> |
606 | """ |
607 | - feature = ('help',) |
608 | + features = ('help',) |
609 | stemmer = Stemmer('english') |
610 | |
611 | def _get_features(self): |
612 | @@ -50,7 +50,7 @@ |
613 | features = {} |
614 | processor_modules = set() |
615 | for processor in ibid.processors: |
616 | - for feature in getattr(processor, 'feature', []): |
617 | + for feature in getattr(processor, 'features', []): |
618 | if feature not in features: |
619 | features[feature] = { |
620 | 'name': feature, |
621 | |
622 | === modified file 'ibid/plugins/icecast.py' |
623 | --- ibid/plugins/icecast.py 2010-02-20 21:58:38 +0000 |
624 | +++ ibid/plugins/icecast.py 2010-03-27 17:38:22 +0000 |
625 | @@ -17,7 +17,7 @@ |
626 | }} |
627 | class ICECast(Processor): |
628 | usage = u"what's playing [on <stream>]?" |
629 | - feature = ('icecast',) |
630 | + features = ('icecast',) |
631 | |
632 | interval = IntOption('interval', |
633 | 'Interval between checking for song changes', 60) |
634 | |
635 | === modified file 'ibid/plugins/identity.py' |
636 | --- ibid/plugins/identity.py 2010-02-20 21:58:38 +0000 |
637 | +++ ibid/plugins/identity.py 2010-03-27 17:38:22 +0000 |
638 | @@ -29,7 +29,7 @@ |
639 | usage = u"""create account [<name>] |
640 | delete (my account|account <name>) |
641 | rename (my account|account <name>) to <name>""" |
642 | - feature = ('accounts',) |
643 | + features = ('accounts',) |
644 | |
645 | @match(r'^create\s+account(?:\s+(.+))?$') |
646 | def new_account(self, event, username): |
647 | @@ -146,7 +146,7 @@ |
648 | class Identities(Processor): |
649 | usage = u"""(I am|<username> is) <identity> on <source> |
650 | remove identity <identity> on <source> [from <username>]""" |
651 | - feature = ('accounts',) |
652 | + features = ('accounts',) |
653 | priority = -10 |
654 | |
655 | def __init__(self, name): |
656 | @@ -319,7 +319,7 @@ |
657 | |
658 | class Attributes(Processor): |
659 | usage = u'set (my|<account>) <name> to <value>' |
660 | - feature = ('accounts',) |
661 | + features = ('accounts',) |
662 | |
663 | @match(r"^set\s+(my|.+?)(?:\'s)?\s+(.+)\s+to\s+(.+)$") |
664 | def attribute(self, event, username, name, value): |
665 | @@ -353,7 +353,7 @@ |
666 | |
667 | class Describe(Processor): |
668 | usage = u'who (am I|is <username>)' |
669 | - feature = ('accounts',) |
670 | + features = ('accounts',) |
671 | |
672 | @match(r'^who\s+(?:is|am)\s+(I|.+?)$') |
673 | def describe(self, event, username): |
674 | @@ -384,7 +384,7 @@ |
675 | } |
676 | class Summon(Processor): |
677 | usage = u'summon <person> [via <source>]' |
678 | - feature = ('summon',) |
679 | + features = ('summon',) |
680 | permission = u'summon' |
681 | |
682 | default_source = Option('default_source', |
683 | @@ -509,7 +509,7 @@ |
684 | } |
685 | class AddAuth(Processor): |
686 | usage = u'authenticate <account> [on source] using <method> [<credential>]' |
687 | - feature = ('auth',) |
688 | + features = ('auth',) |
689 | |
690 | @match(r'^authenticate\s+(.+?)(?:\s+on\s+(.+))?\s+using\s+(\S+)\s+(.+)$') |
691 | def handler(self, event, user, source, method, credential): |
692 | @@ -557,7 +557,7 @@ |
693 | usage = u"""(grant|revoke|remove) <permission> (to|from|on) <username> [when authed] |
694 | permissions [for <username>] |
695 | list permissions""" |
696 | - feature = ('auth',) |
697 | + features = ('auth',) |
698 | |
699 | permission = u'admin' |
700 | |
701 | @@ -643,7 +643,7 @@ |
702 | |
703 | class Auth(Processor): |
704 | usage = u'auth <credential>' |
705 | - feature = ('auth',) |
706 | + features = ('auth',) |
707 | |
708 | @match(r'^auth(?:\s+(.+))?$') |
709 | def handler(self, event, password): |
710 | |
711 | === modified file 'ibid/plugins/karma.py' |
712 | --- ibid/plugins/karma.py 2010-02-20 21:58:38 +0000 |
713 | +++ ibid/plugins/karma.py 2010-03-27 17:38:22 +0000 |
714 | @@ -51,7 +51,7 @@ |
715 | |
716 | class Set(Processor): |
717 | usage = u'<subject> (++|--|==|ftw|ftl) [[reason]]' |
718 | - feature = ('karma',) |
719 | + features = ('karma',) |
720 | |
721 | # Clashes with morse & math |
722 | priority = 510 |
723 | @@ -126,7 +126,7 @@ |
724 | class Get(Processor): |
725 | usage = u"""karma for <subject> |
726 | [reverse] karmaladder""" |
727 | - feature = ('karma',) |
728 | + features = ('karma',) |
729 | |
730 | @match(r'^karma\s+(?:for\s+)?(.+)$') |
731 | def handle_karma(self, event, subject): |
732 | @@ -153,7 +153,7 @@ |
733 | |
734 | class Forget(Processor): |
735 | usage = u'forget karma for <subject> [[reason]]' |
736 | - feature = ('karma',) |
737 | + features = ('karma',) |
738 | |
739 | # Clashes with factoid |
740 | priority = -10 |
741 | |
742 | === modified file 'ibid/plugins/languages.py' |
743 | --- ibid/plugins/languages.py 2010-03-02 19:41:09 +0000 |
744 | +++ ibid/plugins/languages.py 2010-03-27 17:38:22 +0000 |
745 | @@ -24,7 +24,7 @@ |
746 | define <word> [using <dictionary>] |
747 | (dictionaries|strategies) |
748 | (dictionary|strategy) <name>""" |
749 | - feature = ('dict',) |
750 | + features = ('dict',) |
751 | |
752 | server = Option('server', 'Dictionary server hostname', 'localhost') |
753 | port = IntOption('port', 'Dictionary server port number', 2628) |
754 | @@ -141,7 +141,7 @@ |
755 | usage = u"""translate (<phrase>|<url>) [from <language>] [to <language>] |
756 | translation chain <phrase> [from <language>] [to <language>]""" |
757 | |
758 | - feature = ('translate',) |
759 | + features = ('translate',) |
760 | |
761 | api_key = Option('api_key', 'Your Google API Key (optional)', None) |
762 | referer = Option('referer', 'The referer string to use (API searches)', default_referer) |
763 | |
764 | === modified file 'ibid/plugins/lotto.py' |
765 | --- ibid/plugins/lotto.py 2010-02-21 09:45:01 +0000 |
766 | +++ ibid/plugins/lotto.py 2010-03-27 17:38:22 +0000 |
767 | @@ -17,7 +17,7 @@ |
768 | class Lotto(Processor): |
769 | usage = u'lotto' |
770 | |
771 | - feature = ('lotto',) |
772 | + features = ('lotto',) |
773 | |
774 | za_url = 'http://www.nationallottery.co.za/' |
775 | za_re = re.compile(r'images/(?:power_)?balls/(?:ball|power)_(\d+).gif') |
776 | |
777 | === modified file 'ibid/plugins/meetings.py' |
778 | --- ibid/plugins/meetings.py 2010-02-20 21:58:38 +0000 |
779 | +++ ibid/plugins/meetings.py 2010-03-27 17:38:22 +0000 |
780 | @@ -37,7 +37,7 @@ |
781 | minutes so far |
782 | meeting title is <title> |
783 | """ |
784 | - feature = ('meeting',) |
785 | + features = ('meeting',) |
786 | permission = u'chairmeeting' |
787 | |
788 | formats = Option('formats', u'Formats to log to. ' |
789 | @@ -244,7 +244,7 @@ |
790 | addressed = False |
791 | processed = True |
792 | priority = 1900 |
793 | - feature = ('meeting',) |
794 | + features = ('meeting',) |
795 | |
796 | def process(self, event): |
797 | if 'channel' in event and 'source' in event \ |
798 | @@ -283,7 +283,7 @@ |
799 | vote (<id> | <option>) [on <topic>] |
800 | end poll |
801 | """ |
802 | - feature = ('poll',) |
803 | + features = ('poll',) |
804 | permission = u'chairmeeting' |
805 | |
806 | polls = {} |
807 | |
808 | === modified file 'ibid/plugins/memo.py' |
809 | --- ibid/plugins/memo.py 2010-02-20 21:58:38 +0000 |
810 | +++ ibid/plugins/memo.py 2010-03-27 17:38:22 +0000 |
811 | @@ -65,7 +65,7 @@ |
812 | class Tell(Processor): |
813 | usage = u"""(tell|pm|privmsg|msg|ask) <person> [on <source>] <message> |
814 | forget my (first|last|<n>th) message for <person> [on <source>]""" |
815 | - feature = ('memo',) |
816 | + features = ('memo',) |
817 | |
818 | permission = u'sendmemo' |
819 | permissions = (u'recvmemo',) |
820 | @@ -228,7 +228,7 @@ |
821 | .order_by(Memo.time.asc()).all() |
822 | |
823 | class Deliver(Processor): |
824 | - feature = ('memo',) |
825 | + features = ('memo',) |
826 | |
827 | addressed = False |
828 | processed = True |
829 | @@ -289,7 +289,7 @@ |
830 | nomemos_cache.add(event.identity) |
831 | |
832 | class Notify(Processor): |
833 | - feature = ('memo',) |
834 | + features = ('memo',) |
835 | |
836 | event_types = (u'state',) |
837 | addressed = False |
838 | @@ -325,7 +325,7 @@ |
839 | usage = u"""my messages |
840 | message <number> |
841 | my messages for <person> [on <source>]""" |
842 | - feature = ('memo',) |
843 | + features = ('memo',) |
844 | |
845 | @match(r'^my\s+messages$') |
846 | def messages(self, event): |
847 | |
848 | === modified file 'ibid/plugins/memory.py' |
849 | --- ibid/plugins/memory.py 2010-02-21 09:45:01 +0000 |
850 | +++ ibid/plugins/memory.py 2010-03-27 17:38:22 +0000 |
851 | @@ -26,7 +26,7 @@ |
852 | |
853 | class MemoryLog(Processor): |
854 | |
855 | - feature = ('memory',) |
856 | + features = ('memory',) |
857 | autoload = False |
858 | |
859 | mem_filename = Option('mem_filename', 'Memory log filename', 'logs/memory.log') |
860 | @@ -99,7 +99,7 @@ |
861 | class MemoryInfo(Processor): |
862 | usage = u'memory usage' |
863 | |
864 | - feature = ('memory',) |
865 | + features = ('memory',) |
866 | |
867 | @match('^memory\s+usage$') |
868 | def memory_usage(self, event): |
869 | |
870 | === modified file 'ibid/plugins/network.py' |
871 | --- ibid/plugins/network.py 2010-03-07 10:08:03 +0000 |
872 | +++ ibid/plugins/network.py 2010-03-27 17:38:22 +0000 |
873 | @@ -33,7 +33,7 @@ |
874 | class DNS(Processor): |
875 | usage = u'dns [<record type>] [for] <host> [from <nameserver>]' |
876 | |
877 | - feature = ('dns',) |
878 | + features = ('dns',) |
879 | |
880 | def setup(self): |
881 | if Resolver is None: |
882 | @@ -82,7 +82,7 @@ |
883 | } |
884 | class Ping(Processor): |
885 | usage = u'ping <host>' |
886 | - feature = ('ping',) |
887 | + features = ('ping',) |
888 | |
889 | ping = Option('ping', 'Path to ping executable', 'ping') |
890 | |
891 | @@ -115,7 +115,7 @@ |
892 | } |
893 | class Tracepath(Processor): |
894 | usage = u'tracepath <host>' |
895 | - feature = ('tracepath',) |
896 | + features = ('tracepath',) |
897 | |
898 | tracepath = Option('tracepath', 'Path to tracepath executable', 'tracepath') |
899 | |
900 | @@ -144,7 +144,7 @@ |
901 | class IPCalc(Processor): |
902 | usage = u"""ipcalc <network>/<subnet> |
903 | ipcalc <address> - <address>""" |
904 | - feature = ('ipcalc',) |
905 | + features = ('ipcalc',) |
906 | |
907 | ipcalc = Option('ipcalc', 'Path to ipcalc executable', 'ipcalc') |
908 | |
909 | @@ -221,7 +221,7 @@ |
910 | usage = u"""(get|head) <url> |
911 | is <domain> (up|down) |
912 | tell me when <domain|url> is up""" |
913 | - feature = ('http',) |
914 | + features = ('http',) |
915 | priority = -10 |
916 | |
917 | max_size = IntOption('max_size', u'Only request this many bytes', 500) |
918 | @@ -417,7 +417,7 @@ |
919 | class TLD(Processor): |
920 | usage = u""".<tld> |
921 | tld for <country>""" |
922 | - feature = ('tld',) |
923 | + features = ('tld',) |
924 | |
925 | country_codes = {} |
926 | |
927 | @@ -461,7 +461,7 @@ |
928 | class Ports(Processor): |
929 | usage = u"""port for <protocol> |
930 | (tcp|udp) port <number>""" |
931 | - feature = ('ports',) |
932 | + features = ('ports',) |
933 | priority = 10 |
934 | |
935 | services = Option('services', 'Path to services file', '/etc/services') |
936 | @@ -534,7 +534,7 @@ |
937 | usage = u"""port scan <hostname> |
938 | net scan <network>/<prefix>""" |
939 | |
940 | - feature = ('nmap',) |
941 | + features = ('nmap',) |
942 | permission = 'nmap' |
943 | min_prefix = IntOption('min_prefix', 'Minimum network prefix that may be scanned', 24) |
944 | |
945 | |
946 | === modified file 'ibid/plugins/oeis.py' |
947 | --- ibid/plugins/oeis.py 2010-02-20 21:58:38 +0000 |
948 | +++ ibid/plugins/oeis.py 2010-03-27 17:38:22 +0000 |
949 | @@ -19,7 +19,7 @@ |
950 | usage = u"""oeis (A<OEIS number>|M<EIS number>|N<HIS number>) |
951 | oeis <term>[, ...]""" |
952 | |
953 | - feature = ('oeis',) |
954 | + features = ('oeis',) |
955 | |
956 | @match(r'^oeis\s+([AMN]\d+|-?\d(?:\d|-|,|\s)*)$') |
957 | def oeis (self, event, query): |
958 | |
959 | === modified file 'ibid/plugins/quotes.py' |
960 | --- ibid/plugins/quotes.py 2010-03-27 14:18:33 +0000 |
961 | +++ ibid/plugins/quotes.py 2010-03-27 17:38:22 +0000 |
962 | @@ -27,7 +27,7 @@ |
963 | } |
964 | class Fortune(Processor, RPC): |
965 | usage = u'fortune' |
966 | - feature = ('fortune',) |
967 | + features = ('fortune',) |
968 | |
969 | fortune = Option('fortune', 'Path of the fortune executable', 'fortune') |
970 | |
971 | @@ -66,7 +66,7 @@ |
972 | class Bash(Processor): |
973 | usage = u'bash[.org] [(random|<number>)]' |
974 | |
975 | - feature = ('bash',) |
976 | + features = ('bash',) |
977 | |
978 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) |
979 | |
980 | @@ -103,7 +103,7 @@ |
981 | class FMyLife(Processor): |
982 | usage = u'fml (<number> | [random] | flop | top | last | love | money | kids | work | health | sex | miscellaneous )' |
983 | |
984 | - feature = ('fml',) |
985 | + features = ('fml',) |
986 | |
987 | api_url = Option('fml_api_url', 'FML API URL base', 'http://api.betacie.com/') |
988 | # The Ibid API Key, registered by Stefano Rivera: |
989 | @@ -173,7 +173,7 @@ |
990 | usage = u"""tfln [(random|<number>)] |
991 | tfln (worst|best) [(today|this week|this month)]""" |
992 | |
993 | - feature = ('tfln',) |
994 | + features = ('tfln',) |
995 | |
996 | public_browse = BoolOption('public_browse', 'Allow random quotes in public', True) |
997 | |
998 | @@ -252,7 +252,7 @@ |
999 | usage = u"""mlia [(<number> | random | recent | today | yesterday | this week | this month | this year )] |
1000 | mlig [(<number> | random | recent | today | yesterday | this week | this month | this year )]""" |
1001 | |
1002 | - feature = ('mlia',) |
1003 | + features = ('mlia',) |
1004 | |
1005 | public_browse = BoolOption('public_browse', |
1006 | 'Allow random quotes in public', True) |
1007 | @@ -367,7 +367,7 @@ |
1008 | usage = u"""bible <passages> [in <version>] |
1009 | <book> <verses> [in <version>]""" |
1010 | |
1011 | - feature = ('bible',) |
1012 | + features = ('bible',) |
1013 | # http://labs.bible.org/api/ is an alternative |
1014 | # Their feature set is a little different, but they should be fairly |
1015 | # compatible |
1016 | |
1017 | === modified file 'ibid/plugins/rfc.py' |
1018 | --- ibid/plugins/rfc.py 2010-02-20 21:58:38 +0000 |
1019 | +++ ibid/plugins/rfc.py 2010-03-27 17:38:22 +0000 |
1020 | @@ -21,7 +21,7 @@ |
1021 | usage = u"""rfc <number> |
1022 | rfc [for] <search terms> |
1023 | rfc [for] /regex/""" |
1024 | - feature = ('rfc',) |
1025 | + features = ('rfc',) |
1026 | |
1027 | indexurl = Option('index_url', "A HTTP url for the RFC Index file", "http://www.rfc-editor.org/rfc/rfc-index.txt") |
1028 | cachetime = IntOption("cachetime", "Time to cache RFC index for", cachetime) |
1029 | |
1030 | === modified file 'ibid/plugins/seen.py' |
1031 | --- ibid/plugins/seen.py 2010-02-20 21:58:38 +0000 |
1032 | +++ ibid/plugins/seen.py 2010-03-27 17:38:22 +0000 |
1033 | @@ -63,7 +63,7 @@ |
1034 | self.type, self.identity_id, self.channel, self.time, self.value) |
1035 | |
1036 | class See(Processor): |
1037 | - feature = ('seen',) |
1038 | + features = ('seen',) |
1039 | |
1040 | priority = 1500 |
1041 | event_types = (u'message', u'state') |
1042 | @@ -98,7 +98,7 @@ |
1043 | |
1044 | class Seen(Processor): |
1045 | usage = u'seen <who>' |
1046 | - feature = ('seen',) |
1047 | + features = ('seen',) |
1048 | |
1049 | @match(r'^(?:have\s+you\s+)?seen\s+(\S+)(?:\s+on\s+(\S+))?$') |
1050 | def handler(self, event, who, source): |
1051 | |
1052 | === modified file 'ibid/plugins/social.py' |
1053 | --- ibid/plugins/social.py 2010-03-01 15:13:45 +0000 |
1054 | +++ ibid/plugins/social.py 2010-03-27 17:38:22 +0000 |
1055 | @@ -24,7 +24,7 @@ |
1056 | class LastFm(Processor): |
1057 | usage = u'last.fm for <username>' |
1058 | |
1059 | - feature = ('lastfm',) |
1060 | + features = ('lastfm',) |
1061 | |
1062 | @match(r'^last\.?fm\s+for\s+(\S+?)\s*$') |
1063 | def listsongs(self, event, username): |
1064 | @@ -46,7 +46,7 @@ |
1065 | usage = u"""latest (tweet|identica) from <name> |
1066 | (tweet|identica) <number>""" |
1067 | |
1068 | - feature = ('microblog',) |
1069 | + features = ('microblog',) |
1070 | |
1071 | default = { |
1072 | 'twitter': {'endpoint': 'http://twitter.com/', 'api': 'twitter', 'name': 'tweet', 'user': 'twit'}, |
1073 | |
1074 | === modified file 'ibid/plugins/sources.py' |
1075 | --- ibid/plugins/sources.py 2010-03-14 10:27:08 +0000 |
1076 | +++ ibid/plugins/sources.py 2010-03-27 17:38:22 +0000 |
1077 | @@ -22,7 +22,7 @@ |
1078 | class Actions(Processor): |
1079 | usage = u"""(join|part|leave) [<channel> [on <source>]] |
1080 | change nick to <nick> [on <source>]""" |
1081 | - feature = ('actions',) |
1082 | + features = ('actions',) |
1083 | |
1084 | permission = 'sources' |
1085 | |
1086 | @@ -75,7 +75,7 @@ |
1087 | event.addresponse(u'Changing nick to %s', nick) |
1088 | |
1089 | class Invited(Processor): |
1090 | - feature = ('actions',) |
1091 | + features = ('actions',) |
1092 | |
1093 | event_types = ('invite',) |
1094 | permission = 'sources' |
1095 | @@ -120,7 +120,7 @@ |
1096 | } |
1097 | class SayDo(Processor): |
1098 | usage = u'(say|do) in <channel> [on <source>] <text>' |
1099 | - feature = ('saydo',) |
1100 | + features = ('saydo',) |
1101 | |
1102 | permission = u'saydo' |
1103 | |
1104 | @@ -137,7 +137,7 @@ |
1105 | } |
1106 | class RedirectCommand(Processor): |
1107 | usage = u'redirect [to] <channel> [on <source>] <command>' |
1108 | - feature = ('redirect',) |
1109 | + features = ('redirect',) |
1110 | |
1111 | priority = -1200 |
1112 | permission = u'saydo' |
1113 | @@ -154,7 +154,7 @@ |
1114 | event.message['clean'] = command |
1115 | |
1116 | class Redirect(Processor): |
1117 | - feature = ('redirect',) |
1118 | + features = ('redirect',) |
1119 | |
1120 | processed = True |
1121 | priority = 940 |
1122 | |
1123 | === modified file 'ibid/plugins/strings.py' |
1124 | --- ibid/plugins/strings.py 2010-03-01 15:13:45 +0000 |
1125 | +++ ibid/plugins/strings.py 2010-03-27 17:38:22 +0000 |
1126 | @@ -18,7 +18,7 @@ |
1127 | class Hash(Processor): |
1128 | usage = u"""(md5|sha1|sha224|sha256|sha384|sha512) <string> |
1129 | crypt <string> <salt>""" |
1130 | - feature = ('hash',) |
1131 | + features = ('hash',) |
1132 | |
1133 | @match(r'^(md5|sha1|sha224|sha256|sha384|sha512)(?:sum)?\s+(.+?)$') |
1134 | def hash(self, event, hash, string): |
1135 | @@ -35,7 +35,7 @@ |
1136 | } |
1137 | class Base64(Processor): |
1138 | usage = u'base(16|32|64) (encode|decode) <string>' |
1139 | - feature = ('base64',) |
1140 | + features = ('base64',) |
1141 | |
1142 | @match(r'^b(?:ase)?(16|32|64)\s*(enc|dec)(?:ode)?\s+(.+?)$') |
1143 | def base64(self, event, base, operation, string): |
1144 | @@ -59,7 +59,7 @@ |
1145 | } |
1146 | class Rot13(Processor): |
1147 | usage = u'rot13 <string>' |
1148 | - feature = ('rot13',) |
1149 | + features = ('rot13',) |
1150 | |
1151 | @match(r'^rot13\s+(.+)$') |
1152 | def rot13(self, event, string): |
1153 | @@ -72,7 +72,7 @@ |
1154 | } |
1155 | class Dvorak(Processor): |
1156 | usage = u"""(aoeu|asdf) <text>""" |
1157 | - feature = ('dvorak',) |
1158 | + features = ('dvorak',) |
1159 | |
1160 | # List of characters on each keyboard layout |
1161 | dvormap = u"""',.pyfgcrl/=aoeuidhtns-;qjkxbmwvz"<>PYFGCRL?+AOEUIDHTNS_:QJKXBMWVZ[]{}|""" |
1162 | @@ -98,7 +98,7 @@ |
1163 | } |
1164 | class ReTest(Processor): |
1165 | usage = u'does <pattern> match <string>' |
1166 | - feature = ('retest',) |
1167 | + features = ('retest',) |
1168 | permission = 'regex' |
1169 | |
1170 | @match('^does\s+(.+?)\s+match\s+(.+?)$') |
1171 | @@ -112,7 +112,7 @@ |
1172 | } |
1173 | class Morse(Processor): |
1174 | usage = u'morse (text|morsecode)' |
1175 | - feature = ('morse',) |
1176 | + features = ('morse',) |
1177 | |
1178 | _table = { |
1179 | 'A': ".-", |
1180 | |
1181 | === modified file 'ibid/plugins/svn.py' |
1182 | --- ibid/plugins/svn.py 2010-02-21 09:45:01 +0000 |
1183 | +++ ibid/plugins/svn.py 2010-03-27 17:38:22 +0000 |
1184 | @@ -393,7 +393,7 @@ |
1185 | usage = u"""(last commit|commit <revno>) [to <repo>] [full] |
1186 | (svnrepos|svnrepositories) |
1187 | """ |
1188 | - feature = ('svn',) |
1189 | + features = ('svn',) |
1190 | autoload = False |
1191 | |
1192 | permission = u'svn' |
1193 | |
1194 | === modified file 'ibid/plugins/sysadmin.py' |
1195 | --- ibid/plugins/sysadmin.py 2010-03-07 18:32:23 +0000 |
1196 | +++ ibid/plugins/sysadmin.py 2010-03-27 17:38:22 +0000 |
1197 | @@ -17,7 +17,7 @@ |
1198 | } |
1199 | class Aptitude(Processor): |
1200 | usage = u'apt (search|show) <term>' |
1201 | - feature = ('aptitude',) |
1202 | + features = ('aptitude',) |
1203 | |
1204 | aptitude = Option('aptitude', 'Path to aptitude executable', 'aptitude') |
1205 | |
1206 | @@ -120,7 +120,7 @@ |
1207 | } |
1208 | class AptFile(Processor): |
1209 | usage = u'apt-file [search] <term>' |
1210 | - feature = ('apt-file',) |
1211 | + features = ('apt-file',) |
1212 | |
1213 | aptfile = Option('apt-file', 'Path to apt-file executable', 'apt-file') |
1214 | |
1215 | @@ -159,7 +159,7 @@ |
1216 | } |
1217 | class Man(Processor): |
1218 | usage = u'man [<section>] <page>' |
1219 | - feature = ('man',) |
1220 | + features = ('man',) |
1221 | |
1222 | man = Option('man', 'Path of the man executable', 'man') |
1223 | |
1224 | @@ -202,7 +202,7 @@ |
1225 | } |
1226 | class Mac(Processor): |
1227 | usage = u'mac <address>' |
1228 | - feature = ('mac',) |
1229 | + features = ('mac',) |
1230 | |
1231 | @match(r'^((?:mac|oui|ether(?:net)?(?:\s*code)?)\s+)?((?:(?:[0-9a-f]{2}(?(1)[:-]?|:))){2,5}[0-9a-f]{2})$') |
1232 | def lookup_mac(self, event, _, mac): |
1233 | |
1234 | === modified file 'ibid/plugins/test.py' |
1235 | --- ibid/plugins/test.py 2010-02-20 21:58:38 +0000 |
1236 | +++ ibid/plugins/test.py 2010-03-27 17:38:22 +0000 |
1237 | @@ -18,7 +18,7 @@ |
1238 | raise exception |
1239 | topic <topic> |
1240 | """ |
1241 | - feature = ('test',) |
1242 | + features = ('test',) |
1243 | permission = u'debug' |
1244 | |
1245 | @match(r'^delay\s+(\d+\.?\d*)$') |
1246 | |
1247 | === modified file 'ibid/plugins/trac.py' |
1248 | --- ibid/plugins/trac.py 2010-02-20 21:58:38 +0000 |
1249 | +++ ibid/plugins/trac.py 2010-03-27 17:38:22 +0000 |
1250 | @@ -30,7 +30,7 @@ |
1251 | class Tickets(Processor, RPC): |
1252 | usage = u"""ticket <number> |
1253 | (open|my|<who>'s) tickets""" |
1254 | - feature = ('trac',) |
1255 | + features = ('trac',) |
1256 | autoload = 'trac' in ibid.databases |
1257 | |
1258 | url = Option('url', 'URL of Trac instance') |
1259 | |
1260 | === modified file 'ibid/plugins/urlinfo.py' |
1261 | --- ibid/plugins/urlinfo.py 2010-02-20 21:58:38 +0000 |
1262 | +++ ibid/plugins/urlinfo.py 2010-03-27 17:38:22 +0000 |
1263 | @@ -26,7 +26,7 @@ |
1264 | } |
1265 | class Shorten(Processor): |
1266 | usage = u'shorten <url>' |
1267 | - feature = ('tinyurl',) |
1268 | + features = ('tinyurl',) |
1269 | |
1270 | @match(r'^shorten\s+(\S+\.\S+)$') |
1271 | def shorten(self, event, url): |
1272 | @@ -44,7 +44,7 @@ |
1273 | class Lengthen(Processor): |
1274 | usage = u"""<url> |
1275 | expand <url>""" |
1276 | - feature = ('tinyurl',) |
1277 | + features = ('tinyurl',) |
1278 | |
1279 | services = ListOption('services', 'List of URL prefixes of URL shortening services', ( |
1280 | 'http://is.gd/', 'http://tinyurl.com/', 'http://ff.im/', |
1281 | @@ -81,7 +81,7 @@ |
1282 | class Youtube(Processor): |
1283 | usage = u'<Youtube URL>' |
1284 | |
1285 | - feature = ('youtube',) |
1286 | + features = ('youtube',) |
1287 | |
1288 | @match(r'^(?:youtube(?:\.com)?\s+)?' |
1289 | r'(?:http://)?(?:\w+\.)?youtube\.com/' |
Is this important enough to backport?