Commit Graph

636 Commits

Author SHA1 Message Date
jacob1
15fab6c0b7 possibly prevent error if bot is opped before WHO results come back 2014-12-19 12:24:21 -05:00
jacob1
a6a87c2dde add villager and cultist to the amnesiac blacklist 2014-12-19 10:29:07 -05:00
jacob1
6a09f77a85 fix for recent gstats commit 2014-12-18 22:42:05 -05:00
jacob1
4573242f78 !roles uses var.role_order also (useful with !roles #) 2014-12-18 22:37:10 -05:00
jacob1
93cd95cfef fix !goat (also wasn't fully fixed) 2014-12-18 20:37:10 -05:00
jacob1
3a7c7f777b fix !faftergame frestart
was calling the pmcmd version with the arguments inside chan instead of *rest
2014-12-18 18:18:57 -05:00
jacob1
61e41a5776 fix gstats error when using 8p instead of just 8 2014-12-18 18:18:57 -05:00
jacob1
1a4ad90dd2 don't show "was x" for templates (thought I did this already) 2014-12-18 18:18:57 -05:00
jacob1
92a7697584 order !pstats and !stats using var.role_order() 2014-12-18 13:26:20 -05:00
jacob1
7d2d65f80d fix player count not appearing when quitting in join phase 2014-12-18 00:03:36 -05:00
jacob1
e9944f06eb stop_game errors don't prevent !frestart and !fdie from working 2014-12-17 23:44:32 -05:00
jacob1
5736f3d758 fix error if mad scientist-assassin targets one of their own kills 2014-12-17 23:18:27 -05:00
skizzerz
6911ce2ac7 Revert "amnesiac can't turn into default role"
They most certainly can, changing this is a gameplay change and is not
the proper place for this anyway.

This reverts commit 43676344a8.
2014-12-17 21:40:32 -06:00
jacob1
43676344a8 amnesiac can't turn into default role
It seems I wasn't a villager, I was actually a villager all along
2014-12-17 22:37:13 -05:00
jacob1
4bced1cf2a ping villagers in end of game list + some bugfixes 2014-12-17 21:49:39 -05:00
Ryan Schmidt
44a10b206e Merge pull request #97 from lykoss/nickcomplete
new complete_match/get_victim functions to clean up code for role commands
2014-12-17 20:29:45 -06:00
Ryan Schmidt
a960696e6e Merge pull request #95 from kernelpanic3/dyn-quit
Dynamic quit messages, take 2
2014-12-17 20:27:38 -06:00
jacob1
0a48c3ced4 end of game role list shows role swaps / is ordered mostly alphabetically
TODO: also order !stats, !pstats, others; and maybe show villagers in end of game list
2014-12-17 18:12:13 -05:00
Ominous
8eb1138a4b Remove unnecessary function calls, add DYNQUIT_DURING_GAME check for noreveal per woffle 2014-12-17 14:35:32 -05:00
jacob1
898893f72c fix killing cultist/minion, !goat, and other minor bugs 2014-12-16 22:14:18 -05:00
skizzerz
a7928399a7 Fix hunter and vengeful ghost being unable to kill a visiting harlot 2014-12-14 23:53:27 -06:00
skizzerz
baa3831ce7 Fix bot's handling of WHO replies on connect:
Some IRCds always output the servername on a WHOX query even if it
wasn't asked for. Let's ask for it now and just ignore the response. The
order of parameters in WHOX is now in the order they are returned, to
make life easier.

Also tidy up the generator a tad; if we aren't using things we're
computing then there's no need to compute it at all :)
2014-12-14 23:48:24 -06:00
Ominous
5c57c62be3 Make dynquit during game configurable, per woffle 2014-12-14 23:34:15 -05:00
jacob1
be250fabe2 !roles/!gamestats accept partial names, new complete_match/get_victim functions to clean up code for role commands 2014-12-14 17:06:22 -05:00
jacob1
bc60357ae5 !roles/!gamestats accept partial names, new complete_match/get_victim functions to clean up code for role commands (reverted from commit c1a937f763) 2014-12-14 16:30:25 -05:00
jacob1
c1a937f763 !roles/!gamestats accept partial names, new complete_match/get_victim functions to clean up code for role commands 2014-12-14 16:23:52 -05:00
nyuszika7h
c4fb449a77 Reintroduce !mystats
It's useful for things like "!m wolf", and it's easier to do this than
hacking !pstats to support "!p wolf", which could be ambiguous if
there's a player with an account name of "wolf".
2014-12-14 15:14:28 +01:00
jacob1
60cd1ee06c allow gstats and pstats in pm during games 2014-12-14 01:30:07 -05:00
Ominous
3294c01b49 Avert convention rot per woffle 2014-12-13 19:27:09 -05:00
skizzerz
970e55e828 Fix instance where harlot A would not die if harlot A is visiting harlot B, harlot B is visiting someone, and wolves attack harlot B 2014-12-13 17:19:25 -06:00
Vgr E.Barry
3aa54cf565 Add an automatic mode toggling. 2014-12-13 14:23:56 -05:00
skizzerz
7d3a7cd140 Fix fjoining fake nicks 2014-12-13 11:30:06 -06:00
Janik Kleinhoff
5789be967e ping: more useful behaviour when noone can be pinged 2014-12-12 18:53:50 +00:00
Vgr E.Barry
17c59fd277 Fix a few random issues with previous commit. 2014-12-09 21:40:25 -05:00
Vgr E.Barry
6a2eec608a Huge overhaul to the system to use accounts. 2014-12-09 19:44:06 -05:00
Ominous
0f6ee5c994 Distinction between a and an 2014-12-09 00:17:33 -05:00
kernelpanic3
b8361ab6bc Dynamic, random quit messages 2014-12-08 23:22:32 -05:00
Janik Kleinhoff
1d06b68d24 Move database/persistence initialization into a function
This allows us to postpone init_db(). One advantage of this is that
specifying AWAY in botconfig.py won't overwrite the away list from the
DB anymore, but properly get added to (as would be expected).
2014-12-08 14:02:09 +00:00
Janik Kleinhoff
45e59ea647 fquit: say "No more players remaining" at 0 players 2014-12-08 12:36:58 +00:00
Vgr E.Barry
f43dba4a3f Fix some specific PM commands not working. 2014-12-07 16:33:39 -05:00
Vgr E.Barry
a7fe73c355 Allow admins to invite the bot to any channel. 2014-12-07 11:01:06 -05:00
nyuszika7h
f5b9c3e612 Small refactor to log_cmd 2014-12-07 16:50:18 +01:00
nyuszika7h
7f668cbb2c Add a common logging function for fsend et al
This is just a basic logging function designed for logging (admin)
command calls. We'll have a better logging system eventually (ref:
lykoss/lykos#72).
2014-12-07 16:39:25 +01:00
jacob1
8ecef11482 fixes to lots of bugs with the bot being in an alternate channel 2014-12-06 22:33:42 -05:00
Ryan Schmidt
45f640e9c9 Fix impatient message showing up in places it shouldn't 2014-12-06 19:01:22 -06:00
Vgr E.Barry
3192052add Allow admins and owners tracking via account. 2014-12-06 15:43:34 -05:00
jacob1
1519ba3765 add var.GRAVEYARD_LOCK check in chk_win, add more checks for game ending in those 2014-12-06 14:03:31 -05:00
Ryan Schmidt
6aeb149241 Merge pull request #85 from skizzerz/fiximpatience
Impatience and pacifism totem improvements
2014-12-05 09:00:16 -06:00
nyuszika7h
a69a070c27 fpull: Show diffstat
It isn't shown by default with rebase, but it's pretty useful.
2014-12-05 11:33:48 +01:00
jacob1
fc53b905be Merge pull request #83 from lykoss/fix-cub-error
Fix KeyError in chk_win
2014-12-05 00:10:36 -05:00
jacob1
c9c5317ecf Merge pull request #82 from lykoss/refactor-fsay-fact
Refactor fsay and fact
2014-12-05 00:10:03 -05:00
skizzerz
5819976a1f Pacifism/Impatience totem improvements
- A message is now displayed whenever a pacifism or impatience totem is
  triggered, e.g. "X impatiently votes for Y." or "X meekly votes to not
  lynch anyone today." These are played immediately before the vote
  passes, so there is no opportunity for people to abandon course.
- Reinstate people with impatience totems being the ones that die to
  desperation totems. Due to the above message playing, it is now more
  obvious why they died, and I believe that doing it this way adds to
  gameplay ("I have a random totem and so does the person being voted. I
  should try to jump in early just in case I have impatience so I don't
  die."). If someone with impatience votes normally, their actual vote
  counts for determing vote order (so they aren't last unless they voted
  last). If there are multiple people with impatience that didn't vote,
  then the order in which they vote is random.
2014-12-04 22:45:11 -06:00
skizzerz
7b2ee4ecd5 Fix impatience totem interaction with abstaining:
- Moving code to chk_decision means that doing an actual !abstain
will still make you show up in !votes (unlike now where it does not)
- impatience and pacifism should balance each other out if they
are present in equal numbers, preventing an !abstain from working
if you have impatience does not yield that behavior
2014-12-04 21:57:30 -06:00
Vgr E.Barry
4ac967be1d Fix hunter passing ending night early. 2014-12-04 20:38:08 -05:00
nyuszika7h
f646844aad Fix KeyError in chk_win
This fixes the error with wolf cub that has been appearing for a while
now, and also prevents similar errors from happening with monster and
traitor in the same function.
2014-12-04 11:41:09 +01:00
nyuszika7h
0ab6ee52e6 Refactor fsay and fact 2014-12-04 11:21:03 +01:00
ChiyoOsaka
6e372566c6 Merge pull request #80 from lykoss/new-rolesets
<+jacob1> !moo , is someone going to press the Merge pull request button on https://github.com/lykoss/lykos/pull/80 eventually or do I have to :P

Rolesets are picked randomly + 4 new rolesets
2014-12-02 00:22:50 +00:00
jacob1
47f3b0e4d3 fix fool wins with lover setting, adjust lots of numbers 2014-11-30 17:27:27 -05:00
Janik Kleinhoff
2a07f2e5ec fstart: don't require the admin to be joined 2014-11-29 22:37:33 +00:00
jacob1
9e83ac941c increase likelihood of default-like rolesets, make rapid/drunkfire and amnesia only picked from a majority of the votes 2014-11-29 15:03:50 -05:00
jacob1
193ead22aa change "roleset" to "game mode" in the code / messages 2014-11-29 13:39:55 -05:00
jacob1
788707ffb1 partial matches work with !game/!fgame, also using !fgame on an invalid roleset will no longer reset it to default 2014-11-28 22:41:03 -05:00
skizzerz
3742dcea2a Various Bugfixes/QOL Improvements:
- Hag can no longer hex the same target two nights in a row
- Hag target is un-hexed if hag gets exchanged with someone
- GA now properly guards people whose names contain uppercase letters
- Make var.START_WITH_DAY mostly work, doesn't crash the bot anymore
  but still needs improvements, namely messaging everyone what role
  they are.
2014-11-28 21:26:12 -06:00
jacob1
0944b4a919 delete vote from var.ROLESET_VOTES when a player quits 2014-11-28 16:25:42 -05:00
jacob1
9da979c6e0 !game without args also prints valid rolesets 2014-11-28 16:25:42 -05:00
jacob1
9f7dbaa7c7 don't log loss in player stats when game is fstopped 2014-11-28 16:25:42 -05:00
jacob1
34ad806341 add player to var.DCED_PLAYERS when they quits (fixes not logging a loss in stats) 2014-11-28 16:24:56 -05:00
jacob1
d31a75c43f log stats for templates and "lover" 2014-11-28 16:24:55 -05:00
jacob1
059fe556ec gamestats are stored per roleset 2014-11-28 16:24:55 -05:00
jacob1
15c8335349 changes / improvements to !game
if > 2/5 of the players vote for a roleset it's automatically picked
picked roleset is printed out on the welcome message
!help game prints possible rolesets, also more bold
2014-11-28 16:24:55 -05:00
jacob1
d174fc4d89 rolesets are randomly picked with varying frequencies / add a !game command to make certain rolesets more likely
Not done, even if this is final it still needs more good rolesets to choose from
2014-11-28 16:23:56 -05:00
skizzerz
4cdc065d2f Security Fix: Don't allow non-admins to fsay/fact to a target other than the channel itself 2014-11-27 19:08:47 -06:00
skizzerz
eb8ffb9f68 Make GA guard also go away in the event of exchange totem firing 2014-11-26 23:45:13 -06:00
jacob1
87d7b0d375 impatience totem holder is added to the start of the voters list
prevents them from being killed by desperation totem when they didn't actually vote
2014-11-27 00:07:41 -05:00
jacob1
addc7c9e96 don't run the reaper in debug mode (fixes errors with fake nicks) 2014-11-26 23:43:34 -05:00
jacob1
8ca611a43e clone gets a random target if they forget to clone, also don't pm them an empty wolf list 2014-11-26 23:32:53 -05:00
jacob1
7c39906852 fix guardian angel being able to guard the same person twice in a row sometimes 2014-11-26 21:50:15 -06:00
nyuszika7h
19809f4d70 fpull: Refactor code 2014-11-26 14:23:55 +01:00
nyuszika7h
d9b89a5f95 fpull: Use rebase 2014-11-26 14:23:55 +01:00
jacob1
adca55fce5 Add back !fact aliases: !fdo and !fme 2014-11-25 13:31:52 -05:00
nyuszika7h
8ac4f2faad Revert "!plsnofuckup !plsnoexplode"
This reverts commit e424520eb5.
2014-11-25 07:42:41 +01:00
ChiyoOsaka
e424520eb5 !plsnofuckup !plsnoexplode
Adding 'faction' and 'fdo' as aliases to 'fact'.

!plsnoexplode
2014-11-25 02:52:35 +00:00
nyuszika7h
a03001ecf6 Make !away one-way 2014-11-22 23:34:07 +01:00
Janik Kleinhoff
3bb280a6b2 Re-add !ops alias for !admins for now 2014-11-19 19:13:40 +00:00
nyuszika7h
4e31c7d621 Remove !ops alias for !admins
There's no reasonable way to disable commands yet, and !ops is now
handled by AntiSpamMeta, so this is the best we can do for now.
2014-11-18 20:29:33 +01:00
nyuszika7h
868ef5c74e Fix typo in werecrow message 2014-11-17 22:23:59 +01:00
Janik Kleinhoff
ecc17933d9 Fix missing period 2014-11-17 11:06:14 +00:00
jacob1
04c4b46a3e Revert "fix wolf cub / traitor turning in chk_win even when end_game is false, + some other random error" 3c53ae19e8 2014-11-16 22:05:11 -05:00
nyuszika7h
54d45ba02c Revert "fstasis: Improve non-negative integer message"
This reverts commit 6468cf42b7.

The new message is confusing, as it doesn't exclude floating point
numbers, which are invalid here.
2014-11-16 10:37:17 +01:00
nyuszika7h
6468cf42b7 fstasis: Improve non-negative integer message
Suggested by @ecksdee.
2014-11-16 10:33:56 +01:00
nyuszika7h
93b1c47ee2 Log messages sent to fake players instead of sending them 2014-11-14 17:19:50 +01:00
nyuszika7h
8fe1cf9ef5 Fix commit dc156da
This reverts one of the changes made by that commit. Not PMing fake
nicks can make debugging impossible without real players.
2014-11-14 11:37:55 +01:00
jacob1
3c53ae19e8 fix wolf cub / traitor turning in chk_win even when end_game is false, + some other random error 2014-11-14 00:28:48 -05:00
jacob1
8c4281de94 !roles can print out roles from other game modes 2014-11-10 22:51:39 -05:00
jacob1
c514296a80 save !fdeny / !fallow in database, also allow commands to be added / removed individually 2014-11-03 13:37:24 -05:00
nyuszika7h
aee5bce1b0 allow_deny: Fix stale references to 'allow' 2014-11-03 18:36:28 +01:00
nyuszika7h
bb6e3e9dfe fallow, fdeny: Add temporary warning about persistence
Or rather, the lack of it.
2014-11-03 14:25:26 +01:00
nyuszika7h
06ae51d29f allow_deny: Improve assertion code 2014-11-03 14:15:30 +01:00
nyuszika7h
5e9f1031ae Fix fallow/fdeny 2014-11-03 14:11:11 +01:00
skizzerz
71fd4acb8a Fix how !stats interacts with amensiac 2014-11-02 21:36:39 -06:00