It works in the test suite because other plugins do the right import,
but we need to do it here as well if we want supybot-test to run on
this plugin alone.
- Remove author sorting; it's not obvious that this is being done anyways.
- Format author and contributors as separate sentences; conjunctions are messy for code and very language-specific.
This has limited value these days, because 1) the email info for authors is most often in a public VCS already 2) it makes using the actual contact info harder.
* utils.web: Import html escaping functions
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add web interface for browsing Akas
Fixes#1226.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* httpserver: Actually handle KeyError in unhook
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: FakeHTTPConnection: Don't decode data in send
BaseHTTPRequestHandler expects to get bytes, so we can't decode the sent
data.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Use BytesIO instead of StringIO
BaseHTTPRequestHandler expects bytes, not strings.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* test: HTTPPluginTestCase: Rewind wfile to 0 before reading the response
Otherwise the read pointer is at the end of the file.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* Aka: Add basic web UI tests
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
* use string.capwords() - not .title(). closes#1366
* add test case for "@format title" that checks handling apostrophes
* `assertResponse` evidently needs the relevant subcommand
Fixes#1350. This works around an edge case in charybdis / ircd-seven where remote
whois requests to a UID are not accepted if it is given in a different case.
Which means there may be a command/update thread running and returning after assertNoResponse returns.
In particular, that's an issue when assertNoResponse is called right before
setting feedparser._open_resource, because the running thread might still
be holding the lock but have fetched the new version already, so the
thread announces the new feed elements earlier than expected.
Otherwise, if it's provided and the network doesn't exist (or the bot isn't
currently connected to it), it's interpreted as being a quit message and
disconnects from the current network.
Hopefully this will ease debugging - e.g. a bad TLS certificate will now show
"Error: Couldn't get RSS feed. Parser error: <urlopen error
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:720)>"
instead of only a generic message.
- 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)
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.
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.
* 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
* Time: add 'ddate', fix contributors, add Time.local as a package_dir in setup.py
* Time: add in license information for ddate.py
* Time: change 'ddate' command to where it will error out gracefully if 'ddate.base' isn't available
* Time: add tests, remove Time.local from package_dir
As the command already calls reply() or noReply(), calling noReply()
there had disastrous effects:
* if reply() was called, noReply() erases the argument
* if noReply() was called, calling noReply() a second time erases **the next argument** (because the current argument was already erased).
This was 'caused' by the change of behavior of noReply() in 543edccd41.