Commit Graph

2622 Commits

Author SHA1 Message Date
Vgr E. Barry
30aaa2c802 Balance fix for exchanging dullahan 2018-04-25 23:15:17 -04:00
Ammon Smith
7d83dc4d8e Allow pipers to pass or change targets (#322)
Also adds some more info to revealroles. Some miscellaneous fixes included.
2018-04-25 23:08:39 -04:00
Vgr E. Barry
1d2ab6a2cc Update mystics and the get_special event to be more fine-grained 2018-04-25 22:48:48 -04:00
Vgr E. Barry
1a459eebf4 Add ability to delete items only if they exist from UserDict 2018-04-25 20:39:57 -04:00
Vgr E. Barry
8b4612847b Remove underscores from files 2018-04-25 19:45:40 -04:00
Ammon Smith
6d0d6f7169 Split time lord (#320)
Split time lord into src/roles/timelord.py
2018-04-25 19:44:24 -04:00
Ryan Schmidt
b86e52de25
Merge pull request #319 from lykoss/split-assassin
Split and convert assassin
2018-04-25 15:53:19 -07:00
Ryan Schmidt
154ee810cf
Merge pull request #321 from lykoss/frole_update
improve frole template handling, don't require underscores
2018-04-25 15:52:26 -07:00
skizzerz
670efe6645 Fix recording role stats 2018-04-25 17:53:10 -05:00
jacob1
ac2b83d36f remove unnecessary check requiring non-admins to be in the game 2018-04-24 22:14:35 -04:00
jacob1
c5036bceac improve frole template handling, don't require underscores 2018-04-24 21:58:10 -04:00
Vgr E. Barry
022da467ec Fix !gamestats display 2018-04-24 16:01:10 -04:00
Vgr E. Barry
a1f17b6d6a Make sure only actual role files are imported 2018-04-24 13:25:16 -04:00
Vgr E. Barry
ecd68d15bf Split and convert assassin 2018-04-24 13:24:38 -04:00
skizzerz
56f2bacd3a Amnesiac fixes and redo stop_game readout logic
- 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
2018-04-23 23:11:02 -05:00
Vgr E. Barry
1a446205ce Split and convert amnesiac 2018-04-23 20:27:00 -04:00
Vgr E. Barry
38721fd59b Convert and split seer, oracle and augur in three files with a shared helper 2018-04-23 15:15:09 -04:00
Em Barry
745a1dc68a
Convert chk_decision (#317)
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.
2018-04-23 13:25:38 -04:00
Em Barry
42424e49df Add support for CHGHOST (#318)
Add proper support for CHGHOST, and also get rid of some misguided assumptions in the hooks.
2018-04-18 11:16:01 -07:00
Ryan Schmidt
35f3fd67cc
Add investigate as alias for id for investigator 2018-04-17 19:39:53 -07:00
Vgr E. Barry
00291a9a85 Fix broken sleepy event 2018-04-17 19:36:28 -04:00
skizzerz
94cdfc0a55 Redo DISABLE_ACCOUNTS handling
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.
2018-04-13 17:09:42 -05:00
Vgr E. Barry
41094a2cbc Properly remove leftover files 2018-04-13 18:03:51 -04:00
Vgr E. Barry
ae4c342bd3 Revert service storing and properly fix /mode handling issue 2018-04-13 18:02:37 -04:00
Vgr E. Barry
33051ae617 Preemptively store services in a dummy channel for get() purposes 2018-04-13 17:31:47 -04:00
Vgr E. Barry
ef6758e14b Remove unused function (nick variant is still used in a few places) 2018-04-13 16:55:12 -04:00
Vgr E. Barry
7154a7d092 Move automatic mode syncing to hooks.py 2018-04-13 16:54:34 -04:00
Em Barry
28f26e181b Add the new User containers (#316)
- 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.
2018-04-13 13:37:04 -07:00
skizzerz
c121c0f08f Mudkip balance fix and bugfix
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.
2018-04-04 17:06:03 -05:00
Ryan Schmidt
8dc1cf4556
Merge pull request #315 from lykoss/convert-chk-win
Remove the cli argument from chk_win
2018-02-05 19:16:03 -07:00
Vgr E. Barry
a8790b439a Remove the cli argument from chk_win 2018-02-04 17:26:40 -05:00
Bradley Haljendi
a42da38e8e Do not ping players with unacked warnings
This fixes issue #255 by preventing unacked warnings from being pinged entirely (whether or not they would cause stasis).
2018-01-19 08:37:43 -07:00
skizzerz
965b230f64 Fix mudkip day timeouts breaking things if game ends during them 2018-01-11 11:08:57 -07:00
skizzerz
4a7dd390e5 Don't try to voice/devoice fakenicks
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.
2018-01-11 10:26:43 -07:00
skizzerz
0fa7664526 Voting fixes for mudkip and succubus
- 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
2018-01-11 10:02:05 -07:00
skizzerz
1989be5c8d Convert !quit to new command API 2018-01-10 15:26:20 -07:00
skizzerz
c9e1845fbb Convert get_reveal_role to use Users 2018-01-10 15:18:41 -07:00
skizzerz
7e7d4db1ae Downgrade from modern to intermediate compatibility
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.
2018-01-10 13:55:28 -07:00
skizzerz
5af0f4ae82 Fix !update 2018-01-10 13:42:01 -07:00
Em Barry
f7a2ad5cc7
Merge pull request #313 from lykoss/tls_validation
Support for TLS certificate verification and client certificates
2018-01-10 15:15:12 -05:00
skizzerz
f988293f42 rm extraneous nonlocals 2018-01-10 12:30:03 -07:00
Vgr E. Barry
270a356e76 Make a logging with error level meaningful 2018-01-10 14:14:49 -05:00
skizzerz
916d476ca5 Fix SASL support for ircds which don't advertise SASL types in CAP 2018-01-10 12:14:02 -07:00
skizzerz
9190a4c859 Rework TLS validation a bit and support SASL EXTERNAL
- 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.
2018-01-10 12:09:10 -07:00
Samuel Hoffman
532386a2b9 Support for TLS certificate verification and client certificates. (#301)
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.
2018-01-10 07:58:19 -07:00
Em Barry
a2be87b85a Convert succubus (#311)
Convert succubus to new API along with (un)related fixes.
2018-01-10 07:51:45 -07:00
jacob1
cac893fd14 record stats for "roles" gamemode 2018-01-09 23:20:38 -05:00
skizzerz
f4876d254e Convert some things to new command API+users
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.
2018-01-09 16:06:40 -07:00
skizzerz
6d401fd461 Don't try to add new users if we're changing usermodes on ourselves.
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.
2018-01-05 13:04:42 -07:00
Vgr E. Barry
08a81fbc09 Properly handle CAP LS lines with name=value items in them 2018-01-05 14:23:58 -05:00