Valentin Lorentz
2c5dc405fc
test: Revert generic 'The Limnoria Contributors' in copyright notices
...
I forgot to include these in 63eb6672ea
(This is fine because noone but me touched these files since the initial
change in db7ef3f025
).
2022-10-24 23:41:26 +02:00
Valentin Lorentz
96b7f51e71
callbacks: Ignore chathistory batches in PluginRegexp
...
This is consistent with what we already do with commands; and generally
makes sense, as we don't want to re-send titles and others when cycling
on UnrealIRCd (which includes a chathistory batch when joining when
chmode +H is set, despite umode +B)
2022-07-06 22:07:37 +02:00
Valentin Lorentz
3ecb37de10
test_callbacks: Add PluginRegexpTestCase.testReply to check basic behavior
2022-07-06 22:05:30 +02:00
Valentin Lorentz
6a943b8342
test_callbacks: Fix PluginRegexpTestCase to actually check regexp callbacks
2022-07-06 22:04:33 +02:00
Valentin Lorentz
109f938b0c
Implement +draft/channel-context
2022-04-22 18:30:31 +02:00
Valentin Lorentz
db7ef3f025
all: Add generic 'The Limnoria Contributors' to copyright notices.
...
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
8a52902727
irclib: Fix overhead computation by using the real target computation algo
2021-06-08 21:56:08 +02:00
Valentin Lorentz
d452a7051c
callbacks: Don't write nick prefixes in the middle of multiline messages.
2021-04-01 20:10:17 +02:00
Valentin Lorentz
bbc2e9de0d
irclib: 'lift' message tags to the batch when sending a multiline batch
2021-04-01 20:10:17 +02:00
Valentin Lorentz
bf90a7c94d
callbacks: Make reply() send multiline batches when supybot.reply.mores.instant > 1
2021-04-01 20:10:17 +02:00
Valentin Lorentz
11e79e44c5
Remove the '(XX more messages)' when the next message is sent immediately after
...
It's pointless and looks stupid.
It will look even more stupid when we enable multiline, because the
suffixes will be in the middle of the concatenated message.
2021-03-05 21:19:02 +01:00
Valentin Lorentz
f98542e884
Add testReplyInstant
...
I'm going to mess with instant replies to add support for multiline,
so it's good to have a safety net.
2021-03-05 21:11:43 +01:00
Valentin Lorentz
83a8afde16
Add experimental support for +draft/reply client capability on outgoing messages.
2020-05-07 21:17:55 +02:00
Valentin Lorentz
0b0da9716d
callbacks: honor network-specificity of supybot.reply.whenAddressedBy.
...
A side-effect is that plugins should now pass 'irc' instead of 'irc.nick'
when they call 'callbacks.addressed()'.
2020-04-11 15:00:46 +02:00
Valentin Lorentz
9891b0fca4
Replace failUnless/failIf with assertTrue/assertFalse.
...
The old names are deprecated.
2020-01-26 11:14:18 +01:00
Valentin Lorentz
32d8d141ad
Make irc.error do nothing is no string is given as argument.
...
Fixes c1d3bad64f
, which crashed with:
```
ERROR 2020-01-18T01:34:07 Uncaught exception in NickAuth._callCommand:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1337, in _callCommand
irc.errorNoCapability(cap)
File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 544, in errorNoCapability
raise Error()
supybot.callbacks.Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/supybot/log.py", line 368, in m
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1359, in _callCommand
irc.error(str(e))
File "/usr/local/lib/python3.7/dist-packages/supybot/callbacks.py", line 1065, in error
raise ArgumentError
supybot.callbacks.ArgumentError
```
2020-01-18 11:04:54 +01:00
Valentin Lorentz
8bb31a54e7
Strip statusmsg chars in core to determine the actual channel.
...
Use msg.channel if relevant, otherwise strip them locally.
2019-08-24 14:52:59 +02:00
Valentin Lorentz
09cb8e977f
supybot-test: Add a new level of verbosity, for showing only unexpected exceptions.
2015-08-29 23:02:20 +02:00
Valentin Lorentz
c3a2c800f1
Remove need for 2to3.
2015-08-11 16:50:23 +02:00
Valentin Lorentz
216c5d213f
Replace sys.version_info[0] usages with minisix.PY{2,3}.
2015-08-09 00:23:03 +02:00
Mikaela Suomalainen
635511f7e6
fix previous commit
2014-05-22 18:56:58 +03:00
Mikaela Suomalainen
8ef5adbc77
fix previous commit
...
Thanks @ProgVal :)
2014-05-22 18:40:14 +03: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
Valentin Lorentz
744681d259
Fix syntax error in tests when run with Python 3.1 and 3.2.
2013-08-10 15:40:10 +02:00
Valentin Lorentz
1ee8bc3480
Fix bug that caused commands like '@google google google google translate' to be valid. Closes GH-19.
2013-08-10 15:22:47 +02:00
Valentin Lorentz
c23f25545f
Fix core tests for Python 3 (actually imported + fixes).
2013-08-10 15:18:04 +02: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
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
Jeremy Fincher
89a535e8c1
Until we can safely load Karma, this test is staying commented out.
2009-11-25 09:17:52 -06:00
James Vega
a3e4fc5b1d
Change the modeline to use softtabstop instead of tabstop.
2006-02-11 15:52:51 +00:00
Jeremy Fincher
4dcc4dea87
Fixed PrivmsgTextCase not to require Karma, which requires SQLite.
2006-01-12 19:08:39 +00:00
James Vega
0880a07b72
test/test_callbacks: Fix a test failure.
2005-06-29 14:16:31 +00:00
James Vega
0027916214
test/test_callbacks.py: Added a test for multiple, nested invalidCommands not being recognized.
2005-06-08 14:28:48 +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
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
James Vega
8698eafd64
Add tests to clarify how source-nested commands work.
2005-04-14 01:47:21 +00:00
James Vega
8ce5a18120
Add tests for "command named same as nested command class".
2005-04-13 15:51:50 +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
James Vega
9971e991fe
Fix the modelines.
2005-03-23 20:07:45 +00:00
Jeremy Fincher
0e68a44513
Fixed bug with nested plugins having the same name as themselves.
2005-03-09 08:05:24 +00:00
Jeremy Fincher
52fabfdaf7
Added a test for nested plugins having the same command name as the plugin name. It fails right now.
2005-03-09 07:28:35 +00:00
Jeremy Fincher
7c2bbeb638
Forgot the tests for source-nested plugins.
2005-02-25 10:00:42 +00:00
Jeremy Fincher
5b3b616671
Forgot to remove the tests for getCommands.
2005-02-18 02:44:52 +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
a3ebea6edd
Commented out a test that will probably never work again.
2005-02-07 06:05:37 +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
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