Commit Graph

2421 Commits

Author SHA1 Message Date
Fudster
0a6c6200ab Fix for #176 improve invalid role errors 2017-02-05 12:39:52 -05:00
jacob1
4c67a5b438 fix user references staying around due to !pingif pinger
also remove ugly hack since we don't need it anymore
2017-02-02 22:08:04 -05:00
Vgr E. Barry
e1e3b8d177 Ignore locals from hook.caller 2017-02-02 21:00:47 -05:00
Vgr E. Barry
48e1f06b33 Be more aggressive when trying to figure out why there are duplicates 2017-02-02 20:59:37 -05:00
Vgr E. Barry
0ef70245ff Don't show locals of proxy stubs 2017-01-28 00:40:28 -05:00
Vgr E. Barry
5842b41097 Add some hacky debugging aid for when a User lingers around 2017-01-28 00:40:12 -05:00
jacob1
8f38900a44 fix chk_win events in gamemodes.py 2017-01-27 21:42:52 -05:00
Ryan Schmidt
69fa7d377f Split succubus (#284)
* Split + buff succubus

When all succubi die, all entranced people now die along with them. This
should prevent an entranced person from ratting out the succubus early
on so that they go back to their team, as they lose now even if succubus
dies. One exception is if EVERY succubus idles out, then everyone that
is entranced is freed of entrancement, as it isn't their fault that they
didn't protect their friends in that case.

Dullahans now have succubi entirely removed from their list as the
likelihood they get unentranced is low, and it's easier to implement
this way.

Ensure that entranced people can vote along with ANY succubus, even if
that vote isn't the one that succeeded. Before there were cases where
they could vote along with succubus but still end up dying (particularly
in respect to a vote passing when a succubus abstained).

Clear up some message wording with regards to succubi.

Cleaned up chk_win_conditions and eliminated chk_traitor, so they make
much more sense now.

Also fixed minor issues, such as end-game saying "same number" of wolves
even if there are more wolves than villagers, hunter/vigilante dying
during night sometimes not clearing variables correctly (thus causing
premature night end) and some various stupidity going on with some old
code I wrote that doesn't have any visible effects.

* Combine all players into the same succubus death message

* Fix stylistic issues and succubus idling not working
2017-01-27 14:08:41 -05:00
Vgr E. Barry
54ab59a36f Add some more hacky support for IRCds that are broken beyond hope 2017-01-25 21:47:13 -05:00
Vgr E. Barry
7bc13937e4 Don't say that someone has already joined if they're not logged in 2017-01-25 21:27:24 -05:00
Vgr E. Barry
e227e0e958 Make sure that users.equals returns False if at least one argument is None 2017-01-25 21:26:59 -05:00
Vgr E. Barry
b68cba12d6 Show local variables from all possibly relevant frames
This doesn't show the variables for a few specific functions, specifically those which have a '_ignore_locals_' local variable set to a truthy value. For now, those functions are handle_error.__call__ (which is present in every traceback ever, due to its nature), cmd.caller and command.caller (one or the other is present in a large number of tracebacks, again due to their nature).

This makes debugging easier when the error is not in the innermost frame, but rather in one or two frames before, and the locals are lost.
2017-01-25 14:05:51 -05:00
jacob1
a928d729a6 fix incoming deadchat messages using your nick instead of the person who sent it 2017-01-21 20:16:36 -05:00
jacob1
c67551bd46 fix error when dead player changes nick (from last commit) 2017-01-21 20:10:37 -05:00
jacob1
62f716093a fix !swap and nick changing errors
var.ALL_PLAYERS update (for !swap) needs to happen before checking if the new user is in var.ALL_PLAYERS
pl is inaccurate during nick changes because the user's nick in var.ALL_PLAYERS is updated automatically but in var.ROLES isn't, therefore a user that changes nicks would never be returned in list_players()
one instance of prefix incorrectly changed to user.nick
2017-01-21 18:29:11 -05:00
Vgr E. Barry
058acd40d7 Fix wolfchat relaying and player renaming 2017-01-21 14:26:21 -05:00
nyuszika7h
1c5761ce26 Make the ping thread daemonized to allow the bot to quit 2017-01-19 21:22:59 +01:00
Vgr E. Barry
2354269ed2 Revert unintentional change to dullahan 2017-01-17 14:46:50 -05:00
Vgr E. Barry
bc63f2be4f Mad scientist fixes
Also stats fix
2017-01-17 14:43:28 -05:00
Vgr E. Barry
8c2124fb6a Add the new functions submodule, superseding utilities.py
All of the new functions handle and return User instances. Not used yet, but will be needed when converting roles.
2017-01-17 13:46:40 -05:00
Vgr E. Barry
accba42ea2 Change var.ALL_PLAYERS to hold User instances
Also some unrelated things
2017-01-17 13:45:38 -05:00
Vgr E. Barry
26fec0f5a0 Make sure fake users always get "sent" the simple messages 2017-01-17 13:44:52 -05:00
Vgr E. Barry
ad7e0f11ac Ignore messages received before the bot is fully set up 2017-01-17 12:52:27 -05:00
skizzerz
740d14ef72 Experimental stats: intelligently determine if traitor could have died
If it is impossible for other (non-wolf) roles to have killed at night,
we do not deduct from the traitor count. This logic isn't perfect yet,
but should cover the majority of cases.
2017-01-16 16:38:51 -06:00
nyuszika7h
bde640c9ae Don't attempt to identify with no password set
Some servers disconnect the client if PASS fails, so the bot will fail
to connect unless SERVER_PASS is also explicitly set to None.
2017-01-16 12:40:14 +01:00
Vgr E. Barry
cef59bce73 Fix small variable error 2017-01-15 10:03:11 -05:00
Vgr E. Barry
693ebf3546 Fix some oversights 2017-01-13 16:28:09 -05:00
Vgr E. Barry
d2211de510 Update deadchat handling 2017-01-13 16:17:40 -05:00
Vgr E. Barry
fea04471ca Properly lowercase host everywhere 2017-01-13 16:17:03 -05:00
Vgr E. Barry
a0550f922b Allow passing a list or tuple to IRCContext.queue_message 2017-01-13 16:15:20 -05:00
Vgr E. Barry
fb7bf56579 Fix proper lowercasing, take 2 2017-01-13 12:13:32 -05:00
Vgr E. Barry
2cd410ace8 Fix lowercasing a hostname to not use IRC lowercasing 2017-01-13 12:05:16 -05:00
Vgr E. Barry
4f36b189ff Update pingif timer handler 2017-01-13 12:00:09 -05:00
Vgr E. Barry
96c36a13b6 Fix lowercasing a BotUser instance 2017-01-13 11:59:47 -05:00
Vgr E. Barry
52f6b9238a Fix fspectate 2017-01-13 11:59:24 -05:00
Vgr E. Barry
a620860cc5 Update who_end event parameter 2017-01-13 11:57:16 -05:00
Vgr E. Barry
0ca9e8cbdb Update the pingif command 2017-01-12 15:29:55 -05:00
Vgr E. Barry
582523bda5 Update refreshdb and ping commands 2017-01-12 15:29:34 -05:00
Vgr E. Barry
abf663706d Update fsync and related functions 2017-01-12 15:28:58 -05:00
Vgr E. Barry
889408a7bb Remove redundant lines 2017-01-12 14:13:05 -05:00
Vgr E. Barry
b3552574d5 Update database on simple and notice toggle 2017-01-12 14:02:17 -05:00
Vgr E. Barry
ce8babec56 Update the notice toggle command 2017-01-12 13:57:24 -05:00
Vgr E. Barry
eb5a54474e Update the simple toggle command 2017-01-12 13:57:14 -05:00
Vgr E. Barry
f941f23e91 Update some docstrings in users.py 2017-01-12 13:55:07 -05:00
Vgr E. Barry
fe692dd74e Update fdie and frestart to use the new command API 2017-01-12 12:46:05 -05:00
Vgr E. Barry
1b695b4849 Use the new IRCContext.send API instead of break_long_message 2017-01-12 12:45:16 -05:00
Vgr E. Barry
4a02943a6e Use context directly for mode change 2017-01-12 12:44:34 -05:00
Vgr E. Barry
81c96f4a56 Tweak hooks.quit 2017-01-12 12:43:41 -05:00
Vgr E. Barry
87df9e1440 Add a client attribute to MessageDispatcher 2017-01-12 12:43:18 -05:00
Vgr E. Barry
16022599e5 Use __class__ cell for channel comparisons 2017-01-12 12:42:46 -05:00