Commit Graph

3293 Commits

Author SHA1 Message Date
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
Mika Suomalainen
dc416ecf20 Dunno: improved README
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
Mika Suomalainen
11ef44c060 Ctcp: improved README
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:50:44 -04:00
James McCoy
b41affa8b6 fixup 9f0c308f 2012-09-04 22:50:44 -04:00
Mika Suomalainen
9f0c308f19 ChannelStats: improved README
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:40:03 -04:00
Mika Suomalainen
55dd7810d2 ChannelLogger: improved readme
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:38:18 -04:00
Mika Suomalainen
f96fcaf000 AutoMode: improved readme
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:37:00 -04:00
Mika Suomalainen
c609f88779 Anonymous: added readme
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-04 22:36:20 -04:00
James McCoy
82ecf36fcd Update my name/contact information
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
James McCoy
232aa86a1e Merge branch 'maint/0.83.4' 2012-09-01 09:13:52 -04:00
James McCoy
a42ab2e2d4 ircutils.FormatParser: Make getInt only get integers that are valid colors
If a colored message were wrapped just right (e.g., a colored number ending
the chunk), FormatParser would gobble up the color format code and the number
in the message, causing a KeyError when trying to look up the color in
mircColors.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-07-02 21:11:50 -04:00
Valentin Lorentz
7593edb6fc Math: Allow 'factorial()' in icalc.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 06:04:51 -04:00
Valentin Lorentz
e45b9abd23 Math: Block factorial() in calc functions.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 06:04:28 -04:00
James McCoy
f3a09ce684 Success: Allow the plugin to be loaded from a query
Closes: Sf#3513915
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 00:52:24 -04:00
Valentin Lorentz
b7bc11deea Prevent the 'hostmask' converter from returning '*!*@*' while 'foo!*@*' was given. 2012-05-22 23:10:40 -04:00
James McCoy
66ac089a53 Channel: Perform proper capability checks in devoice.
Closes: Sf#3524393
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-20 20:57:13 -04:00
James McCoy
ca23cbb774 Merge branch 'maint/0.83.4' 2011-12-06 01:18:18 -05:00
James McCoy
c90fafebe7 Simplify handling of per-network waitingJoins
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-06 00:55:29 -05:00
Daniel Folkinshteyn
1e1b39783b Services: catch occasional error when removing waiting joins from list
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-06 00:53:19 -05:00
Daniel Folkinshteyn
d5648ab534 Services: fix problem with some channels being mixed up between networks on startup, when noJoinsUntilIdentified is true.
When noJoinsUntilIdentified config is true, the bot holds join messages in a 'waitingJoins' list, and processes them
once nickserv identification comes through. The problem was that when the bot is configured to join multiple networks,
join messages from different networks would get appended to the same list, without any differentiation by which message
belongs to which network. Thus, if there are messages waiting for multiple networks, it would often be the case that
whichever network got identification done first, would 'pick up' other network's join messages.

This fix stores the network name along with the join messages in the list, and has each network pick out only its own
join messages.

Conflicts:

	src/version.py

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-06 00:53:07 -05:00
Daniel Folkinshteyn
71bcc2bc7c Services: add some more strings indicating identification success.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-06 00:38:29 -05:00
James McCoy
5b4c150d03 Prevent nesting of Misc.tell
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-12-05 23:13:09 -05:00
James McCoy
8b73f78b3e Merge branch 'maint/0.83.4'
Conflicts:
	plugins/Misc/plugin.py
	src/ircutils.py

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2011-11-13 15:26:19 -05:00
James McCoy
c91916ae5e Misc: Avoid setting up "invalid command" flood handling if its not enabled
Closes: Sf#3088554
Signed-off-by: James McCoy <vega.james@gmail.com>
2011-10-29 17:53:35 -04:00
James McCoy
9b5019e79d Merge branch 'nick-access' into maint/0.83.4 2011-10-23 20:33:48 -04:00
James McCoy
755fe11982 Merge branch 'nick-access' 2011-10-23 20:33:41 -04:00
James McCoy
0869a8e271 Channel.nicks: Raise error so we don't actually reply with the nicks.
Closes: Sf#3396388
Signed-off-by: James McCoy <vega.james@gmail.com>
2011-10-23 20:26:39 -04:00
James McCoy
3c69fad3de Merge branch 'typos' into maint/0.83.4 2011-10-23 19:42:02 -04:00
James McCoy
9b855beec6 Merge branch 'typos' 2011-10-23 19:41:54 -04:00