James McCoy
7838cae3bc
callbacks: Use Raise=True for nested limit errors
...
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-06-09 23:44:25 -04:00
James McCoy
4bc549c1ed
Prevent exception when replying with a genericNoCapability error
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-31 23:04:38 -04:00
James McCoy
333067c151
Provide a default help message for commands without help.
...
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2013-08-23 22:57:13 -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
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
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
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
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
James Vega
338a899782
Make getCommandHelp respect supybot.reply.showSimpleSyntax
2009-03-11 13:37:26 -04:00
James Vega
c936897488
Allow doc to be specified for getSyntax, similar to getHelp
2009-03-11 13:37:26 -04:00
James Vega
d72b696739
Do not pass arguments to object's __init__
2009-03-11 13:37:26 -04:00
James Vega
73fb339b04
Only disable prefixNick if action is actually True
2009-03-11 13:37:26 -04:00
James Vega
a9d1830303
Do not prefixNick for actions
2009-03-11 13:37:26 -04:00
James Vega
ea6000b407
src/callbacks.py: Methods whose name != their canonical name should not be considered command methods (and therefore won't be listed in the output from Misc.list).
2006-08-28 13:15:21 +00:00
James Vega
cd2b58a7d5
src/callbacks.py: Allow the docstring to be passed to getHelp()
2006-08-28 13:13:43 +00:00
James Vega
48120bfdd2
src/callbacks.py: Update a debug statement so it prints the proper method name.
2006-05-01 17:08:44 +00:00
James Vega
a3e4fc5b1d
Change the modeline to use softtabstop instead of tabstop.
2006-02-11 15:52:51 +00:00
Jeremy Fincher
1a5e05ee8e
NestedCommandsIrcProxy should set self.repliedTo if self.error is called.
2005-06-30 22:10:04 +00:00
Jeremy Fincher
830a5c5084
Commented out an overly verbose (even for DEBUG level) log message.
2005-06-30 22:04:59 +00:00
James Vega
464c1e3cb9
src/callbacks: Remove a duplicate except statement.
2005-06-28 20:57:32 +00:00
Jeremy Fincher
3d66bc88e5
Let's ensure that self.repliedTo is False before calling invalidCommands.
2005-06-08 17:49:54 +00:00
Jeremy Fincher
dff2862bb1
Fixed jamessan's multiple-invalidCommand bug.
2005-06-08 17:45:58 +00:00
Jeremy Fincher
0d83dde909
Moved a comment to the appropriate place.
2005-06-08 16:24:54 +00:00
Jeremy Fincher
490fb0b140
Changed prefixName to prefixNick, which is more appropriate, and has always bothered me. Better now than later.
2005-06-01 21:08:30 +00:00
Jeremy Fincher
5815b3b348
Added some elucidating comments.
2005-05-30 19:19:43 +00:00
Jeremy Fincher
66076c0831
Removed a useless wrapper around a method that shouldn't exist.
2005-05-27 03:47:04 +00:00
Jeremy Fincher
4fb15198a0
Properly fixed bugs where plugins expected strings and got non-strings.
2005-05-23 11:51:22 +00:00
Jeremy Fincher
a1992b55ec
Fixed the bug that caused "reply reply" to be necessary instead of just "reply".
2005-05-23 11:23:53 +00:00