Commit Graph

154 Commits

Author SHA1 Message Date
Valentin Lorentz
4fe74ed397 Merge branch 'aka-sqlite3' into speed-up-2to3 2014-02-02 22:15:43 +01:00
Valentin Lorentz
3af1e3f42d Fix internationalization of docstrings of wrap()ed commands. 2014-01-21 16:33:35 +01:00
Valentin Lorentz
06fdaa792f Continue accelerating the 2to3 step (remove fix_map). 2014-01-21 10:57:38 +01:00
Valentin Lorentz
35a62b4e77 Continue accelerating the 2to3 step (remove fix_ws_comma, fix_xreadlines, and fix_zip). 2014-01-21 10:40:18 +01:00
Valentin Lorentz
bb7db3ab21 Continue accelerating the 2to3 step (remove fix_except). 2014-01-20 15:49:15 +01:00
Valentin Lorentz
2fda69b4d6 Continue accelerating the 2to3 step (remove fix_raise). 2014-01-20 15:43:55 +01:00
Valentin Lorentz
caba0d388e Merge pull request #536 from ddan39/addshortopts
add short options to getopts. single letter options will work with both - or --
2014-01-07 01:36:05 -08:00
Dan
54196be509 add short options to getopts. single letter options will work with both - or -- 2014-01-06 23:03:25 +01:00
Valentin Lorentz
40675ffdfa Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	plugins/Admin/plugin.py
	plugins/BadWords/config.py
	plugins/Filter/plugin.py
	plugins/Google/plugin.py
	plugins/Math/plugin.py
	plugins/Misc/plugin.py
	plugins/Note/plugin.py
	plugins/RSS/plugin.py
	plugins/Seen/test.py
	plugins/ShrinkUrl/config.py
	plugins/ShrinkUrl/plugin.py
	plugins/ShrinkUrl/test.py
	plugins/Status/plugin.py
	plugins/String/config.py
	plugins/String/plugin.py
	plugins/Time/plugin.py
	plugins/Todo/plugin.py
	plugins/Web/plugin.py
	plugins/__init__.py
	scripts/supybot-botchk
	setup.py
	src/__init__.py
	src/callbacks.py
	src/commands.py
	src/conf.py
	src/drivers/Socket.py
	src/ircdb.py
	src/irclib.py
	src/ircutils.py
	src/questions.py
	src/registry.py
	src/schedule.py
	src/test.py
	src/utils/file.py
	src/utils/gen.py
	src/utils/net.py
	src/utils/web.py
	src/world.py
2013-08-24 11:28:29 +02:00
James McCoy
e7d0bfd2d0 commands: Handle OverflowError in _int
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 23:36:44 -04:00
James McCoy
e421722960 Fix crash if a custom error message is provided to somethingWithoutSpaces
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 22:06:07 -04:00
Valentin Lorentz
960e1da61c commands.py: Fix error message of getSomethingWithoutSpaces.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 00:29:11 -04:00
Valentin Lorentz
b375e7dfb2 commands.py: Fix crash if a custom error message is provided to somethingWithoutSpaces (bug introduced in 29dc1438a0). 2013-08-15 22:25:36 +02:00
Valentin Lorentz
ebde072f39 Add explicit/helpful error message about how to solve the multiprocessing 'Permission denied' issue. 2013-08-12 19:08:31 +02:00
Valentin Lorentz
536ec37037 commands.py: raise the exception instead of returning is if --disable-multiprocessing is given. 2013-08-09 17:48:53 +02:00
Valentin Lorentz
9288b16cd2 Fix 918b8a3c01 on Windows. 2013-08-09 12:21:24 +02:00
Valentin Lorentz
918b8a3c01 commands.py: Add heap_size argument to process(). 2013-08-09 12:16:24 +02:00
Valentin Lorentz
29dc1438a0 commands.py: Fix error message of getSomethingWithoutSpaces. 2013-07-16 20:20:08 +00:00
Valentin Lorentz
43563bcc1c core & Factoids: Allow commands to disable doc-availability checks for programmatically setting it. 2013-06-01 17:13:55 +02:00
Valentin Lorentz
f82a7c7e17 Issue error message at plugin load if a command has no docstring. 2013-06-01 16:35:47 +02:00
Valentin Lorentz
c56f26b91d Wrap now internationalizes docstrings. 2013-05-20 17:52:41 +02:00
Valentin Lorentz
66025cf7e4 New syntax for wrap(). Now supports being used as a Python decorator with arguments.
For example, in Admin, "join = wrap(join, ['validChannel', additional('something')])" could become "@wrap(['validChannel', additional('something')])".
2013-05-20 17:40:04 +02:00
Valentin Lorentz
1090c4623f Factoids: Add supybot.plugins.Factoids.requireVoice. Closes GH-378. 2013-05-17 17:47:43 +02:00
Valentin Lorentz
ed62c9efb1 commands.py: Rename 'isGranted' to 'haveHalfop+' and add 'haveVoice+'. 2013-05-17 17:36:11 +02:00
Valentin Lorentz
d13015dfb5 Fix tests with Travis. 2013-04-11 19:09:50 +02:00
Valentin Lorentz
916a85c965 core: Various Python 3 compatibility fixes. 2013-03-25 19:15:08 +01:00
Valentin Lorentz
75f19a9f50 core: Add docstring to commands.wrap. 2013-02-01 20:38:18 +01:00
Valentin Lorentz
3dba9088b0 Merge remote-tracking branch 'supybot/master' into testing
Conflicts:
	INSTALL
	plugins/ChannelLogger/README.txt
	plugins/ChannelStats/README.txt
	plugins/Google/plugin.py
	plugins/Google/test.py
	plugins/Plugin/test.py
	plugins/Web/test.py
	setup.py
	src/callbacks.py
	src/ircdb.py
	src/irclib.py
	src/utils/str.py
	test/test_irclib.py
2013-01-01 21:11:24 +01:00
Valentin Lorentz
93586d71f4 Add support for extended banmasks. Closes GH-105. 2012-12-02 19:04:48 +01:00
Valentin Lorentz
59d6d4da03 commands.py: Fix name conflict. 2012-10-29 20:16:08 +01:00
James McCoy
c774be3ea6 commands: Add process and regexp_wrapper to __all__
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-24 00:23:25 -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
Valentin Lorentz
d3da0c2efc commands.py: Add 'channelOrGlobal' converter. 2012-10-18 19:30:35 +02:00
Daniel Folkinshteyn
6a9af819a3 src/commands.py: make subprocesses raise an error on timeout, rather than return a string
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 22:14:15 -04:00
Daniel Folkinshteyn
9fc7ec28b4 Fix error handling for subprocesses.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:44:04 -04:00
Daniel Folkinshteyn
141b120a9c commands.process: return immediately when terminating process, without having to deal with the queue.
otherwise, we have to block for $smalldelay between putting and getting the item, since queue putting is not instantaneous
and sometimes we would get 'nothing returned' instead of the timeout message.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-15 21:32:54 -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
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
82ecf36fcd Update my name/contact information
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
Valentin Lorentz
82fdc2dda3 core: Internationalize some strings & update l10n-fr & change translation for 'is not a valid %s'. 2012-07-30 11:35:44 +02:00
skizzhg
977f3f5110 Fix typoes in core. 2012-04-23 21:55:21 +02:00
Valentin Lorentz
570e30f1b7 Pass supybot.protocols.irc.strictRfc to ircutils.isNick in 'nick' converter. Closes GH-312. 2012-02-11 09:03:52 +01:00
Daniel Folkinshteyn
37597bfe94 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.

Conflicts:

	plugins/String/plugin.py
	src/commands.py
2011-08-15 17:24:33 +02:00
Daniel Folkinshteyn
3fa45b3b5f Secure some more commands which take a regexp from untrusted user input.
Namely todo.search, note.search, dunno.search.

Conflicts:

	plugins/Note/plugin.py
	plugins/Todo/plugin.py
	src/version.py
2011-08-13 01:59:18 +02:00
Daniel Folkinshteyn
3526d5dabf src/commands.py: make subprocesses raise an error on timeout, rather than return a string
Conflicts:

	src/commands.py
2011-08-13 01:53:58 +02:00
Valentin Lorentz
4ebcda024b Bug fix (I didn't test the previous commit correctly) 2011-07-01 16:11:37 +02:00
Valentin Lorentz
41514bafdd Core & Channel & Topic: Add the isGranted converter. Closes GH-39. 2011-07-01 15:58:39 +02:00
Valentin Lorentz
32b21cbc18 Add a clue in solving issue with wrapping wrapped commands 2011-03-01 08:47:53 +01:00
Valentin Lorentz
e8814fc07a Add checkCapabilityButIgnoreOwner converter 2011-01-27 19:32:43 +01:00