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
Jeremy Fincher
ce74fa825e
Synchronized Commands (basically, all command-based plugins). Should fix the issue with Karma causing crashes due to PySQLite's un-thread-friendliness.
2005-05-15 18:27:12 +00:00
James Vega
44ef2bd81a
Add unaddressedRegexps to PluginRegexp.
2005-04-21 17:28:48 +00:00
James Vega
e7e72d4484
Unbreak invalidCommands.
2005-04-20 23:06:50 +00:00
Jeremy Fincher
c621905d91
We now spawn a thread for invalidCommands when any of the plugins that will run invalidCommands are threaded.
2005-04-13 03:20:58 +00:00
Jeremy Fincher
e1d3c5e537
Changed the name of IrcObjectProxy to something more indicative of what it does.
2005-04-13 03:18:17 +00:00
Jeremy Fincher
bc9cdc4927
Fixed the broken mores.
2005-03-28 13:29:55 +00:00
Jeremy Fincher
0773aa31e5
Made Proxy Irc objects map to the same dictionary slot, so we don't need to worry about calling getRealIrc all the time.
2005-03-28 13:00:37 +00:00
Jeremy Fincher
71830d0c84
Because super sucks, we need to assign to self.log before calling our parents' __init__s, because mixins might be before our parents. Ridiculous. Don't be surprised if we go on a super-excising rampage in the future.
2005-03-24 16:27:41 +00:00
James Vega
9971e991fe
Fix the modelines.
2005-03-23 20:07:45 +00:00
Jeremy Fincher
3d60b66ee2
Made the SimpleProxy interface a little more consistent with IrcObjectProxy.
2005-03-14 03:52:30 +00:00
Jeremy Fincher
7445ed05b8
Let's give do* methods at least a SimpleProxy, if for no other reason than to stave off the questions and consternation resulting from *not* having an irc.reply available.
2005-03-12 22:27:23 +00:00
Jeremy Fincher
bd6aa8fda8
Fixed some bugs introduced in my earlier commit, uncovered by the Note tests.
2005-03-09 10:42:16 +00:00
Jeremy Fincher
0e68a44513
Fixed bug with nested plugins having the same name as themselves.
2005-03-09 08:05:24 +00:00
Ali Afshar
d13458726d
Added getPluginHelp() method to return docstring for individual plugins.
2005-03-03 19:34:26 +00:00
Jeremy Fincher
574e9509b7
Added support for source-nested plugins.
2005-02-24 12:49:08 +00:00
James Vega
b272bd7752
Goodbye debug log.
2005-02-25 04:58:40 +00:00
Kevin Murphy
5e5e2f3336
Fixed some typos
2005-02-23 17:40:44 +00:00
Jeremy Fincher
5985562a31
Put the monkey patch in the wrong place.
2005-02-18 23:53:11 +00:00
Jeremy Fincher
c9408a95f5
Re-added capability checking stuff. Boo. This needs refactored.
2005-02-18 23:44:38 +00:00
Jeremy Fincher
ff3b03973f
Let's not try to call getCommand on callbacks that don't have it.
2005-02-18 23:01:41 +00:00
Jeremy Fincher
b0df87ed7d
Fixed addressedRegexps handling in PluginRegexp.
2005-02-18 16:19:44 +00:00
Jeremy Fincher
34e4891bbc
Changed to use getattr again; getCommandMethod is pretty much reserved for, well, commands.
2005-02-18 08:26:28 +00:00
Jeremy Fincher
9327be4b59
Added an assert to make sure findCallbacksForArgs is used correctly.
2005-02-18 08:26:02 +00:00
Jeremy Fincher
180291dd34
Cleaned up listCommands a bit.
2005-02-18 06:30:46 +00:00
Jeremy Fincher
2f928e9888
Added default-to-important-plugins behavior back.
2005-02-18 06:30:22 +00:00
Jeremy Fincher
2a75f4b83d
Added a classModule attribute to plugins to have easy access to it (the new plugin format made that significantly harder for us; this is an easy workaround).
2005-02-18 06:14:17 +00:00
Jeremy Fincher
ed0b91c3df
Tweaked some methods to fix some bugs (yes, it's ambiguous, I know).
2005-02-18 06:13:47 +00:00
Jeremy Fincher
c864836a2f
Finally refactored to make commands be "lists of strings" rather than just strings. This is preliminary to allowing nested plugins.
2005-02-18 05:17:23 +00:00
Jeremy Fincher
4f99f41266
Removed a useless comment.
2005-02-18 00:23:53 +00:00
Jeremy Fincher
c1c46495b3
Added a canonicalName method to plugins.
2005-02-18 00:16:06 +00:00
Jeremy Fincher
c3e1d1daca
Another elucidating comment.
2005-02-17 23:39:21 +00:00
Jeremy Fincher
e26d46f416
Added some elucidating comments and asserts.
2005-02-17 23:26:11 +00:00
Jeremy Fincher
849b12ec8b
Removed getCommands, which isn't being used by anything.
2005-02-17 23:14:54 +00:00
Jeremy Fincher
156084c225
Fixed some bugs introduced with the latest refactoring of callCommand, etc.
2005-02-17 22:39:44 +00:00
Jeremy Fincher
2693d404b4
Refactored _callCommand to put it in its appropriate place.
2005-02-16 02:17:05 +00:00
James Vega
90c000793d
utils.gen.* functions shouldn't explicitly be called since they're all in the utils namespace.
2005-02-15 13:57:57 +00:00
Jeremy Fincher
e97f111042
Removed the checkCapabilities keyword argument because it wasn't used anywhere in our source code.
2005-02-15 06:56:24 +00:00
Jeremy Fincher
99d723802e
Changed the name of getCommand to getCommandMethod in preparation for a major refactoring.
2005-02-15 06:53:30 +00:00
Jeremy Fincher
c09a7cace1
Removed log.stat, it was dumb.
2005-02-15 06:49:51 +00:00
Jeremy Fincher
ad35c62568
Refactored to split up Plugin into Commands and PluginMixin.
2005-02-10 02:46:18 +00:00
Jeremy Fincher
181d0d59c6
Had the more and the messages reversed.
2005-02-10 01:28:38 +00:00
James Vega
f7917bce77
Update class names.
2005-02-09 21:50:12 +00:00
Jeremy Fincher
b0cb616709
Changed callbacks.Privmsg to be callbacks.Plugin, and callbacks.PrivmsgCommandAndRegexp to be callbacks.Plugin.
2005-02-09 07:04:04 +00:00
Jeremy Fincher
70d1b1d5d0
Moved _mores to IrcObjectProxy, where it more rightfully belongs.
2005-02-07 06:28:52 +00:00
Jeremy Fincher
972716069c
Removed callbacks.Privmsg; if it is replaced at some later time, it'll be different.
2005-02-07 06:10:41 +00:00
Jeremy Fincher
fdddefe129
Added a listCommands method to PrivmsgRegexp, to allow plugins to list their own commands.
2005-02-04 20:08:38 +00:00
Jeremy Fincher
65f713df4b
Removed log.verbose. I never liked it anyway.
2005-02-04 05:59:07 +00:00
Jeremy Fincher
566b273a97
Removed some imports.
2005-02-04 03:25:30 +00:00
Jeremy Fincher
571ff24155
Changed canonicalize to canonize -- thanks Skorobeus!
2005-02-04 03:19:05 +00:00
Jeremy Fincher
e6beec2989
Removed some more unused imports.
2005-02-04 03:11:02 +00:00
James Vega
68d3b830da
Remove the use of format() in logger functions since they handle it natively.
2005-02-01 13:43:57 +00:00
James Vega
0fde2393e6
Update usage of utils.iter functions.
2005-01-31 15:22:48 +00:00
James Vega
4d32d36982
Update a few more places that use utils.str functions.
2005-01-31 15:21:22 +00:00
James Vega
de89bf0265
Update usage of utils.str functions.
2005-01-31 14:52:27 +00:00
James Vega
28cb5abc65
Update usage of functions in utils.gen.
2005-01-31 13:06:43 +00:00
Jeremy Fincher
381a42d863
Added an "irc" argument to callbacks.Privmsg.__init__, so now plugins get an Irc on instantiation.
2005-01-29 19:16:29 +00:00
Jeremy Fincher
34f1fe6562
Swapped the argument order for nItems *again*.
2005-01-28 15:17:26 +00:00
Jeremy Fincher
5fd6bbb52d
Completely restructured our utils modules.
...
Tons of changes. Here's the summary of things that matter most:
* There is no more supybot.fix.
* There is no more supybot.webutils; now there is supybot.utils.web.
* It's no longer webutils.WebError, but just utils.web.Error.
* You shouldn't import itertools, ideally, but instead import utils.iter.
* No more using imap/ifilter in commands unless absolutely necessary. It's
premature optimization and annoying.
* utils.str.format isn't quite ready yet, but will be soon. That'll be the
next big thing to fix in our code.
2005-01-27 06:59:08 +00:00
Jeremy Fincher
5019d10a1b
Updated license years.
2005-01-19 13:33:05 +00:00
Jeremy Fincher
8ca625d339
Initial import.
2005-01-19 13:14:38 +00:00
James Vega
dbfec8afb9
Add supybot module
2007-04-22 20:10:26 +00:00
Jeremy Fincher
69f71d1850
Fixed a simple XXX.
2005-01-07 15:49:11 +00:00
Jeremy Fincher
1f90a8ae54
Extra backup for something I can't remember what now.
2005-01-04 03:45:24 +00:00
James Vega
4cd15d053a
Move the docstring for addressed
2004-12-29 19:22:37 +00:00
James Vega
7217b01cd2
Tag addressed messages with the results of callbacks._addressed. Also,
...
reorder the calling of addressedRes and res in PrivmsgCommandAndRegexp so
that addressedRes are run first.
2004-12-29 06:15:19 +00:00
Jeremy Fincher
8b563876ea
We shouldn't try to get ChannelValues when not given a channel.
2004-12-20 18:58:07 +00:00
Jeremy Fincher
ca8100605c
We shouldn't try to get ChannelValues when not given a channel.
2004-12-20 18:56:25 +00:00
Jeremy Fincher
bc5e7de336
Let's try this location for our placement of a dynamic channel.
2004-12-17 06:02:10 +00:00
Jeremy Fincher
664c468130
Updated to respect channel-value-ish-ness of reply.showSimpleSyntax.
2004-12-16 14:16:56 +00:00
Jeremy Fincher
93e9fa3180
Change assert message.
2004-12-10 08:12:18 +00:00
Jeremy Fincher
400c9aa7a3
Change from an old-school typecheck to a new-school one.
2004-12-10 08:09:01 +00:00
Jeremy Fincher
4d35de48c2
Added an assert.
2004-12-10 07:59:06 +00:00
Jeremy Fincher
7950141d94
Didn't update when I changed this configuration variable name.
2004-12-10 07:44:24 +00:00
Jeremy Fincher
c5e48d574f
Indentation change.
2004-12-10 07:03:53 +00:00
Jeremy Fincher
c948a257fa
Fix for test failures in Fun.py.
2004-12-08 07:09:40 +00:00
Jeremy Fincher
955bf08255
Rudimentary sorting.
2004-12-02 05:37:04 +00:00
Jeremy Fincher
040888405c
Refactoring of error-related configuration variables.
2004-11-04 05:34:24 +00:00
Jeremy Fincher
f4f35f5d7c
Fixed some help stuff.
2004-10-27 07:05:58 +00:00
Jeremy Fincher
8324de6da4
Help abstraction.
2004-10-27 04:29:03 +00:00
Jeremy Fincher
e688faf16e
Moved standardSubstitute to ircutils.
2004-10-27 01:37:19 +00:00
Jeremy Fincher
4539f388bf
Fixed an infinite loop bug.
2004-10-26 19:59:45 +00:00
Jeremy Fincher
f11e7d19d3
Fixed a bugz0r.
2004-10-26 19:37:03 +00:00
Jeremy Fincher
e378b34138
Added a configurable more length.
2004-10-26 18:54:03 +00:00
Jeremy Fincher
0408beb0fb
Fix for bug with instant mores; also change supybot.reply.truncate to supybot.reply.mores (i.e., it's not just a group now, it's a boolean).
2004-10-26 18:42:53 +00:00
James Vega
cbd5abbab7
A bunch more %r -> %s conversions as well as wrap updates, new policy for
...
Channel.voice and some bug fixes for Debian
2004-10-25 22:59:03 +00:00
Jeremy Fincher
7f5a12a893
Extra debug log.
2004-10-24 07:36:00 +00:00
James Vega
4dafdcdd57
Massive updates. %r -> %s, some commands.wrap updates. Factoids is broke
...
until we get some stuff working in commands.py
2004-10-23 22:07:50 +00:00
Jeremy Fincher
d20381336a
Bugfix for nick.atEnd taking precedence over prefixChars.
2004-10-23 19:26:53 +00:00
Jeremy Fincher
c943ab77bb
Made commands.wrap stop doing decorators, exposed thread and urlSnarfer, and changed plugins accordingly.
2004-10-22 05:56:55 +00:00
Jeremy Fincher
5bc91113fe
Fixed so disabled commands in other plugins won't break our outfilter.
2004-10-10 15:11:19 +00:00
Jeremy Fincher
3dceea823d
Added supybot.reply.whenAddressedByNick.atEnd.
2004-10-09 02:48:08 +00:00
Jeremy Fincher
b03000ed42
If replies.success is empty, don't send a success message at all.
2004-10-02 18:28:58 +00:00
Jeremy Fincher
c23e6c97a6
Automatically raise errorNoCapability as well.
2004-10-01 21:26:20 +00:00
Jeremy Fincher
e6efedbdf4
Fixed a bugz0r in replies.
2004-10-01 01:32:17 +00:00
Jeremy Fincher
6878510d7e
Let's safe-argument this thing earlier.
2004-09-30 07:36:55 +00:00
Jeremy Fincher
c20d3cafbd
Let's make threaded commands tag the message as replied from the start, so things like Infobot won't respond.
2004-09-30 05:29:26 +00:00
Jeremy Fincher
69dce4761d
Made sure to return our reply messages, changed some threading stuff, etc.
2004-09-30 04:13:08 +00:00
Jeremy Fincher
f9ae666f3b
Fixed a bug in errorInvalid's handling of Raise. Man, we just need to default it to True for everything and make people deal.
2004-09-28 08:12:03 +00:00
Jeremy Fincher
9ca87988ae
We should return the message from errors/replies.
2004-09-28 07:16:32 +00:00
Jeremy Fincher
23fb9e1c7b
Changed tag name to isError rather than errored.
2004-09-24 20:28:31 +00:00
James Vega
35894401c7
Let's move noReply() to RichReplyMethods so that anything that subclasses
...
it can use noReply(). Fixes bug #1032406
2004-09-24 13:52:46 +00:00
Jeremy Fincher
78da84e4cb
Configurable quotes, w00t.
2004-09-24 01:13:17 +00:00
Jeremy Fincher
3e58419338
Various minor refactorings, moved supybot.reply.{brackets,pipeSyntax} to supybot.commands.nested.
2004-09-23 23:15:27 +00:00
James Vega
f700927969
We were missing an import and a conf. header
2004-09-23 19:15:14 +00:00
Jeremy Fincher
72214dc9d0
Added supybot.reply.maximumLength.
2004-09-23 17:07:54 +00:00
Jeremy Fincher
0aa6cd5c28
Fixed importantPlugin dispatching.
2004-09-23 16:32:58 +00:00
Jeremy Fincher
16b9fb386e
Added a repr keyword argument to errorInvalid and used it to fix bug #1030474 .
2004-09-22 22:41:58 +00:00
Jeremy Fincher
fc8da1888c
Variable name change.
2004-09-22 22:26:17 +00:00
Jeremy Fincher
998f61cce8
Moved disambiguation stuff to callbacks.IOP. Also fixed rename-persistence.
2004-09-22 21:38:20 +00:00
James Vega
781ba32793
Fix bug #1030367 , supybot.replywithNickPrefix doesn't obey channel value
2004-09-21 01:32:26 +00:00
James Vega
50973a10fb
Remove #! lines.
2004-09-20 03:01:50 +00:00