- Account for revealing totem + amnesiac in experimental !stats properly
- Fix amnesiac blacklist checks to be consistent with each other
- Remove non-events from villager.py -- these always ran before or after
all other events, so there was no point in them being events in the
first place
- stop_game now follows the mainroles/allroles pattern instead of
roles/templates pattern. This also modifies the data stored in db
stats, and fixes readouts for cases where we do goofy stuff with
secondary roles
Convert chk_decision, chk_nightdone, transition_day, transition_night, doomsayer, mayor, and convert+split shamans in three files with a shared helper. Fixes and updates for the User containers, and some other tweaks and fixes.
Only check it where absolutely necessary, and ensure in User that we
don't set accounts if we don't support them. This lets us ensure that
account is always None when account support is disabled, which means
that the existing None checks handle that without additional conditions.
- Add the new User containers for easier handling of users throughout the codebase
- Remove the swap_player event (replaced by User.swap, made possible thanks to the containers)
- Remove the cli argument from several events
- Remove !frole (a replacement will follow)
- Remove the ALLOWED_NORMAL_MODE_COMMANDS config option
Plus a couple of small fixes here and there.
Fix balance in mudkip, it was skewed too much towards village winning.
Also, if day ended in mudkip and nobody was being voted, it would error.
Let's make that not error.
There were a few places where we still tried to do this.
Also get rid of the FEATURES checking for what voice corresponds to,
+v is defined to be the channel mode for voice per RFC so we can
safely hardcode it. A few places weren't changed over because it may
be better to expand those places to handle the other status modes as
well.
- Remove short-circuit in chk_decision event on day timeout. No idea why
I put that there to begin with...
- Don't make succubus remove voters from the list, rather just set their
weight to 0. This causes their vote to not count while still letting
stuff interact with the fact they voted succ (such as desperation totem)
- Ensure that mudkip's vote change works on day timeout as well
Some ircds (*cough*freenode*cough*) don't support any of the modern ciphersuites.
The default should therefore be useful to connect to such outdated ircds.
- Move the config comments to botconfig.py.example where they will be more useful,
and move the bits in settings.py near the other IRC-related settings.
- Removed support for hash types that aren't SHA-256 as we perform all the hashing on
our end (doesn't matter what the server does or does not support), and this greatly
simplifies the code while leaving things secure enough.
- Hardcode a default cipher suite according to mozilla modern standards, as the
builtin ciphersuite in python may be less secure for older python versions.
- Add support for EXTERNAL auth in SASL, if a client certificate is provided. If this
fails, it will fall back to PLAIN auth (to account for the case where a cert is added
to the bot, but has not yet been added to NickServ, so that the bot can connect and add
it to NickServ via !fsend)
- Redact passwords from console/log output so that asking people to pastebin their
--verbose output when reporting issues in #lykos is less fraught with peril.
If a TLS certificate fingerprint is provided, the client will check it against the SHA256 hex digest of the server's certificate. Different hash algorithms can be specified, and multiple fingerprints can be specified for networks with more than one server.
MessageDispatcher, sleepy mode, warnings, and the latency command,
to be exact. Sleepy also benefits from some code deduplication in
addition to now operating on users.
The warnings code could use a more comprehensive overhaul too, but
that's going to be harder to achieve.
The actor in this case will either be ourself (in which case users.Bot
already exists), or a services nick (which may not have a full hostmask,
and therefore cause hashing errors). Only try to add a user if we're
changing a channel mode. This may still break on chanmodes, needs more
testing in that regard.