Commit Graph

11654 Commits

Author SHA1 Message Date
Valentin Lorentz
00b8b6b51e Later: Add support for hostmasks. 2018-07-05 19:48:43 +02:00
Valentin Lorentz
50c41f5862 Fix previous commit on python 2. 2018-06-27 11:10:14 +02:00
Valentin Lorentz
1840b94453 Later: load the db with utf8 encoding (the default for AtomicFile). 2018-06-27 00:54:58 +02: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
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
36309ad1dc If SOURCE_DATE_EPOCH is available, use it to get a proper version instead of 'installed on'.
#1338
2018-06-01 08:29:51 +02:00
Bernhard M. Wiedemann
cd8ad1edb6 Allow to override build date
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.
2018-06-01 08:24:20 +02:00
Valentin Lorentz
01e4427057 Config: Fix previous commit. 2018-05-29 22:46:56 +02: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
2d084f4deb Math: Convert the output of factorial() to a float. 2018-05-10 06:20:55 +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
cd479717b8 Web: Add supybot.plugins.snarfMultipleUrls. Also, fix Web's test cases. 2018-04-14 21:50:32 +02:00
Valentin Lorentz
f26f098d82 supybot-wizard: Warn if run with ~/.local/bin as CWD. 2018-04-11 11:57:12 +02:00
James Lu
6a8921fc64
Merge pull request #1334 from JohnVillalovos/setup
setup.py: Remove unneeded import of match for ceil() function
2018-04-03 18:13:22 -07:00
John L. Villalovos
626443bf30 setup.py: Remove unneeded import of match for ceil() function
The ceil() function was previously used in setup.py was removed by
commit c3a2c800f1. So we no longer need
it.
2018-04-03 18:08:08 -07: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
Tasos Sahanidis
b900a369a4 RSS: Fix feeds with missing description or title
An AttributeError would be raised when a blacklist or a whitelist
would be set on feeds that miss either a title or a description.
2018-03-13 23:50:47 +01:00
Valentin Lorentz
e2180a1e08 Add variable supybot.plugins.Web.snarferPrefix. 2018-03-02 01:26:00 +01:00
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
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
James Lu
55723c2161 Services: fix rejoin-on-kickban with atheme 7.x
- Adjust _chanRe to only match channels, as atheme also puts the target nick in bold
- Look for "unbanned <botnick>" messages in ChanServ notices (after stripping formatting)

This likely fixes GH-166. atheme has been using this format since at least 2005[1],
so it's possible that Supybot's rejoin-on-ban had never worked with it.

[1]: 4017c0da85 (diff-ba2bdc02ba7b29fd7e4931cafe63baa0R218)
2018-01-27 13:22:21 -08:00
James Lu
add3ceb4e7 Services: do not send the bot's nick in ChanServ commands
On Atheme, Anope, and oftc-ircservices, /cs unban, invite, op, and voice
implicitly assume the caller if no nick is given. However, certain combinations
such as /cs invite *with* a nick are not supported on atheme per
https://github.com/atheme/atheme/issues/568, and cause rejoin-on-kick to +i
channels to fail.

This fixes one part of GH-1118.
2018-01-27 13:22:15 -08:00
James Lu
eb1cb9bd76 Services: don't mangle the case of NickServ notices in logging
This might be confusing if you're dealing with password changes, etc.
2018-01-27 12:33:36 -08:00
Valentin Lorentz
5daaa14825 NickAuth: Fix NameError caused by e732931688. 2018-01-25 14:09:19 +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
e732931688 Modified NickAuth to match the new WHOX 2018-01-23 19:37:19 +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
d521a5cdc8 .travis.yml: no optional dep of py2.6; sqlalchemy no longer supports that version. 2018-01-14 23:17:47 +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
Valentin Lorentz
64f27eff74 Clean up previous commit. 2018-01-13 00:08:22 +01:00
Valentin Lorentz
b6af3baf6d UTC calculation fix in setup.py
* Streamlined all date calculation based on git timestamps.
    * Removed incorrect utc_date calculation.
    * Minimised the code differences for Python versions (down to one line).
    * Changed the git show command to leverage the output displaying the
      number of seconds since the epoch.
    * Thus making the final UTC calculation simply a function of
      specifying that in a time.gmtime call instead of attempting offset
      based calculations (which the original code got wrong).
2018-01-13 00:05:14 +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
Valentin Lorentz
bd39debb48 User: Simplify owner-checking logic, and fix crash when @hostmask remove is called by an unregistered user. 2017-12-30 17:12:35 +01:00
Valentin Lorentz
8cfb841f3b BadWords: better tests. 2017-12-26 05:46:46 +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
289c894dc5 Services: log all messages from NickServ to info
Closes GH-1016.
2017-12-10 11:03:30 -08:00
Valentin Lorentz
3ab226c129 RSS: Only defer feed loading at plugin load while the bot is starting.
Defering it if the plugin is (re)loaded while already running is useless.
Closes GH-922.
2017-12-10 09:39:20 +01:00