Commit Graph

3321 Commits

Author SHA1 Message Date
James McCoy
0283bb7f9a ShrinkUrl: Fix the check for ur1ca results.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-24 08:51:33 -04:00
James McCoy
a483fef39d RSS: Ensure results is declared before trying to access it
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-24 00:04:29 -04:00
Arnout Engelen
58e7e61d69 Only reset the cached feed when the response actually contains headlines
Some feeds, such as those from sourceforge.net, will sometimes show an error
page rather than a feed. In this case the feed cache used to be cleared for
that feed, causing all 'old' headlines to be flooded to the channel as soon
as the feed came back online.

This patch hopefully fixes that by only resetting the cache when the returned
page actually contains headlines.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 23:13:28 -04:00
Valentin Lorentz
caa36121a7 ShrinkUrl: Add ur1.ca support.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-01-08 22:54:02 -05:00
Joe Julian
a8e3081b18 ShrinkUrl: Support for goo.gl url shortener.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-01-08 22:44:35 -05:00
Terje Hoås
2327317b33 Web: Fix fetch. Use getUrl instead of getUrlFd.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-01-08 20:32:43 -05:00
Valentin Lorentz
8d8e574d12 Owner: fix error message when the ImportError comes from the plugin 2012-12-02 20:35:52 -05:00
Daniel Folkinshteyn
3c30463e11 Math: default %f formatting rounds to 6 decimal places. increase that to 16.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-11-04 19:48:53 -05:00
Daniel Folkinshteyn
c68afacc0f Math: calc: coerce argument to ascii string. working with unicode errors on the translate() step.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-30 19:09:45 -04:00
Valentin Lorentz
484d7e6fac Misc: Notify the caller when @tell succeeded. Closes GH-97.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 17:36:21 -04:00
Valentin Lorentz
9b8397193b Admin: Add clearq command.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 01:45:38 -04:00
James McCoy
b5eac0994a Call unqualified process/regexp_wrapper, since commands exports them now.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:26:51 -04:00
James McCoy
57e429011d Misc: Use regexp_wrapper for Misc.last
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:24:16 -04:00
Daniel Folkinshteyn
18ec61842c Secure some more commands which take a regexp from untrusted user input.
Namely todo.search, note.search, dunno.search.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 15:06:43 -04:00
Daniel Folkinshteyn
ac500b059a String: set default re subprocess timeout to 0.1, since that should be quite enough.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:56:30 -04:00
Daniel Folkinshteyn
9356d0734f Misc: fix potential ddos when misc.last command is fed a specially-crafted regexp.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:56:11 -04:00
Daniel Folkinshteyn
72c5c8ec09 String: fix it up to work with the previously committed enhancement for subprocess timeout.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-20 14:47:16 -04:00
Daniel Folkinshteyn
f310350335 Web: add 'timeout' config for web fetch, default 5 sec.
Otherwise, when a site would take a long time to respond, the thread would hang for quite a while.

also needed to mod src/utils/web.py to take the timeout arg.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:10:56 -04:00
Daniel Folkinshteyn
ce9891368b Seen: fix tests so they pass. fix seen command so it properly accepts nick wildcards.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:09:34 -04:00
Valentin Lorentz
8ded033410 Seen: Fix save Seen.any.db. (thanks to beo_ for the repport and the test)
Signed-off-by: Daniel Folkinshteyn <nanotube@users.sourceforge.net>
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:06:49 -04:00
Daniel Folkinshteyn
854e086fa7 Topic: get shouldn't require capabilities, since it's a read-only operation.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:04:35 -04:00
Daniel Folkinshteyn
02b9431536 BadWords: improve help for requireWordBoundaries config.
Make a note that the plugin requires restart or the words set updating,
for changes to this setting to take effect.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:01:39 -04:00
Daniel Folkinshteyn
011d4dd676 Badwords: add plugin docstring, and fix/standardize some method docstrings.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:00:08 -04:00
Daniel Folkinshteyn
92be7c255f String: make levenshtein command threaded, since it can take a nontrivial amount of time with longer inputs.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:49:15 -04:00
Daniel Folkinshteyn
34e5aedc45 String: make re timeout configurable.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:47:32 -04:00
Daniel Folkinshteyn
7504c646b7 Status.processes: add output of currently active processes.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:35:26 -04:00
Daniel Folkinshteyn
7f4a1be9f9 Status: add 'processes' command, the multiprocessing equivalent of the threads command.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:32:17 -04:00
Daniel Folkinshteyn
7f98aa7105 Some improvements to the commands.process function - better process naming and informational output.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:28:41 -04:00
Daniel Folkinshteyn
a2985c37d6 Create a commands.process function which runs a function inside a separate process.
This is the only way to limit the execution time of a possibly long-running python statement.
Use this on String.re, due to the possibility of pathologically long re matching in python.
This allows us to remove the 'trusted-only' restriction on string.re.
In the future, this should probably be used in other places that take user-supplied regexps,
such as 'misc last --regexp', for example, as well as other potentially long-running tasks
that can block the bot.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:19:34 -04:00
Daniel Folkinshteyn
d691a91636 Topic: fix bug in invalid number error output.
Previously, when giving an invalid positive number, error would reference number-1 as being invalid.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:52:27 -04:00
Daniel Folkinshteyn
84b878b10e Filter: catch invalid input for unbinary command.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:51:13 -04:00
Daniel Folkinshteyn
7feb50685a Filter: add unbinary command, as counterpart to binary command.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 20:47:30 -04:00
James McCoy
aa4071fa68 RSS: Remove local/feedparser and add it to install_requires
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-14 12:13:00 -04:00
Valentin Lorentz
b8b79d063d Admin: Change message 'It's banned me' into 'I am banned.'. Closes GH-329.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:22:34 -04:00
James McCoy
198688eab4 Import external dateutil module
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:15:52 -04:00
James McCoy
cef93a6cfd Use relative imports for all packages under the supybot namespace
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-17 22:12:11 -04:00
James McCoy
52e71edacc Time: Remove dateutil and add it to install_requires
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-10 22:28:34 -04:00
James McCoy
748b76404f Google: Use standard json module now that 2.6 is minimum Python version
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-10 20:07:43 -04:00
James McCoy
6f925e5f7a Google: Remove calc and phonebook commands
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 23:04:10 -04:00
James McCoy
304facd167 Google: Remove translate command since their API is gone
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 22:51:11 -04:00
James McCoy
b7efbf409c Plugin: Fix failures in testPlugin
The tests were running into the ambiguity between nested commands and commands
with the same name as their plugin, so "plugin plugin" is treated as
specifying the plugin command from the plugin plugin.  This leads to it
displaying the help, since an argument is expected.

Since the Utilities plugin is already loaded by the test suite, use a command
from it as the argument to the plugin command.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 21:50:42 -04:00
James McCoy
d73a801d8f Web: Remove/update non-functional tests
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 21:35:56 -04:00
Mika Suomalainen
bcfdcf09cf MoobotFactoids: fixed mistakes and added ACTION to README.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
d38cc2daab MoobotFactoids: improved readme file from default.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
5166d840aa Internet: improved README.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
49288d2a27 Herald: improved README.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
8c1c34c723 Games: improved README.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
ee340fa42c Format: improved README
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
0207b43076 Filter: created readme from plugin help.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
bc9450eead Factoids: improved README
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00