Valentin Lorentz
7cc7b4fac9
Redesign the message truncation algorithm.
2018-09-10 22:39:45 +02:00
Valentin Lorentz
0d627c05b7
Do not break UTF-8 characters in long words. Closes GH-1333.
2018-04-14 22:31:30 +02:00
Valentin Lorentz
636712be51
Limit the number of combinations of capabilities required for command names with spaces.
...
To call a command named 'X Y Z' in plugin 'P', we used to require lots of capabilities,
like 'P.X', 'P.Y', 'P.Z', 'P.X.Y', 'X.Y', 'P.Y', ...
Now, we only require 'P', 'P.X', 'P.X.Y', 'P.X.Y.Z', and 'Z'.
It makes it a lot easier to work with command names with a space when
supybot.capabilities.default is False.
2018-02-02 18:20:05 +01:00
Valentin Lorentz
030ce5e6d4
Fix previous commit.
2018-02-01 22:37:24 +01:00
Valentin Lorentz
63a17f7491
Rewrite text wrapping to count line size in bytes instead of characters.
...
Also, fix shitty comparisons that were done in reverse.
2018-02-01 21:32:14 +01:00
Valentin Lorentz
965dcc293d
Do not call noReply() on raw IRC objects.
2017-10-26 09:21:31 +02:00
Valentin Lorentz
73ddedd73c
Fix previous commit to work with Karma.
2017-10-21 15:53:38 +02:00
Valentin Lorentz
543edccd41
Properly handle noReplies() in nested commands.
...
This fix prevents the bot from replying 'Error: I tried to send you an empty message'
when 'utilities ignore' is called from an Aka.
2017-10-21 15:37:43 +02:00
Valentin Lorentz
c6e29031d1
Make replies() behave consistently with reply() regarding the 'to' parameter.
...
Side-effect: Fixes channel-specificity of supybot.reply.onetoone for the Reply.replies command.
Closes GH-1266.
2016-10-01 13:37:03 +02:00
Valentin Lorentz
6ec0af2da3
Strip CTCP characters from irc.reply by default.
2016-04-24 21:11:34 +02:00
Valentin Lorentz
15e387ea46
Make irc.replies return all results in a single line by default (instead of following the conf), if used in a nested command. Closes GH-219.
2016-02-20 12:57:04 +01:00
Valentin Lorentz
7ce385b6f8
Don't substitude in errorInvalid. Closes GH-49.
...
Why was it doing substitutions in the first place?
2015-12-28 20:01:40 +01:00
Valentin Lorentz
d9a01629cd
Fix bytes count in message splitting.
2015-12-27 19:58:14 +00:00
Valentin Lorentz
5f361ef180
Conditional: Add command @iferror. Closes GH-1114.
2015-11-14 19:20:25 +01:00
Valentin Lorentz
a99e674b88
Add support for (anti)capabilities for multi-words commands. Closes GH-1140.
2015-09-23 12:00:18 +02:00
Valentin Lorentz
912d2e1538
core: Apply some suggestions of pyflakes.
2015-08-31 18:19:22 +02:00
Valentin Lorentz
c3a2c800f1
Remove need for 2to3.
2015-08-11 16:50:23 +02:00
Valentin Lorentz
f305ff3c02
Remove fix_basestring.
2015-08-10 20:24:11 +02:00
Valentin Lorentz
34d384bd67
Remove need for fix_methodattrs.
2015-08-10 18:09:52 +02:00
Valentin Lorentz
c0ac84bb53
Remove need for fix_import, fix_types, and fix_urllib.
2015-08-10 17:55:25 +02:00
Valentin Lorentz
216c5d213f
Replace sys.version_info[0] usages with minisix.PY{2,3}.
2015-08-09 00:23:03 +02:00
Valentin Lorentz
487f8c8af5
Merge remote-tracking branch 'supybot/master' into testing
...
Conflicts:
.mailmap
README
docs/FAQ.rst
plugins/Ctcp/plugin.py
plugins/Misc/plugin.py
plugins/Network/plugin.py
plugins/QuoteGrabs/plugin.py
plugins/RSS/README.txt
plugins/Relay/plugin.py
plugins/ShrinkUrl/config.py
plugins/ShrinkUrl/plugin.py
plugins/ShrinkUrl/test.py
setup.py
src/callbacks.py
src/commands.py
src/conf.py
test/test_commands.py
2015-05-15 14:41:08 +02:00
Valentin Lorentz
86d9f49aa5
callbacks: Allow Plugin.noIgnore to be a function instead of a boolean.
2015-05-15 12:39:30 +02:00
James Lu
6add519765
callbacks.py: log plugin name in registryValue='text' errors
...
This can help with debugging to find what plugins are passing invalid things to registryValue().
2015-04-05 13:44:30 -07:00
Valentin Lorentz
6a134eb302
Update string comparison to a newer string.
...
Signed-off-by: James McCoy <vega.james@gmail.com>
2015-03-26 02:04:06 -04:00
Valentin Lorentz
b0846f914e
Fix crash for commands with ambiguous getopts shortcuts and no docstring.
...
Signed-off-by: James McCoy <vega.james@gmail.com>
2015-03-26 02:00:43 -04:00
Valentin Lorentz
4470805b5f
core: Remove useless imports.
2015-03-03 09:02:29 +01:00
Valentin Lorentz
72e71edb89
Update string comparison to a newer string.
2015-03-03 08:55:29 +01:00
Valentin Lorentz
6f9960d7a4
Fix crash for commands with ambiguous getopts shortcuts and no docstring.
2015-03-03 08:55:29 +01:00
Valentin Lorentz
681bd5d85d
Count number of bytes instead of number of characters for truncating messages. Closes GH-1038.
2015-02-04 17:31:42 +01:00
Dan
bd2d17a1c2
update irc.reply() change new arg name
2015-01-17 03:49:32 -05:00
ddan39
2fe84a3474
add usesendMsg=False to irc.reply() to use sendMsg() instead of queueMsg()
2015-01-17 07:13:30 +01:00
Valentin Lorentz
6f19088724
Merge remote-tracking branch 'supybot/master' into testing
...
Conflicts:
.gitignore
plugins/Alias/plugin.py
plugins/Anonymous/plugin.py
plugins/Anonymous/test.py
setup.py
src/callbacks.py
2014-07-12 09:48:27 +02:00
James McCoy
3d993a0cab
callbacks: Properly handle nested command errors
...
Using Raise=True was only papering over the real problem in the nested
command error handling. The actual issue is that we were trying to
return an IrcMsg from NestedCommandsIrcProxy.__init__. Dropping
Raise=True and moving return to its own line is the correct fix and
resolves the test failure in testMaximumNestingDepth.
This commit reverts 7838cae3bc
Signed-off-by: James McCoy <vega.james@gmail.com>
2014-06-29 19:12:22 -04:00
Valentin Lorentz
ddc37a7f4a
Revert "Make supybot.reply.oneToOne not always true on channels."
...
This reverts commit 5881c97120
.
2014-06-11 11:13:01 +00:00
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
Valentin Lorentz
5881c97120
Make supybot.reply.oneToOne not always true on channels.
2014-05-30 17:03:12 +00:00
Valentin Lorentz
0da8ab759e
Fix doc (again).
2014-03-21 15:34:14 +00:00
Valentin Lorentz
5f8e45aaa8
Fix doc of NestedCommandsIrcProxy.reply.
2014-03-21 15:31:48 +00:00
Valentin Lorentz
4fe74ed397
Merge branch 'aka-sqlite3' into speed-up-2to3
2014-02-02 22:15:43 +01:00
Valentin Lorentz
f27484d2bb
Switch comments of callbacks.PluginRegexp's attributes to docstrings (for Sphinx).
2014-01-21 13:43:52 +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
01278dc56c
Aka: Fix 'factorial-complexity' recursion and command overriding.
2013-12-11 16:01:01 +00:00
Valentin Lorentz
aea77d64e7
callbacks.py: Pass a reference to the plugin to pre-command callbacks.
2013-11-26 16:57:33 +01: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
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
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