Commit Graph

927 Commits

Author SHA1 Message Date
Vgr E. Barry
6460eb6804 Define methods in IRCClient instead of using a decorator
Mypy doesn't like it.
2016-08-13 12:33:20 -04:00
Vgr E. Barry
273db4b553 Move local import globally
This used to be needed since there used to be a circular import. Guess
it's gone now!
2016-08-13 12:09:19 -04:00
Vgr E. Barry
ecec9bf4a8 Nice things are not allowed
Also imports should go below the module docstring.
2016-08-13 11:39:41 -04:00
Vgr E. Barry
cdaae22b2f Tell mypy to not care about user-defined modules 2016-08-12 13:11:10 -04:00
skizzerz
f96d73a8af Make commands that only work while playing fail silently if the person isn't playing 2016-08-11 22:36:37 -05:00
nyuszika7h
3f5e3fce78 Add syntax highlighting to the pastebin error URLs 2016-08-11 20:31:19 +02:00
skizzerz
052a2b2823 fix crow 2016-08-10 23:17:27 -05:00
skizzerz
23f27b088a Split dullahan
Also fix the del_player event to be more sane, and fix some suicide bugs
in hunter/vigilante kills.
2016-08-10 18:06:37 -05:00
Vgr E.Barry
10dff4a73d Tweak some seer's event listener 2016-08-10 18:08:41 -04:00
nyuszika7h
3f3b5bf1d7 Use ptpb.pw as pastebin with vanity IDs 2016-08-10 23:43:14 +02:00
skizzerz
35ad6c2766 Fix error in !stats introduced by RESTRICT_WOLFCHAT modifications 2016-08-10 15:29:22 -05:00
skizzerz
67f698a701 Add vigilante 2016-08-10 13:16:17 -05:00
skizzerz
ac2f28e6ed Fix totem display glitch in maelstrom 2016-08-10 12:56:48 -05:00
skizzerz
4011707c10 Finish up RESTRICT_WOLFCHAT settings
All settings are now fully armed and operational.
2016-08-10 12:46:46 -05:00
skizzerz
b25f6186ec Fix hunter autocomplete
Also make debugging easier by exposing src
2016-08-10 10:58:08 -05:00
skizzerz
09d90fd7e2 Revert "Revert last 3 commits - broken code"
This reverts commit 5e91556426.
2016-08-10 10:40:47 -05:00
nyuszika7h
5e91556426 Revert last 3 commits - broken code 2016-08-10 16:29:46 +02:00
skizzerz
8e02e5933b Split hunter 2016-08-09 21:52:58 -05:00
skizzerz
97c0981e2a Split off wolf (WIP) 2016-08-09 17:10:56 -05:00
skizzerz
3855c54c35 Split villager/cultist 2016-08-09 12:44:30 -05:00
skizzerz
eb64f5dc45 Only check silence for role commands, and only after they have the right role 2016-08-09 12:44:30 -05:00
Vgr E.Barry
cd11ace8a2 Tweak reset listeners 2016-08-09 12:10:46 -04:00
nyuszika7h
6b90e52aef Add another gif 2016-08-09 11:30:59 +02:00
skizzerz
215bc7d241 Fix myrole issue 2016-08-08 21:45:43 -05:00
Ryan Schmidt
672c01ef96 flog ALL the errors 2016-08-08 18:44:10 -07:00
skizzerz
10f94de9b3 Initial work splitting off roles
For now, seer and wild child are done. There are some aspects of those
roles that are still incomplete, namely:
- sorcerer and alpha wolf handling of seer/oracle/augur is still in
  wolfgame.py instead of via events
- wild child does not modify !stats
2016-08-08 19:21:05 -05:00
skizzerz
957ab9a17a Begin work splitting roles into their own files 2016-08-08 18:42:40 -05:00
jacob1
f9c4ef6b28 don't allow users not in the channel to run commands 2016-08-08 18:48:23 -04:00
Ryan Schmidt
f8d953f8ab Don't reply on bad invites
DDoS vector
2016-08-08 15:29:31 -07:00
jacob1
05fbedd0e2 Fix sql syntax error when setting stasis 2016-08-06 12:39:25 -04:00
jacob1
75b386917e Fix var.CASEMAPPING error during db upgrade 2016-08-06 12:38:59 -04:00
nyuszika7h
fe9877f471 Restore OrderedDict hack, still needed in 3.3 2016-08-05 22:07:22 +02:00
Vgr E.Barry
f38735d5a1 Allow everyone dying in {rapid,drunk}fire to make them all win
I could have avoided the two-liner in src/wolfgame.py, but it's much
more cleaner that way, even if it's not in src/gamemodes.py

To have the code in src/gamemodes.py means we'd have duplicated code
(and thus increased the chance of random bugs, as well as maintenance
burden). And practicality beats purity.
2016-08-03 14:12:47 -04:00
Vgr E.Barry
b76b214374 Roll back the 3.2-compatibility hack with OrderedDict.keys 2016-08-03 14:10:27 -04:00
Vgr E.Barry
5b22bdd18a Prevent winners duplication in stop_game 2016-08-03 14:09:38 -04:00
Vgr E.Barry
5db2a5d0f2 Fix local variable name clashing with global function 2016-08-03 12:07:28 -04:00
Ryan Schmidt
cd3f9fc345 Add tempban sanction (#238)
Can be either time-based or points-based. Also, made fwarn a bit smarter
at guessing what the user actually wanted to do based on the parameters
given to it. Warnings now always require acknowledgement, because that
paves the way for a future commit only beginning stasis once a warning
is acknowledged.

Warnings also split off into their own file to declutter wolfgame.py a
bit (now only 9k lines, wooooo! >_>)

Does not play nice with eir, that functionality isn't going to be in the
bot itself but rather some custom code in lykos (hooking into privmsg).
2016-08-02 17:57:09 -04:00
nyuszika7h
c3698539c1 Revert "Don't show villagergame in !help game"
This reverts commit 7de19cd7a6.
2016-08-01 16:46:00 +02:00
nyuszika7h
cd13f8626d Fix turncoat side display bug 2016-08-01 16:45:07 +02:00
nyuszika7h
7de19cd7a6 Don't show villagergame in !help game 2016-07-31 11:29:55 +02:00
skizzerz
700ccc2629 Revert nobody wins to allow non-team wins to happen, fix messages 2016-07-28 18:22:22 -05:00
skizzerz
b8aef06ba7 Fix "nobody wins" to actually mean nobody wins
Before a winner of "" indicated abnormal game stop, so it wasn't logged;
add a new log parameter to account for those so we can free up "" for
games wherein nobody should win but the game should still be logged.
Also make the everyone dying condition use that.
2016-07-28 16:35:43 -05:00
Vgr E. Barry
616bcf624f Fix invalid name 2016-07-28 16:02:57 -04:00
skizzerz
f3eef86db5 Fix casing (again) 2016-07-28 11:36:36 -05:00
nyuszika7h
965e0481ec Remove redundant ALPHA_WOLF_NIGHTS definition for random
Alpha's target now turns immediately, this variable was not being used
by the code anymore.
2016-07-28 10:39:43 +02:00
skizzerz
598c994e43 Allow Iciloo to successfully !vote alpha 2016-07-27 23:22:14 -05:00
skizzerz
e95fb49a70 Really fix pre_restart_state for real for real (once more, with feeling) 2016-07-27 23:09:46 -05:00
skizzerz
3fcfa83c43 Really fix pre_restart_state (for real this time) 2016-07-27 23:07:29 -05:00
skizzerz
45930c3ffd <insert commit message here> 2016-07-27 23:05:14 -05:00
skizzerz
e6b6383b45 rejigger fdie too 2016-07-27 23:01:28 -05:00
Vgr E. Barry
ebaca56c92 Improve string formatting 2016-07-27 23:49:55 -04:00
Vgr E. Barry
0cd5c9dd7c Fix syntax error 2016-07-27 23:48:00 -04:00
skizzerz
218d01088d wat 2016-07-27 22:47:26 -05:00
skizzerz
e47a348f22 Remove old db calls 2016-07-27 22:45:43 -05:00
skizzerz
0c0268e1b7 Report overall winrate 2016-07-27 21:37:37 -05:00
skizzerz
1b7b2f6799 Make discrimination based on case ilegel
All hostmask and account comparisons are now case-insensitive (nicks
still aren't, related to #217 -- changing nick sensitivity would break
everything in numerous places).

Also, refactor some things into other files where it makes sense to do
so, because putting unrelated things into the same commit is fun.
2016-07-27 17:03:34 -05:00
skizzerz
862111be9e I'm the best at space 2016-07-27 11:45:45 -05:00
skizzerz
b5ae34804d Make 0 point warnings no-op 2016-07-27 11:42:22 -05:00
Ryan Schmidt
22aa7af5c6 Merge pull request #235 - Schema upgrade by skizzerz
Fix FK deferrable status, ensure that FKs are always enforced in the
bot, and redo how fool wins are stored/tracked. Drop unneded table.
2016-07-27 12:38:23 -04:00
nyuszika7h
0caaba9152 Make !refreshdb reply with "Done." 2016-07-26 23:26:39 +02:00
nyuszika7h
73f99b4ae4 Use separate warning for /quit than for /part 2016-07-26 22:32:57 +02:00
jacob1
dc1b1e7f6a add back DISABLED_GAMEMODES
can be used by bot operators to disable & hide a gamemode entirely
2016-07-25 00:06:38 -04:00
skizzerz
265a1cc442 Revert "Clearly indicate not enough players for game mode"
This reverts commit aedf39efce.
See comment in github on that commit for reasoning.
2016-07-22 21:45:15 -05:00
jacob1
89b38794e1 fix !swap, blame nyuszika7h
don't remove all the returns in the sanity checks
2016-07-22 20:36:20 -04:00
jacob1
bc8e7e6da1 fix !revealroles working during games 2016-07-22 20:26:37 -04:00
nyuszika7h
aedf39efce Clearly indicate not enough players for game mode 2016-07-22 23:58:26 +02:00
nyuszika7h
db519a6827 Notice players instead of silence when already voted game mode
This accidentally ended up partially being in an earlier commit, but now
here it is...
2016-07-22 10:36:44 +02:00
skizzerz
b556e74fd8 Revert "Fix use of chan where not defined"
This reverts commit 4301ba4c48.
2016-07-21 22:03:00 -05:00
skizzerz
e14c3f1d9c Make alpha bite turn target immediately
RIP long bitten messages, you shall be missed :(
2016-07-21 18:20:29 -05:00
skizzerz
07e3018d06 Fix 4301ba4 properly 2016-07-21 17:05:38 -05:00
nyuszika7h
4301ba4c48 Fix use of chan where not defined 2016-07-21 23:56:44 +02:00
nyuszika7h
7c7facdd7d Fix commit e04410e
I don't know when I wrote that code...
2016-07-21 23:22:46 +02:00
skizzerz
d45a54179b alpha wolf QoL adjustments
- alpha wolf can now both bite and kill during the same night
- any wolf death (instead of just one during day) is counted towards
  activating alpha wolf
- fix role message to be more in line with other wolfteam messages
2016-07-21 16:17:12 -05:00
nyuszika7h
bc9f27c6d5 Don't require -force for !fdie and !frestart in debug mode 2016-07-21 23:07:01 +02:00
nyuszika7h
e04410ecaa Ignore !notice in PM if called with arguments
This command is sometimes accidentally called in wolfchat by a message
starting with "notice". It doesn't take any arguments anyway.
2016-07-21 23:03:09 +02:00
nyuszika7h
b6d07a9707 Simplify code to use reply() where possible 2016-07-21 23:03:09 +02:00
skizzerz
81263bd822 Fix guardian winconds; now a game will always end with a team winning 2016-07-21 14:05:28 -05:00
nyuszika7h
d59f2ec4a8 Use reply() in !warn/!fwarn instead of hardcoding cli.notice() 2016-07-18 10:28:13 +02:00
Ryan Schmidt
dd05f5e6d8 make MS always skip over dead players in rapidfire 2016-07-16 23:29:32 -07:00
skizzerz
00bf10f6c0 Fix giving warnings to new players 2016-07-16 22:55:56 -05:00
skizzerz
d2dc4d2deb Remove care/kill color/bold/startspam settings 2016-07-16 22:48:18 -05:00
skizzerz
9d827b95be I hate python 2016-07-11 15:34:05 -05:00
nyuszika7h
e2469c342f Make !ping actually goat the user when they win a goat 2016-07-09 10:32:29 +02:00
Ryan Schmidt
8aede6d01d Let's go with NOT trying to be clever 2016-07-07 12:28:32 -07:00
Ryan Schmidt
f6f05db7cc Disable succubus in maelstrom 2016-07-06 14:14:49 -07:00
skizzerz
7a0c9b87e1 Expiration date fixes for fwarn
- Always use UTC (time issued was already UTC, but expiration was not)
- Remove some duplicate code about parsing expiration date
- Round dates to the nearest minute
2016-06-28 12:53:10 -05:00
nyuszika7h
f8ed5c7dbd Fix pluralization of warning points 2016-06-28 10:30:20 +02:00
skizzerz
137408d1f4 Allow # in front of warning numbers for warn view/ack 2016-06-26 12:42:59 -05:00
skizzerz
454afca1b3 Various fixes
- fflags no longer says things were modified on account "*" when they
  weren't
- don't give an autowarning on kick anymore; if an op is kicking chances
  are they'll be giving their own warning anyway
- attempt to make a backup copy of the database before migrating to new
  schema
2016-06-26 12:37:22 -05:00
nyuszika7h
e83e6caac3 Remove bureaucrat
Closes #220.
2016-06-23 22:20:33 +02:00
skizzerz
9009304db0 fix fwarn list 2016-06-22 00:08:01 -05:00
skizzerz
ef4e60bc37 Make fwarn +F instead of +A since it can be used to deny commands 2016-06-21 23:51:52 -05:00
skizzerz
c6bd24aea7 Fix fool wins and auto warning expirations 2016-06-21 23:10:19 -05:00
skizzerz
7980b13ba4 Add missing warning messages 2016-06-21 22:02:09 -05:00
skizzerz
79614a0719 Use thread-local storage to hold sqlite connection 2016-06-21 17:02:18 -05:00
Ryan Schmidt
c08cd3efbc Merge pull request #225 from lykoss/newdb
- new schema, including stats tracking
- fwarn/warn commands to view and manipulate warnings
- fstasis can now only decrease stasis, not add to it
- refreshdb command can sync bot game state with what is in the db
  (including expiring any unexpired stasis or warnings)
- stasis now expires
- tempban is still not implemented and will not be implemented as
  part of the PR (it will come later, if ever)
- sanctions can be automatically applied after warnings cross a
  certain threshold; some defaults are configured
- fflags/ftemplate for permissions revamp
2016-06-21 13:28:18 -07:00
skizzerz
79c70fdeb3 Adjust messages 2016-06-20 13:44:09 -05:00
skizzerz
16a0a28e36 Re-add botconfig.ADMINS and ADMINS_ACCOUNTS
Still considered legacy/backwards-compat code, so giving out +F flags
should be preferred, but now wildcard admins are possible again.
2016-06-14 17:05:05 -05:00
skizzerz
1bf468224e Update syntax descriptions 2016-06-14 16:47:13 -05:00
skizzerz
b39828be7f Remove !join
bug. Now it should actually work even if the user has no warnings.
Also don't list expired/deleted warnings as unacknowledged.
Warning expiration can now be modified via !fwarn set, and the default
expiration is now 30d instead of never (never can be manually specified
along with a handful of aliases that mean the same thing).
2016-06-14 12:02:54 -05:00
skizzerz
2f62c4a867 Fix some embarassing typos 2016-06-13 16:40:57 -05:00
skizzerz
adea98e3ed Fix some derps
Need to move module init code after the functions it calls, also forgot
the sanction definitions for 11-14 points.
2016-06-12 23:03:47 -05:00
Vgr E. Barry
75447310f3 Tweak definition of is_fake_nick
Doesn't change much, just avoids compiling a regex pattern everytime,
and it only calls one function.
2016-06-12 14:37:33 -04:00
skizzerz
2151df4fef Add !fflags and !ftemplate
These allow for access control, and work pretty much exactly like they
do in atheme's ChanServ (the /cs flags and /cs template commands).

Also remove unused things from botconfig.py.example.
2016-06-07 17:02:12 -05:00
skizzerz
a6ea55a8fe Finish warning system
- fwarn/warn commands to view and manipulate warnings
- fstasis can now only decrease stasis, not add to it
- refreshdb command can sync bot game state with what is in the db
  (including expiring any unexpired stasis or warnings)
- stasis now expires
- tempban is still not implemented and will not be implemented as
  part of the PR (it will come later, if ever)
- sanctions can be automatically applied after warnings cross a
  certain threshold; some defaults are configured
2016-06-07 14:17:21 -05:00
skizzerz
bba5ab745e Make bot run and fwarn partially work 2016-06-06 18:59:28 -05:00
skizzerz
2d2ce6483a Initial work on new schema and warning system
Still very WIP and not completed, bot likely doesn't even run.
2016-06-06 14:35:58 -05:00
nyuszika7h
9ea9a1a317 Fix modelines in other files 2016-05-11 16:09:19 +02:00
Ryan Schmidt
6c166d4fb0 meow
Add !cat command, a la !coin and !pony. Because we really needed another
one and because kitties are adorable.
2016-05-10 16:17:45 -07:00
Ryan Schmidt
fe451962cd Fix spurious error when ending night as shaman and dying.
An artifact of how we run commands means that we try to run the rest of
the "give" command handlers even after the first (shaman) one ended night.
As such, check the phase and if it's different, stop trying to execute
command handlers.

This has a small race condition where the error this fixes can happen
anyway, but since it's purely a visual error I think that's fine. Better
than happening all of the time, at least.
2016-05-10 15:37:57 -07:00
nyuszika7h
accd75cfaf Changed winner = "none" to "no_team_wins" 2016-05-01 20:43:48 +02:00
Ryan Schmidt
6bc2d40a64 Use defaultdict for event callback lists 2016-05-01 10:51:17 -07:00
nyuszika7h
108fe19278 Skip quit safeguard for Ctrl-C in console 2016-04-30 22:42:12 +02:00
nyuszika7h
1f0a1e1303 Add a safeguard to !fdie and !frestart when a game is running 2016-04-19 16:16:59 +02:00
nyuszika7h
4ecfead19e !stasis: Use reply() 2016-04-19 15:50:51 +02:00
nyuszika7h
dfb23a1892 reply(): Add prefix_nick option
This will prefix the nickname of the user if the bot replies in-channel.
2016-04-19 15:49:54 +02:00
nyuszika7h
44ca368724 Add !stasis command to view amount of stasis you have without joining 2016-04-19 13:54:57 +02:00
Vgr E. Barry
a65b371111 Blacklist wild child from maelstrom 2016-04-18 22:50:35 -04:00
nyuszika7h
29d2a1f83e Add an option for the pony to land on the tosser 2016-04-16 15:34:06 +02:00
Ryan Schmidt
f564a7a01e Don't rename functions, ever. 2016-04-11 12:44:30 -07:00
nyuszika7h
7fa7f8564f Pony tweaks 2016-04-10 22:10:47 +02:00
Vgr E. Barry
7fc0ab9f39 Fix missing message
Also remove some useless parens
2016-04-10 12:14:49 -04:00
Vgr E. Barry
952081d300 Make oracle not see through wild child's disguise 2016-04-09 17:11:07 -04:00
Vgr E. Barry
f8e1d96994 Make !myrole tell the wild child who their idol is 2016-04-09 17:05:02 -04:00
Vgr E. Barry
7b2cc43a50 Run, Forrest, Run! 2016-04-09 16:57:11 -04:00
Vgr E. Barry
4d03ed03cf Spread out "give" to the commands 2016-04-09 14:08:02 -04:00
Vgr E. Barry
e8aff5d0c3 Small change to allow stacking of cmd decorators 2016-04-09 14:07:39 -04:00
Ryan Schmidt
d9b5c0fd55 Don't add extra cursed to villagergame 2016-04-08 14:53:29 -07:00
Bryce Roesner
71ff8c34e8 Notify players in deadchat when the game ends 2016-04-07 20:50:56 +02:00
jacob1
4d480e32c6 ensure player is added to var.PLAYERS upon midgame join in maelstrom
fixes wolfchat / !simple / maybe other stuff
2016-04-06 22:55:07 -04:00
nyuszika7h
1aa18af5cb Tell players to use !join if they try to !start when no game is running 2016-04-06 18:31:44 +02:00
Ryan Schmidt
949fe168bf Fix villagergame to actually make nobody win if they fail 2016-04-06 09:24:55 -07:00
Ryan Schmidt
63e6c7eab5 Kill var.WOLF_GUNNERS with fire
Wolf gunners are now added to var.GUNNERS. To facilitate !revealroles,
they are also automatically given the gunner template if they were not
already a gunner or sharpshooter (otherwise their bullet count was not
listed in !revealroles, although night role messages and !myrole worked
just fine).
2016-04-05 22:40:37 -07:00
Ryan Schmidt
2973decce8 aleatoire balance tweaks
12p aleatoire was too heavily skewed towards wolves, while 14+ was heavily
skewed towards village. The following changes hope to rectify this
(although there probably isn't enough for 14+ to be fixed yet).

- Guardian Angel moved from 13p to 12p
- 2nd Assassin moved from 12p to 13p
- Bureaucrat removed
- Turncoat replaces Lycan at 14p
2016-04-05 22:03:00 -07:00
io
4e41dfe47a Add CTCP VERSION support 2016-04-04 16:18:04 -07:00
jacob1
5108822594 use var.GAME_PLASES for reply() in utilities.py 2016-04-03 22:47:28 -04:00
jacob1
db43486fa8 make sure admins always prints to alternate channels even when a game is running 2016-04-03 22:26:53 -04:00
skizzerz
4f1d9d8920 One slipped through 2016-04-01 10:40:12 -05:00
skizzerz
b369a0d4b3 Nothing to see here, move along. 2016-03-31 23:46:43 -05:00
Ryan Schmidt
c32b9031d3 Make use of botconfig vars for chanserv
Missed these the first time around...
2016-02-26 14:49:55 -07:00
nyuszika7h
602c99a6ff Detect op status on joining empty channel 2016-02-26 22:39:28 +01:00
Ryan Schmidt
73030424cd Blacklist monster and demoniac in maelstrom 2016-02-25 15:13:57 -07:00
skizzerz
8a49977318 Derp 2016-02-19 16:41:40 -06:00
skizzerz
6fff851350 Add event framework to allow for injecting phases 2016-02-19 15:54:02 -06:00
skizzerz
f0663d7aa4 Add var.GAME_PHASES to track when a game is in progress instead of hardcoding night/day 2016-02-19 15:04:26 -06:00
Ryan Schmidt
997b2c3c89 Default balance fix
12p default is horribly skewed towards wolves (11 and 13 are pretty well balanced though), move det from 13p to 12p to combat this
2016-02-17 16:25:44 -07:00
Vgr E. Barry
05bab1d83f Fix ALL THE THINGS 2016-02-11 13:55:25 -05:00
Vgr E. Barry
fb3e7eb8b6 woof 2016-02-11 13:26:23 -05:00
Vgr E. Barry
beb5ffd54c derp 2016-02-11 13:26:15 -05:00
Vgr E. Barry
edb9df50ea Fix error when lynching person with revealing totem 2016-02-11 12:00:04 -05:00
Vgr E. Barry
4a969f729a Fix nicks not being tracked in join phase 2016-02-09 15:25:11 -05:00
Vgr E. Barry
a10f6052a6 Track players nicks after death
Prevents horrible breakage in maelstrom
2016-02-09 12:16:29 -05:00
skizzerz
610874c5a1 Fix chained deaths on lynch and also prophet 2016-02-08 17:37:48 -06:00
skizzerz
c4cfbfca83 Prophet QOL improvements
- Redo prophet messages so that they don't split into multiple lines
- If prophet never reveals, don't bother making them pray twice
- Split prophet messages into different messages based on reveal setting
  instead of putting it together piecemeal -- this allows for easier
  customization/translation down the road.
2016-02-08 09:40:49 -06:00
nyuszika7h
00e976d1e0 Notify players in PM if they part the channel during a game 2016-02-08 08:47:01 +01:00
skizzerz
fc815c1549 Fix midgame role attribution in maelstrom 2016-02-05 21:53:29 -06:00
skizzerz
48b5db2d9c Maelstrom fixes
- Don't allow dead players to re-join
- Don't end game via a midgame join (e.g. ensure that numbers are good
  after the join)
2016-02-03 23:11:58 -06:00
skizzerz
805ee7e18a Fix mm being able to be assigned n2+ in mael 2016-02-03 22:10:38 -06:00
skizzerz
dbad8d1f09 Part 2 of 2
And as thus we sat in darkness,
Each one busy in his prayers,
“We are lost!” the captain shouted,
As he staggered down the stairs.

But his little daughter whispered,
As she took his icy hand,
“Isn’t God upon the ocean,
Just the same as on the land?”

Then we kissed the little maiden,
And we spoke in better cheer;
And we anchored safe in harbor
When the morn was shining clear.
2016-02-03 22:04:29 -06:00
skizzerz
69f72499ef Make frole only work during game 2016-02-03 20:30:15 -06:00
skizzerz
abc90530d8 Partial revert of 56827a2, rm unneeded (and horrific) code 2016-02-01 21:05:01 -06:00
jacob1
32db6b131d allow using !gstats in alternate channels while a game is going on elsewhere 2016-02-01 20:54:47 -05:00
jacob1
56827a2ce2 lycan balance adjustments
lycan#2 moved down from 10 to 9p
wolf#2 swapped for wolf shaman
GA swapped for bodyguard
2016-02-01 20:54:15 -05:00
skizzerz
6738acc82c Add disabled-by-default start spam killer
Like the color/bold killers, this can be configured to kick people if
they spam !start while it is being ratelimited for them.
2016-02-01 17:32:02 -06:00
skizzerz
f3a7be45d4 Relay wolf shaman and do prefix hiding in wolfchat
Commands starting with ! will no longer be relayed regardless of if one
is in wolfchat or deadchat. All wolf roles that issue commands now have
their commands properly relayed, so hiding commands this way isn't
really any issue.
2016-02-01 10:33:43 -06:00
skizzerz
344b7b108b Don't time out night if dullahan can't do anything 2016-01-29 13:48:21 -06:00
skizzerz
587b03a970 Fix lingering entries in var.ORIGINAL_ROLES due to roleswaps in maelstrom 2016-01-27 21:45:19 -06:00
skizzerz
29e5873104 Don't show original roles in maelstrom in listings 2016-01-27 21:31:32 -06:00
skizzerz
3f9bf7468b Fix clone taking on the role of someone when they're also dying
This only happens for simultaneous deaths (e.g. night deaths), as
chained deaths are resolved in a fashion that makes it impossible for
the clone to know he is also dying until after he inherits the new role.

Closes #214
2016-01-27 21:15:20 -06:00
skizzerz
16a8a86e4a Persist templates in maelstrom 2016-01-14 17:46:50 -06:00
skizzerz
b29701782f Maelstrom fixes
- Correctly assign random roles upon game start
- Let people know if they're villager/cultist or whatever even on nights
  2 and beyond
2016-01-14 01:08:49 -06:00
jacob1
7de3fbb324 ok, I actually tested the fix this time (fix maelstrom) 2016-01-13 23:50:02 -05:00
jacob1
6bbd4b0ae1 Fix error with maelstrom game mode
Tested about as much as woffle apparently tested originally
2016-01-13 23:44:09 -05:00
skizzerz
6e22cd860c Part 1 of 2
We were crowded in the cabin;
Not a soul would dare to sleep:
It was midnight on the waters,
And a storm was on the deep.

’Tis a fearful thing in winter
To be shattered by the blast,
And to hear the rattling trumpet
Thunder, “Cut away the mast!”

So we shuddered there in silence,
For the stoutest held his breath,
While the hungry sea was roaring,
And the breakers threatened death.
2016-01-13 22:07:51 -06:00
skizzerz
9d8f77c1e1 Fix stasis messages (both display for adding stasis as well as internal message keys) 2016-01-11 22:56:04 -06:00
skizzerz
281beda634 Fix wonky message ordering if a lynch is forced 2016-01-11 19:14:42 -06:00
jacob1
9f64b13489 fix crash when trying to !swap to someone not in var.USERS (fake nicks in debug mode) 2016-01-02 01:21:45 -05:00
jacob1
9ef0696da8 fix minor issues preventing pull request #184 from being merged, closes #184 2016-01-02 01:16:34 -05:00
William Maduno | Diitto
f552a6e86e Fixes #184 (!swap, when targeting someone, should be case insensitive) 2016-01-02 01:10:02 -05:00
jacob1
00ddf27e23 fix crash when trying to fstart 4/5p random games, fixes #181 2016-01-02 00:51:51 -05:00
jacob1
cd8a3de8b3 fix being unable to join fake players in debug mode
It said they were in stasis for -1 games ... This change should only affect fake nicks, since if the user isn't in var.USERS they can't join anyway
2016-01-02 00:25:19 -05:00
jacob1
356368d7bb fix idle players not having loss logged in stats (they aren't in var.DCED_PLAYERS) 2016-01-02 00:11:15 -05:00
Ryan Schmidt
0250f59fed Fix deceit totems not canceling out properly for seer
If both seer and target have deceit totem, the result should be printed normally (e.g. the totems cancel out). They were not doing that previously, as it would route all non-village non-wolf roles into villager (e.g. harlot -> villager). Let's fix that.
2015-12-31 15:36:40 -07:00
Ryan Schmidt
48547972e9 Make is_user_stasised return a truthy value if the user is not found
This ensures that code paths that should not be run if the user is stasised are not run if we don't know the user's status. Generally we don't know the user's status because they are not in the main channel, and therefore allowing them to effectively bypass stasis by not being around is a bad thing. We return -1 to differentiate between actual stasis, and because -1 is still True when cast to boolean. This may have the effect of giving some very odd-looking error messages but that's a very minor issue.
2015-12-31 15:06:19 -07:00
Ryan Schmidt
8a71c839a9 Increase night timer for valentines 2015-12-29 14:01:09 -07:00
skizzerz
8845dd8d7c Revert "Fix issue with !quit at the beginning of the game"
This reverts commit b342c6c53e.
2015-12-27 22:53:49 -06:00
Vgr E. Barry
b342c6c53e Fix issue with !quit at the beginning of the game 2015-12-27 23:23:40 -05:00
Ryan Schmidt
57e5aec9cd Increase quit grace time to 60s
Rejoining an IRC server after quitting can take a bunch of time for slow connections or if a lot of channels are to be joined. Additionally, quits could be indicative of temporary internet issues, want to make sure we give sufficient time to reconnect in case of a DHCP lease expiring or whatnot.
2015-12-20 14:54:22 -07:00
Vgr E. Barry
a5c9541543 Make sure handle_error(im) is failproof 2015-12-13 10:32:58 -05:00
jacob1
06cea36c97 fix typo causing error when you abstain after previously abstaining another day 2015-12-06 15:35:40 -05:00
Ryan Schmidt
81da5cb789 Merge pull request #202 from lutoma/hide-deadchat-commands
Hide commands in deadchat
2015-12-04 07:09:21 -07:00
Lukas Martini
2ef78a9783 Hide commands in deadchat 2015-12-04 08:33:44 +01:00
Lukas Martini
b8b61a0c8d Only allow retracting start votes in the main channel 2015-12-04 04:22:18 +01:00
Vgr E. Barry
548d212435 Fix 'random' not keeping template ordering 2015-12-02 08:38:08 -05:00
nyuszika7h
c6a5cea715 Log connection, end of MOTD and joining channels in normal mode 2015-11-27 17:37:04 +01:00
jacob1
d72eadf34f fix players not becoming unentranced if succubus dying ends game 2015-11-25 18:59:16 -05:00
Ryan Schmidt
99c8845118 Merge pull request #198 from lykoss/wolf-shaman
Add the new wolf shaman
2015-11-23 17:47:17 -07:00
Vgr E. Barry
c47a84d058 Add the wolf shaman role 2015-11-23 19:36:02 -05:00
skizzerz
32d91ec3a4 Enable team stats for random (sometimes) 2015-11-23 18:27:08 -06:00
skizzerz
747249991e Add botconfig.OWNERS_ONLY_COMMANDS to further restrict commands 2015-11-16 12:11:52 -07:00
jacob1
be4421dd59 fix fquit "not_playing" message 2015-11-16 10:56:23 -05:00
jacob1
cd44f2384f !frole: add to ORIGINAL_ROLES or FINAL_ROLES to fix end of game output 2015-11-16 10:51:43 -05:00
jacob1
3fd1360fed fix !stats for wolves in PM being out of order
should be in player join order, not randomly shuffled
2015-11-16 10:17:45 -05:00
skizzerz
debf9c78ff Horrible hacky error fix to make pm available in proxy/decorators 2015-11-15 18:42:20 -06:00
Vgr E. Barry
c24ae0bb8f Make deadchat preferences actually matter
derpidy derpidoo da
2015-11-15 19:24:59 -05:00
Vgr E. Barry
aa1af8dea8 Fix debug logging of totems. Closes #196 2015-11-15 19:24:33 -05:00
Emanuel Barry
837cf49c44 Merge pull request #191 from lykoss/proxy
Introduce proxies as a means of breaking circular import chains
2015-11-15 18:08:06 -05:00
skizzerz
8a36dd8442 Fix docstring 2015-11-15 17:06:46 -06:00
skizzerz
737f4e6184 Fix werecrow observe not working in some instances 2015-11-15 16:56:32 -06:00
skizzerz
a26f912f6e Wrap the impl side of implementations in handle_error unconditionally as well 2015-11-15 13:51:46 -06:00
skizzerz
6f83a909df Introduce proxies as a means of breaking circular import chains 2015-11-15 13:12:22 -06:00
skizzerz
4750981b4b Don't fire retribution against self 2015-11-14 23:58:01 -06:00
skizzerz
26f798456e Expand werecrow observe list
Now observes every role that acts at night as "not in bed" EXCEPT:
- matchmaker
- assassin
- clone
- turncoat

matchmaker and clone are night 1-only, and allowing them to be observed
would only serve to reduce werecrow power. assassin and turncoat's night
actions are passive and not anything that would require staying up late
at night or moving around at night for.

In the event that a luck or misdirection totem is applied, wolf-aligned
roles are now also observable as not in bed should they act. This will
also apply if RESTRICT_WOLFCHAT is used to take those roles out of
wolfchat.
2015-11-14 23:45:23 -06:00
skizzerz
d386b76d48 Don't allow spectating deadchat if one is already in it 2015-11-14 23:08:51 -06:00
jacob1
80e5c72b3d decrease 'mad' likelihood from 8 to 4 (not very popular, even though balanced :P) 2015-11-14 23:05:47 -05:00
jacob1
87e387df5f fix error when changing nicks in join phase 2015-11-14 22:58:04 -05:00
skizzerz
d3676948c3 Add !fspectate command
Admin-only command (can be !fallowed) to spectate deadchat or wolfchat.
The person spectating is not revealed to anyone in the chat, however
they can see everyone in that chat.

If used outside of debug mode, it is restricted a la !revealroles where
it cannot be used by an alive player or an active vengeful ghost.
2015-11-14 21:04:43 -06:00
skizzerz
b351cd496f Enhance succubus win message 2015-11-14 19:22:42 -06:00
Lane Farrow
b121d3a2c4 Fix voicing on rejoin at night when devoice during night is enabled 2015-11-13 21:52:34 -06:00
Vgr E. Barry
37ce9ad17c Actually fix ping replies 2015-11-13 14:55:31 -05:00
nyuszika7h
2cf3bfe811 Remove useless DISABLE_DEBUG_MODE option
There is no point in this whatsoever; admins can do !frestart debugmode
but that cannot lead to privilege escalation as !eval and !exec are
owner-only and !fallow won't work on them either.
2015-11-13 20:19:51 +01:00
skizzerz
e54630e902 Don't count night phase towards idle timeouts if DEVOICE_DURING_NIGHT = True 2015-11-12 21:39:41 -06:00
Vgr E. Barry
256d4ae39f Fix !ping randomly erroring out
Blame @laneatomic
2015-11-12 08:39:29 -05:00
jacob1
c072991a71 fix !fwait -1 grammar 2015-11-11 23:41:45 -05:00
jacob1
7184a02d54 use reply() in !wiki 2015-11-11 23:15:16 -05:00
jacob1
a2cd0d15e2 Reapply 217c8ffc8e
Somehow got wiped in a recent push.
2015-11-11 21:30:14 -06:00
skizzerz
e6c36830c4 Fix formatting issues and fgame 2015-11-11 13:10:23 -06:00
Lane Farrow
a4e21aa997 move irc messages to json and allow overriding in custom file 2015-11-10 19:58:50 -06:00
Vgr E. Barry
346af23a5d Fix shooting succubus 2015-11-09 16:43:09 -05:00
Vgr E. Barry
4e7b8ec6bb Fix issue with Python 3.2 2015-11-07 22:22:09 -05:00
jacob1
217c8ffc8e fix player who died last in the previous game being automatically joined to the deadchat the next game 2015-11-06 12:08:03 -05:00
nyuszika7h
6aedc39352 Add some missing periods 2015-11-06 15:23:16 +01:00
nyuszika7h
7d6fab1f01 Refactor calls to reply() to explicitly use 'private' keyword argument 2015-11-06 15:17:28 +01:00
skizzerz
8c4956469e Rejigger vigilante valid targets to make it more clear what does/does not apply 2015-11-05 20:17:40 -06:00
jacob1
aee627b3e2 fix fquit not working in PM (to fquit someone from deadchat) 2015-11-05 21:14:52 -05:00
jacob1
9b3768522b reduce sleepy likelihood to 5
we agreed not to reduce it to 0, 5 works well
2015-11-04 22:51:11 -05:00
jacob1
dd45c3ebc0 Revert "force non-!simple for the new roles"
This reverts commit 202dcd33cb.
2015-11-04 22:51:11 -05:00
skizzerz
fdd42a927b meow 2015-11-04 19:19:57 -06:00
Vgr E. Barry
4ebb3f7e9f Fix errors when changing nicks in sleepy 2015-11-04 18:10:10 -05:00
Vgr E. Barry
bb8041e0fd Fixed some protected functions not working 2015-11-04 14:19:02 -05:00
Vgr E. Barry
8c0582477e Some tweaks to the error handler 2015-11-04 13:16:35 -05:00
Vgr E. Barry
b28d4bf6e3 Properly fix the error handler 2015-11-04 12:41:47 -05:00
jacob1
154589a748 make "stats type changed" message use botconfig.CMD_CHAR, to avoid actually running !stats on other bots 2015-11-04 12:31:54 -05:00
jacob1
e3c5897f6f add !deadchat help text, and change "chat" to "deadchat" because it confused people 2015-11-04 12:26:29 -05:00
jacob1
818773113b auto complete role names in pstats 2015-11-04 12:19:56 -05:00
jacob1
fb18a6bce8 add function to vote for a game mode called by !game and !join, fixes some issues with !join game mode voting 2015-11-04 12:10:49 -05:00
jacob1
8c73e64b49 fix being able to quit games in PM (must be run in channel) 2015-11-04 11:55:30 -05:00
jacob1
c350603ea0 add reply() command, cleans up some logic with deciding where to send messages
This also easily fixes the bug where commands in alternate channels would be sent to a /notice
2015-11-04 00:07:35 -05:00
skizzerz
44d1173c20 Make !fquit act like !quit
Notably, this will cause the nick to be consdered "dced" so they do not
receive a win, and it applies stasis just as !quit would (preventing the
nick from joining deadchat, among other uses for stasis).

Fixes #183
2015-11-02 21:38:58 -06:00
skizzerz
d67ab56a45 Rework dullahan death
Instead of treating dullahan as if they have a permanent retribution and
desperation totem, they now instead kill a random target in their list
should they die. If all of their targets are dead, nothing special
happens when they die.
2015-11-02 21:26:20 -06:00