Commit Graph

1545 Commits

Author SHA1 Message Date
Valentin Lorentz
fcb342cb2c test: Mock calls to time.sleep()
The tests now take 7 seconds instead of 30.
2019-12-15 20:20:42 +01:00
Valentin Lorentz
a8b6698849 Add config supybot.reply.format.list.maximumItems to limit the size of format('%L', ...). 2019-11-23 18:48:58 +01:00
James Lu
a4701b258c Plugin: accept author name in 'contributors' command 2019-11-16 11:41:13 -08:00
James Lu
7854db7135 Better formatting in supybot.Author if some fields are missing 2019-11-16 11:41:13 -08:00
Valentin Lorentz
b2f6c3c83f test: Don't overwrite the main Schedule in the driver list.
Closes GH-1385.
2019-11-11 18:06:07 +01:00
Valentin Lorentz
9268356e97 Split 'CAP REQ' commands to not exceed 512 bytes. 2019-10-25 23:07:31 +02:00
Valentin Lorentz
573921c00f Merge branch 'netconf-and-ircmsgs-channel' into testing 2019-09-14 12:10:47 +02:00
Valentin Lorentz
f143e977d6 Interpret empty server tag values as missing tag values.
As required by https://ircv3.net/specs/extensions/message-tags
2019-09-08 14:47:05 +02:00
Valentin Lorentz
88524beada ChannelLogger + Karka + all DB plugins: Sanitize channel names when used in filenames. 2019-09-06 20:42:13 +02:00
Valentin Lorentz
0b5bd625eb Add test for simple registry value inheritance. 2019-08-25 00:07:29 +02:00
Valentin Lorentz
e878279e6a py2.6 compat for cac3de71b1. 2019-08-25 00:07:11 +02:00
Valentin Lorentz
cac3de71b1 Add test for escaping registry key names. 2019-08-24 23:37:47 +02: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
5b40b5136d Limit statusmsg prefix stripping to PRIVMSG and NOTICE. 2019-08-18 10:09:11 +02:00
Valentin Lorentz
7a7cdb9f05 Add a 'channel' attribute to IrcMsg objects.
It's nicer to use 'irc.channel' instead of 'irc.args[0]', and .channel
provides the actual channel name (stripped of the statusmsg prefix),
so it can be used by plugins when they want to use the actual channel
name.
2019-08-17 22:23:51 +02:00
Valentin Lorentz
d4cac026d4 Remove '+' from the default chantypes.
It's more likely to be a statusmsg than chantype.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
696254ff1b Use irc.isChannel instead of ircutils.isChannel when possible.
It's aware of the network's 'chantypes'.
2019-08-04 21:52:40 +02:00
Valentin Lorentz
6d938e0999 Fix test for pypy 3. 2019-02-07 22:10:24 +01:00
Valentin Lorentz
233deee0d3 Fix previous commit for py2 and pypy. 2019-02-07 21:35:39 +01:00
Valentin Lorentz
969b9ed341 Make utils.python.collect_extra_debug_data support objects with __slots__. 2019-02-07 21:00:56 +01:00
Valentin Lorentz
7adc958dd6 Fix SyntaxWarnings on Python 3.8 2019-01-06 18:06:44 +01:00
Valentin Lorentz
a03a89730a Fix bugs in wrapping IRC messages. 2019-01-06 16:48:11 +01:00
Valentin Lorentz
93b0476751 Fix text wrapping when colors cross message boundaries. 2019-01-05 23:47:56 +01:00
James Lu
6f9deecbcf test_plugin_create: skip if supybot-plugin-create is not installed
This is often the case when tests are run automatically as part of a package build process (e.g. in Debian).

Reported by @unit193.
2018-06-25 14:04:45 -07:00
James Lu
11d4015f71 Fixes and tests to supybot-plugin-create; modernize the plugin template (#1340)
* supybot-plugin-create: compactify import statements in the template

* supybot-plugin-create: prefer importlib over imp on Python >= 3.4

The imp module is deprecated as of Python 3.4[1], with importlib being the successor. However, importlib is only available in Python 2.7+ and 3.1+, so we should still use a fallback.

[1]: https://docs.python.org/3.6/library/imp.html

* test: add test cases for supybot-plugin-create

* -plugin-create: fix errors when only a subset of args are given

* -plugin-create: rename --real-name to --author/-a

These days, working under a pseudonym or alias is not unheard of, so putting emphasis on real names feels somewhat out of place.

* -plugin-create: add -d as an alias to --desc for consistency
2018-06-20 17:18:46 +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
f26f098d82 supybot-wizard: Warn if run with ~/.local/bin as CWD. 2018-04-11 11:57:12 +02:00
Valentin Lorentz
2472e857c7 Fix test on Python 3. 2018-02-02 00:19:37 +01:00
Valentin Lorentz
39dacf6e5b Fix Python 2 support. 2018-02-01 23:21:18 +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
7e98802809 Drop STARTTLS support, it complicates the connection initialization too much. 2018-01-24 09:27:39 +01:00
James Lu
37a42b0e3b ircutils: split ! and @ in hostmasks from the right
This fixes /names parsing when ! is a prefix character and userhost-in-names is enabled: previously, strings such as "!@user!ident@some.host" were incorrectly split into "" for nick and "@user!ident@some.host" for ident@host.
2017-12-17 04:21:35 -05:00
Valentin Lorentz
11bbc89c9d Properly handle multiple hosts in supybot.servers.http.hosts4.
See ebb48a4808 (which I reverted).
2017-10-28 09:50:12 +02:00
James Lu
22408ce413 Fix tests from last commit 2016-03-15 08:35:46 -07:00
James Lu
1b0c2ab95a ircutils: add $network to standard substitutions 2016-03-14 20:30:11 -07:00
Valentin Lorentz
a8be36051f Add tests for ircdb serialization. 2016-02-07 10:49:44 +01:00
Valentin Lorentz
30cb10e422 Add support for CAP NEW, including reauthentication. 2015-12-12 00:52:44 +01:00
Valentin Lorentz
8aff8170e4 Filter list of SASL mechanisms when provided (908 or IRCv3.2-style CAP LS). 2015-12-11 23:30:57 +01:00
Valentin Lorentz
932345fa48 Fix test cases if ecdsa is not available. 2015-12-11 11:10:48 +01:00
Valentin Lorentz
45c23a8f54 Try all possible SASL mechanisms instead of just one. 2015-12-11 10:56:05 +01:00
Valentin Lorentz
15d59d1153 Handle AUTHENTICATE line splitting. 2015-12-10 20:08:53 +01:00
Valentin Lorentz
3b78fd2424 Tag NICK messages with the channel as for QUIT messages. 2015-12-04 13:27:11 +01:00
Valentin Lorentz
d2749ea4d6 Add support for BATCH. 2015-12-04 01:37:23 +01:00
Valentin Lorentz
f880229d78 Tag QUIT messages with the list of channels the user was on. 2015-12-04 01:14:42 +01:00
Valentin Lorentz
c587900c6f Make normalizeWhitespace remove \r as well. 2015-08-30 15:44:07 +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
39df987274 Fix timezone handling of b338a2370. 2015-08-22 20:38:16 +02:00
Valentin Lorentz
b338a23708 core: Use IRCv3.2 extension server-time to fill IrcMsg.time, if available. 2015-08-22 20:11:46 +02:00
Valentin Lorentz
11c10bb3f1 Add attribute IrcMsg.time. 2015-08-22 18:36:47 +02:00