Commit Graph

11070 Commits

Author SHA1 Message Date
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
James Lu bdd0adfef5 RSS: add missing configuration help for feed URL options
This fixes confusing "That configuration group exists, but seems to have no help." errors on the URL
options for feeds, when these options are actually relevant and settable.
2017-12-09 23:03:42 -08:00
James Lu c78aff24e8 Hashes: fix copyright year format
[skip ci]
2017-11-09 09:08:41 -08:00
James Lu fffe1efa9b Hashes: remove duplicate check for hashlib.algorithms_available
This code is never wrap()'ed if the attribute is unavailable, so it isn't necessary to check for it in runtime twice.
2017-11-09 09:05:58 -08:00
James Lu 287610b776 Hashes: simplify test suites
- Use hasattr instead of assigning the import availability to a variable
- Use a simple if statement instead of redefining skipIf
2017-11-09 09:04:21 -08:00
James Lu 41830a46aa String, Hashes: remove links describing hashing methods
These are either dead or don't accurately describe the state of these methods
today. For example, the SHA1 site still describes SHA-1 and MD5 as "trusted"
despite widely reported collision attacks already being possible[1][2][3].

[1]: https://www.computerworld.com/article/3173616/security/the-sha1-hash-function-is-now-completely-unsafe.html
[2]: https://arstechnica.com/information-technology/2017/02/at-deaths-door-for-years-widely-used-sha1-function-is-now-dead/
[3]: https://techcrunch.com/2017/02/23/security-researchers-announce-first-practical-sha-1-collision-attack/
2017-11-09 09:01:29 -08:00
Ken Spencer b84ce3e43f Add hashes plugin (#1315)
* add plugin Hashes, containing hash and encryption related commands

* Hashes: make the default plugin Hashes when the commands are used by themselves

* Hashes: add supybot.conf because of registerDefaultPlugin

* Hashes: import registry to help with registerDefaultPlugin

* Hashes: add in nicks for test

* actually use hashlib instead of crypt, also s/'String'/'Hashes'

* Hashes/test: add group in for testing

* Hashes: add in changes per @GLolol

* Hashes: remove xor

* Hashes: make plugins = ('Hashes',) instead of ('Hashes') because python is weird

* Hashes: fix sha512 calling sha256, use utils.str.format on 'algorithms'

* Hashes: just use the variable instead of substitution per @GLolol

* Hashes: follow through with not using substitution

* Hashes: disable the 'algorithms' and 'mkhash' commands if the underlying 'hashlib.algorithms_available' isn't available

* Hashes: don't use registerDefaultPlugin its for core plugins

* Hashes: also somehow I didn't change the copyright

* Hashes/test: fix copyright in file
2017-11-09 17:56:43 +01:00
James Lu fd59612002 Time: tweak 'ddate missing' error message
Fix grammar and use a consistent URL format.
2017-10-29 16:24:45 -07:00
James Lu 9e7ca56067 Time: be less noisy about missing ddate module
This is a fairly niche command so it's not necessary to bother the user on every load.
Also, clarify which plugin this message originates from.
2017-10-29 16:24:45 -07: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
James Lu 40b469ef82
Merge pull request #1312 from IotaSpencer/fix_mailmap
update mailmap with a few more emails
2017-10-28 15:21:32 -07:00
Ken Spencer 4415816468 update mailmap with a few more emails to correctly merge the right commits 2017-10-28 18:17:49 -04: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 f4cae9614f ShrinkUrl: remove 'expand' as longurl.org has been dead for some time
Closes #1243.
2017-10-28 00:14:05 -07: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
James Lu e05f1ae5df ShrinkUrl: fix tests for x0, broken by #1242 2017-10-27 23:48:52 -07:00