Commit Graph

490 Commits

Author SHA1 Message Date
Valentin Lorentz
13a633eea4 Prevent traceback if supybot.replies.genericNoCapability is empty. 2013-02-02 19:47:14 +01:00
Valentin Lorentz
05d23d1a06 Remove unreachable code. 2013-02-02 19:47:05 +01:00
Valentin Lorentz
fa36e48075 core: Document irclib.Irc.addCallback. 2013-02-01 20:38:53 +01:00
Valentin Lorentz
9507bf1655 Remove non-ascii char (again). 2013-01-31 20:47:57 +01:00
Valentin Lorentz
bab69bb31e Remove useless non-ascii character. 2013-01-31 19:24:05 +01:00
Valentin Lorentz
2ace534bdb utils.str: Prevent issue with tokens like '\x80' in Python 3. 2013-01-23 15:48:24 +01:00
Valentin Lorentz
30c5519acb Final encoding fix. It now work on IRC and unit tests pass, both with Python 2 & 3. 2013-01-22 21:02:04 +01:00
Valentin Lorentz
a4a595b39a Partial fix of encoding handling.
This fixes mostly everything, except a little bit from the test framework. I'm just saving this in case my computer or I is destroyed in an alien invasion, because this commit is worth hours of debugging.
2013-01-22 20:35:11 +01:00
Valentin Lorentz
a5292ae3b4 core: Fix issue with Python 2.6 (cStringIO is buggy). 2013-01-06 11:34:32 +01:00
Valentin Lorentz
29e13a9061 Fix 'more' wrapping for long words; bug introduced in 169392e5. 2013-01-04 22:16:08 +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
d9f2235aed callbacks.py: Fix error with commands like @echo "¡". 2012-11-07 19:20:26 +01:00
Valentin Lorentz
fba70d15bc Add configuration variable conf.supybot.capabilities.private.
This variable is a list of capabilities that are considered as 'private',
ie. the bot won't tell anyone but admins that a user has it, nor will the
bot give a list of users with this capability.
2012-10-29 20:15:14 +01:00
Daniel Folkinshteyn
5bb6fdcd52 core: avoid casting data to string if it is already an instance of basestring, in irc.reply.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-05 20:11:53 -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
Valentin Lorentz
5dfba06aae Prevent irc.replies from replying in private since fc9daa9. 2012-08-10 13:10:14 +00:00
Valentin Lorentz
fc9daa9953 Make supybot.reply.oneToOne channel-specific. 2012-08-10 12:27:25 +00:00
Valentin Lorentz
0e450a5eff src/callbacks.py: Use unicode_escape if running Python 3. 2012-08-05 14:22:53 +02:00
Valentin Lorentz
139f5b4943 Make src/callbacks.py more py3k-friendly. 2012-08-04 11:38:12 +02:00
James McCoy
d053a660b0 callbacks.py: Always error when capabilities aren't satisfied.
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-07-30 23:21:26 -04:00
Valentin Lorentz
857632c762 Fix commit c310d74a19 (no more 'Error: error' message on 'Missing capability' error). 2012-06-09 18:54:10 +02:00
Valentin Lorentz
741599c947 Add the channel where a command has been called in the logs ('XXX called by XXX').
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-05-23 01:47:22 -04:00
Valentin Lorentz
c310d74a19 Enfore capability checks when supybot.reply.error.noCapability is False. 2012-05-01 13:15:54 +00:00
Valentin Lorentz
590a992651 Add the channel where a command has been called in the logs ('XXX called by XXX'). 2012-03-18 20:45:17 +01:00
Daniel Folkinshteyn
43a3285f48 core: avoid casting data to string if it is already an instance of basestring, in irc.reply. 2011-12-18 12:39:05 +01:00
Daniel Folkinshteyn
e98ac0f4c2 Some improvements to the commands.process function - better process naming and informational output.
Conflicts:

	plugins/String/plugin.py
	src/commands.py
2011-08-25 11:36:47 +02: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
Valentin Lorentz
693ba6aba0 Don't tell owner to contact an admin. Closes GH-20. 2011-06-22 21:37:34 +02:00
Valentin Lorentz
676c08ad8e Fix possible truncation of messages
Possible bug with languages which has a long translation for '(XX more messages)'.
2010-10-31 13:35:23 +01:00
Valentin Lorentz
6b26861c23 Internationalize callbacks.py, commands.py, and conf.py ; and generated the messages.pot 2010-10-20 18:27:58 +02:00
James Vega
e7ef97e529 Ensure channel-specific reply.whenNotAddressed works.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
(cherry picked from commit 166f32dcb0)
2010-08-24 19:52:59 -04:00
James Vega
e13d3d6943 Decode/encode as 'string_escape' when (de)serializing the registry.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-08-24 19:43:24 -04:00
James Vega
166f32dcb0 Ensure channel-specific reply.whenNotAddressed works.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-07-26 19:48:37 -04:00
James Vega
c10d964604 Elide ignored replies from nested command output.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-06-24 00:33:04 -04:00
James Vega
0540513387 Decode/encode as 'string_escape' when (de)serializing the registry.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2010-01-30 23:03:35 -05:00
James Vega
eff20402ac Change canonize => normalize
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-08-27 16:41:34 -04:00
Štěpán Němec
a66034f852 Fix some typos/wordings.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-08-26 16:34:12 -04:00
Štěpán Němec
53cac5b078 callbacks.py: Remove duplicated getRealIrc() definition
NestedCommandsIrcProxy inherits the method from ReplyIrcProxy.
(Also fix some typos.)

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-08-20 11:23:12 -04:00
James Vega
54dda880d4 Add a pluginCommands kwarg to Commands.listCommands.
Plugins which implement their own listCommands method should pass their
non-typically discoverable commands to Commands.listCommands via this
mechanism.  This means that the de-duplication of commands is performed in one
spot instead of having each plugin implement it on their on in their
listCommands method.

This reverts commits 0ce829af6215b97e725f4d6d580d1151950be869 and
09fb0e6fc974445a3414fb03a94625f8538d4570.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-05-22 18:52:15 -04:00
James Vega
0d98118247 Allow getCommandHelp to be told whether to use simpleSyntax.
Use this to force Misc.help to ignore simpleSyntax since the user has
explicitly asked for the help.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-05-18 03:12:54 -04:00
James Vega
0615846ab3 Fix getCommandHelp's use of dynamic.msg
Default chan to None so we can still retrieve a config value if dynamic.msg
isn't valid (e.g., when running supybot-plugin-doc).

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-28 08:14:46 -04:00
James Vega
b3d97ea03e callbacks: Only use dynamic.msg if it's not None in getCommandHelp
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-28 00:33:03 -04:00
James Vega
84ca6f2ae3 callbacks: Update PluginRegexp docstring to reference (un)addressedRegexps
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-04-09 10:53:02 -04:00
James Vega
e00e161a73 Comments can't follow line continuations
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-03-12 17:16:56 -04:00
Jeremy Fincher
bc70ab8aad Fixes SR #2233215. 2009-03-12 13:54:05 -05:00
James Vega
db615f2c40 callbacks: Actually obey the to argument of reply() 2009-03-11 13:37:27 -04:00
James Vega
768119d258 Directly call isCommandMethod from listCommands. 2009-03-11 13:37:27 -04:00
James Vega
0b6926826a Make sure getCommandMethod only returns a valid command method
In situations like an alias, simply using getattr(self, command[0]) may
return a class method instead of the alias (think "Alias add die ...").
2009-03-11 13:37:26 -04:00
James Vega
eb6117da4f Embed formatArgumentError in Commands._callCommand.
This allows it to utilize getCommandHelp which means that plugins which define
their own getCommandHelp will no longer have broken help responses when
ArgumentError exceptions are raised.
2009-03-11 13:37:26 -04:00