Valentin Lorentz
a4f8e3f647
Deduplicate (de)serialization code shared by UsersDictionary and ChannelsDictionary.
2019-09-26 22:48:05 +02:00
Valentin Lorentz
7d218ec8ce
Document unpreserve.Reader (expected format + method hooks).
2019-09-26 22:47:04 +02:00
Valentin Lorentz
84c1f1572d
Don't temporarily set msg.channel to invalid values.
...
This causes issue when multiple command threads deal with the same message.
2019-09-20 21:25:32 +02:00
jesopo
6c5072cfe0
only raise in commands.process() when a raise was wrapped ( #1370 )
2019-09-18 20:27:02 +02:00
Valentin Lorentz
40837dbda0
Don't mutate server list while iterating on it.
...
It causes hanging at bot/test stops.
2019-09-15 08:02:10 +02:00
Valentin Lorentz
573921c00f
Merge branch 'netconf-and-ircmsgs-channel' into testing
2019-09-14 12:10:47 +02:00
Valentin Lorentz
67c2bacd69
Set msg.channel in ReplyIrcProxy and NestedCommandsIrcProxy.
...
Needed when plugins use a self.Proxy with a crafted message;
else the called commands will assume the message was sent in
private.
2019-09-08 21:35:35 +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
b65d78518c
Services: Add support for network-specific password.
2019-08-25 14:08:11 +02:00
Valentin Lorentz
0b5bd625eb
Add test for simple registry value inheritance.
2019-08-25 00:07:29 +02:00
Valentin Lorentz
7e1a1a23a9
Fix fallback of Group.__getattr__ on protected attributes.
2019-08-25 00:06:35 +02:00
Valentin Lorentz
e9bf05bbab
Don't unregister subtree if only the child is unset.
...
Because now, grandchildren may have set values.
2019-08-24 23:37:23 +02:00
Valentin Lorentz
c1ae3f5c81
all plugins: Use msg.channel instead of msg.args[0] + give network name to self.registryValue.
2019-08-24 23:35:01 +02:00
Valentin Lorentz
9326331c60
Merge branch 'ircmsg-channel' into netconf-and-ircmsgs-channel
2019-08-24 15:39:17 +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
4f024cb0b2
Add network-specific config values.
2019-08-15 12:22:43 +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
bf7db13f01
Disallow mutating commands in Aka/Alias/Scheduler by default.
...
It's too easy to abuse these commands when owners don't know they have to set
the appropriate anticapabilities; so let's set the anticapabilities by default.
2019-07-31 23:00:55 +02:00
Valentin Lorentz
76699ec063
Add support for 'message-tags' capability, to receive TAGMSGs.
2019-05-08 21:19:53 +02:00
Valentin Lorentz
71dbd39dd7
Revert changes to the structure of sdist packages.
...
c87aacb690
b882d1cc00
b1db15c056
2019-02-23 00:12:06 +01:00
jesopo
e7b076aa44
startwith
-> startswith
2019-02-22 20:31:07 +01:00
jesopo
61d9596d35
Support [ipv6]:port
format
2019-02-22 20:31:07 +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
624553c069
irclib: Don't return the same nick twice when duplicates in supybot.nick.alternates + supybot.nick.
...
It migt crash on: 'assert newNick != self.nick'
2019-01-27 09:10:06 +01:00
Valentin Lorentz
b051537f7f
Add support for Python 3.8/nightly.
2019-01-06 18:08:15 +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
Valentin Lorentz
b1db15c056
Add a symlink supybot pointing to src/ + move locales/ to src/
...
This looks like a more standard source tree, and allows for running tests without installing.
2019-01-02 14:29:32 +01:00
Valentin Lorentz
fcf30a5601
Fix FutureWarning related to nested sets.
...
See https://bugs.python.org/issue30349
2018-12-29 23:36:57 +01:00
Valentin Lorentz
06400596e9
Prevent commands.process from trying to increase heap size. Closes GH-1353.
2018-12-15 22:15:12 +01:00
Valentin Lorentz
c1d3bad64f
Raise error even if supybot.replies.(generic)noCapability is empty.
2018-10-06 08:13:11 +02:00
Valentin Lorentz
11dd5049fe
Fix MITM warning.
2018-10-06 08:13:10 +02:00
Valentin Lorentz
88894d69bc
Fix fa2c11eec1
.
2018-09-25 20:04:07 +02:00
Valentin Lorentz
1ac7812d7a
Use __slots__ for core config values.
2018-09-25 18:59:46 +02:00
Valentin Lorentz
fa2c11eec1
registry: Get rid of the 'class X'-based hack.
2018-09-25 18:55:42 +02:00
296d44354f
src/conf.py: clarify supybot.protocols.http.proxy
2018-09-16 14:19:30 +02:00
Valentin Lorentz
c433f05190
Add a config var to require SASL auth when connecting.
2018-09-10 22:48:49 +02:00
Valentin Lorentz
7cc7b4fac9
Redesign the message truncation algorithm.
2018-09-10 22:39:45 +02:00
James Lu
c5175110e0
Socket: fix 91a38887a
with backported ipaddress on Python 2
...
Closes GH-1342.
2018-07-09 03:37:10 +00:00
James Lu
72c4801bb9
Socket: fix previous commit
2018-06-19 12:13:45 -07:00
James Lu
91a38887a2
Socket: suppress "not using TLS" errors on loopback addresses
...
This is a refined version of #1317 .
2018-06-19 11:59:42 -07:00
Valentin Lorentz
c2b6305c46
Config: Support arbitrarily many channels for '@config channel'.
2018-05-29 22:17:28 +02:00
James Lu
43ee68ee3d
conf: maxHistoryLength no longer requires a restart to apply
...
03c4529d9e
made irc.state.history network specific, so reconnecting each network separately will update its history buffer's max length.
2018-05-19 12:50:56 -07:00
Valentin Lorentz
0d627c05b7
Do not break UTF-8 characters in long words. Closes GH-1333.
2018-04-14 22:31:30 +02:00
James Lu
75e6816e91
Merge pull request #1332 from farooqkz/master
...
Added docstring for getIrc()
2018-03-26 08:10:12 -07:00
Farooq Karimi Zadeh
3a4b77cefd
Added docstring for getIrc()
2018-03-26 13:40:15 +04:30
Valentin Lorentz
c930edd943
Report 'Limnoria <foo>' instead of 'Limnoria Limnoria <foo>' as a version.
2018-03-02 01:20:52 +01:00
Valentin Lorentz
af98c0c12e
Allow MODE arguments that do not start with a + or a -.
2018-02-06 15:35:49 +01:00
Valentin Lorentz
9c1d46d151
Add channel-specific config variables that are only settable by the owner.
2018-02-06 14:20:37 +01: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
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
Nicolas Coevoet
2b030ac178
more arguments added for WHOX, to avoid external plugins recall same requests
2018-01-23 19:37:19 +01:00
Valentin Lorentz
40b9bbcb1b
Send 'AUTHENTICATE :+' at the end of a SCRAM auth.
...
https://github.com/ircv3/ircv3-specifications/pull/326
2018-01-14 22:53:40 +01:00
James Lu
8981b225f1
ircdb: fix typo in supybot.capabilities.registeredUsers description
2018-01-06 10:39:05 -08:00
Valentin Lorentz
b9a159b68a
Add supybot.capabilities.registeredUsers, to give default capabilities to all registered users.
2018-01-05 19:24:54 +01:00
Valentin Lorentz
d656db454d
User: if '@hostmask add' detects a conflict and the caller is the owner, tell them who the conflicting user is.
2017-12-30 18:47:09 +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
James Lu
dbbd7b4c4e
log: fix a typo (normal->normally)
2017-12-12 20:54:34 -05:00
James Lu
cc06c9f5f0
conf: mention that externalIP is not used by Limnoria core
...
Closes #1311 .
2017-10-29 16:24:45 -07:00
Ken Spencer
e08a393960
src/ircmsgs: modes doesn't just quiet ('Returns a MODE to /quiet/ each of nicks on channel') ( #1313 )
...
* src/ircmsgs: modes doesn't just quiet ('Returns a MODE to /quiet/ each of nicks on channel')
* plus also fix some possible english issues
* src/ircmsgs: fix up docs per @GLolol
* src/ircmsgs: fix up wording per @ProgVal s/pairs/2-tuples/
2017-10-29 16:55:10 +01: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
Valentin Lorentz
96694a31f6
Revert "conf: fix validation of multiple IP addresses"
...
This reverts commit ebb48a4808
.
2017-10-28 09:32:52 +02:00
James Lu
ebb48a4808
conf: fix validation of multiple IP addresses
...
Previously, setting supybot.servers.http.hosts6 to multiple IP addresses always
failed because utils.net.isIPV6() gets passed a string with a space in it.
This code worked however for multiple IPv4 addresses because inet_aton(), which
is used internally by isIPV4(), allows and ignores trailing data after the
first IP address it finds.
Thanks to @MrBenC for reporting.
2017-10-27 23:57:52 -07: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
4f6a5e7db9
Add config variable supybot.commands.allowShell. ( #1301 )
2017-09-24 21:11:21 +02:00
Valentin Lorentz
4a0ad92e58
Remove overly complicated code.
2017-09-19 00:34:25 +02:00
James Lu
d96d464698
test: lower wait time between fetching responses, for faster tests
2017-09-17 19:29:50 +02:00
Valentin Lorentz
bdbc79bfc6
Fix for Slack.
2017-08-23 18:51:54 +02:00
Valentin Lorentz
b00081f6c9
Make REMOVE a high-priority message. Closes GH-1294.
2017-08-03 22:02:01 +02:00
Valentin Lorentz
d5b4275b23
Merge pull request #1297 from Peppernrino/patch-1
...
Fix spelling mistake.
2017-08-01 09:48:41 +02:00
Peppernrino
f0b2af9ab2
Fix spelling mistake.
2017-07-31 23:50:01 -06:00
Valentin Lorentz
59ed253a0e
supybot-wizard: do not pollute the CWD before paths to directories are known.
2017-06-04 15:59:06 +02:00
Valentin Lorentz
5665f2f477
Use msg.tagged instead of deprecated IrcMsg.__getattr__ API.
2017-03-25 22:03:03 +01:00
Valentin Lorentz
355ff7ffdf
Fix support for Python < 3.4.
2017-02-25 13:24:03 +01:00
Valentin Lorentz
dab026169f
Use ast.literal_eval() instead of eval() when possible.
...
It's unlikely to change anything, but a little more safety
does not hurt.
2017-02-25 13:10:33 +01:00
Valentin Lorentz
8bae847682
Use ast.parse in 'eval' mode instead of 'exec'.
...
This fixes compatibility with Python 3.7; but we should have
been doing this since b8fe420ef3
.
The incompatibility with Python 3.7 was introduced in
cb41b2766d
See also: http://bugs.python.org/issue29646
2017-02-25 11:31:52 +01:00
James Lu
9f57bde853
ircutils: remove redundant str.replace
...
As strings, '\x0f' == '\x0F', and '\x1f' == '\x1F'
2017-02-23 17:30:34 -08:00
Valentin Lorentz
8652c683ab
Fix case-insensitive plugin loading if a plugin is in two directories.
2017-01-22 21:22:39 +01:00
Valentin Lorentz
8ce43110b6
Working support of scram-sha-256.
2017-01-11 00:10:46 +01:00
Valentin Lorentz
9be4db01f8
Fix ecdsa nameerror introduced in previous commit.
2017-01-10 23:27:50 +01:00
Valentin Lorentz
e87ad5b5a3
Untested implementation of SASL SCRAM auth.
2017-01-10 23:23:56 +01:00
Valentin Lorentz
90c5c78813
Add option --no-setuid to supybot-test
...
https://bugs.debian.org/834950
2017-01-10 22:56:17 +01:00
Valentin Lorentz
95a1f21600
Revert some instances of s/iteritems/items/ in be118c3338
.
2016-11-11 13:04:00 +01:00
Valentin Lorentz
5b29c8c0dd
utils.iter: Allow None argument to filterfalse and all.
...
Fixes bug in the Debian plugin.
2016-10-27 20:51:36 +02:00
Valentin Lorentz
337094a1f4
Document argument 'heap_size' of commands.process.
2016-10-26 18:11:01 +02:00
Valentin Lorentz
97d29d7913
Bring back VersionIsEmpty for supybot.user
...
Was removed by e5729bc86d
, but
the removal breaks compatibility with popular IRCds.
2016-10-01 23:47:42 +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
79bcc04d0a
Fix Python 3.6 support of utils.python.glob2re.
2016-09-14 20:09:00 +02:00
Valentin Lorentz
e5729bc86d
Remove VersionIfEmpty config type, useless since 278a111f5f
.
2016-08-16 11:03:58 +02:00