Commit Graph

1071 Commits

Author SHA1 Message Date
nyuszika7h
218366cbd8 !die: Fix first word of message being cut off in debug mode 2016-12-11 10:25:14 +01:00
Vgr E. Barry
06486e14bd Fix fsay/fact broken for non-existent users 2016-12-11 01:33:14 -05:00
Vgr E. Barry
dff024e5e4 Allow contexts to be used directly in str.format() calls 2016-12-09 10:56:34 -05:00
Vgr E. Barry
e1be940f24 Fix !join erroring out 2016-12-09 10:54:16 -05:00
jacob1
2c5e108751 fix error on !join when ACCOUNTS_ONLY is set 2016-12-09 07:56:40 -05:00
Ryan Schmidt
9f4b1a243d Merge pull request #274 from lykoss/cmd-old-api
Add a backwards-compatibility handler for commands
2016-12-08 16:35:19 -07:00
skizzerz
47339618f8 Remove part/fpart command
There is no reason for this to be a command. It has no analogue outside
of fsend, in which case you can just fsend a raw PART if needed as well.
2016-12-08 17:23:15 -06:00
Vgr E. Barry
bb8548ccdf Right. 2016-12-06 08:40:12 -05:00
nyuszika7h
3d5aa8c8e3 Fix message name 2016-12-05 14:06:22 +01:00
nyuszika7h
b2104e4d36 Respect LOG_PREFIX for !fwarn add/set 2016-12-01 23:21:01 +01:00
Vgr E. Barry
e8338d1ef6 Add the new command API + converted commands
Converted commands mostly use some backwards-compatibility hack. Please don't mind it, I'll eventually get to it.
2016-11-28 20:19:48 -05:00
nyuszika7h
da502fa34c Require a minimum of 6 players for charming
In 5-player charming games, it is possible to get into a situation where
it's impossible for the village to win - if all players except for the
wolf are charmed, lynching the wolf results in the piper winning, and
lynching the piper results in the wolf winning.
2016-11-25 14:23:16 +01:00
Vgr E. Barry
c26c7887bc Add a hook for account changes 2016-11-24 17:05:08 -05:00
Vgr E. Barry
5f50096d08 Delay error in users.get until after the end of the loop
This was originally done so that we wouldn't need to iterate through the (presumably large) set of users. However, when this raises, we have no idea which users actually match the criterias. By waiting until after, the traceback will actually print off the list of all potential users.
2016-11-24 16:29:58 -05:00
nyuszika7h
21b8ffa342 Fix denying commands with warnings 2016-11-24 16:17:53 +01:00
skizzerz
08652301c2 Properly delay night properly in villagergame, all proper-like now 2016-11-23 16:27:37 -06:00
skizzerz
a01f8860d0 Delay night properly in villagergame 2016-11-23 16:26:06 -06:00
nyuszika7h
ed7d3eda6a Add a random delay to night in villagergame 2016-11-23 19:34:41 +01:00
jacob1
bb99493ae8 fix protections not carrying over after nick change 2016-11-23 11:53:45 -05:00
Vgr E. Barry
27b0c9578d Move static methods out of the IRCContext class 2016-11-22 07:42:07 -05:00
Vgr E. Barry
423f7e352c Fix IRCContext.send_messages 2016-11-22 07:40:29 -05:00
Vgr E. Barry
ea3acbfb2a Allow implicit replacement of users without a ident and a host
This takes a different code path because of slightly different conditions; in the first case, the ident and host are both known, and so the instance is hashable. Being hashable, it can be checked for set containment, and exactly one instance in that set will be equal (since the hash is based off of the ident and host, and the comparisons check for all non-None attributes, two instances cannot possibly be equal while having a different hash).

In the second case (the new one), however, at least the ident or the host is missing, and so the hash cannot be calculated. This means that two instances may compare equal and hash to different values (since only non-None attributes are compared), so we need to run through the entire set no matter what to make sure that one - and only one - instance in that set compares equal with the new one. We can't know in advance whether or not there is an instance that compares equal to the new one in that set, nor can we know if there are multiple instances that are going to compare equal.

The two code paths are separated so that the difference in functionality is obvious (and this commit description, as well as the comment in the code, should help with that), and that the distinction remains clear.
2016-11-21 21:44:34 -05:00
Vgr E. Barry
ea51642240 Allow users.get(..., allow_multiple=True) to return an empty list 2016-11-21 21:12:27 -05:00
Vgr E. Barry
d590e7b727 Fix servers setting modes and !fsync breaking the bot 2016-11-21 10:29:14 -05:00
skizzerz
1f7b5ee6a3 Break infinite regain/release loops redux 2016-11-20 21:44:40 -06:00
skizzerz
11d626ab25 Revert old_api cmd change
Causing way too many bugs, need to use a more sane method of breaking
the cmd API, and only do so when it's actually ready to go. My
personal preference is to make the new API use @command instead of @cmd.

This reverts commits c90d35e6c0 and 5f5966a8b4.
2016-11-20 21:33:36 -06:00
jacob1
c90d35e6c0 add old_api=True to sleepy commands, default it to true 2016-11-20 22:30:13 -05:00
skizzerz
ed2576ef7e Remove debug printouts 2016-11-20 12:49:21 -06:00
skizzerz
24ae5c1e39 Kill USE_NICKSERV_GHOST, default more things in settings.py
Whether or not GHOST is used now depends on if NICKSERV_RELEASE_COMMAND
or NICKSERV_REGAIN_COMMAND are empty. Also, we do not try to go into an
infinite loop should the command we use fail to work, and instead just
run with a "wrong" nick.

Not tested at all, so blame ilbelkyr when things inevitably don't work
with it (and while you're blaming him, get him to fix the ASM website).
2016-11-20 12:36:31 -06:00
skizzerz
73fb0c65c9 Fix coin/pony chances 2016-11-20 12:33:39 -06:00
Vgr E. Barry
e922bb220e Move the message queuing to IRCContext 2016-11-20 08:25:45 -05:00
Vgr E. Barry
6d9017a4bd Improve context creation and lowercasing 2016-11-20 08:24:50 -05:00
Emanuel Barry
5f5966a8b4 Add a transition method for the old->new interface (#272)
* Add a transition method for the old->new interface

* Modify direct calls to cmd to explicitly use the old API
2016-11-19 17:47:54 +01:00
nyuszika7h
313d33f1a2 Display full help text on bare "!fwarn" and "!fwarn help"
It was listing the warnings on a bare "!fwarn" because re.split()
returned an array containing one element, the empty string. And it's not
really helpful to show just the syntax for the help subcommand in
"!fwarn help", because it already does that in the normal help message,
and also shows the available subcommands.
2016-11-19 17:10:50 +01:00
Vgr E. Barry
1766f54b21 Properly handle the option to use ghost or release 2016-11-18 21:14:15 -05:00
Vgr E. Barry
9a71b34488 Improve message sending to properly split on the end of lines 2016-11-18 17:27:33 -05:00
Vgr E. Barry
302b69c263 Probably channel life events
Blame @skizzerz for making me want to do a very bad pun as this commit summary.
2016-11-18 16:50:27 -05:00
Vgr E. Barry
112c908596 Allow an arbitrary number of arguments to IRCContext.send 2016-11-17 10:10:53 -05:00
Vgr E. Barry
dbb8a1fc82 Fix devoicing and unquieting on connect
This wasn't working before, because the mode checking was wrong. Furthermore, there may have been some race conditions; this was mitigated by an earlier commit, which allowed delaying some channel handling operations.
2016-11-17 10:06:37 -05:00
Vgr E. Barry
c6864dd7e7 Fix wrong hook name
For some reason, the end of a quiet listing has a different hook name.
2016-11-17 10:03:04 -05:00
Vgr E. Barry
074548813f Delay some channel handling operations
Specifically, the mode handling and the end of list modes are delayed until the end of the WHO reply from the server. When the end of the WHO reply is received, all queued operations on the channel, if any, are triggered at once in the form of relevant events.
2016-11-17 10:01:25 -05:00
jacob1
b180f99051 add 0-point warnings, these need to be acknowledged but give no automatic sanctions 2016-11-16 23:56:55 -05:00
jacob1
017a98608c Fix lowercasing issue in !fstasis, fix "host has access" message in !fflags 2016-11-16 23:42:23 -05:00
skizzerz
ae5b39c36f Split traitor
As part of this, adjust team and accurate stats to no longer hide any
information. For team stats in particular, it was very misleading to
list traitor as villager, because it gives the village the impression
they have more time than they actually do (i.e. 2 wolfteam 5 vilteam
actually means 3 wolfteam 4 vilteam but that is not obvious). As team
stats were changed, team reveal was also changed to disregard hidden
traitor, so that the two can't be correlated to pick out if traitor died
(if traitor was revealed as vilteam but stats decremented wolfteam, that
would guarantee that traitor died).

Also commit groundwork for the stats rewrite, hidden behind an
"experimental" stats type (so it is not on by default). It is still very
WIP, many things do not yet work with it.
2016-11-16 22:19:54 +01:00
Vgr E. Barry
885889495a Properly handle the bot's nick being already in use 2016-11-16 16:18:37 -05:00
nyuszika7h
d62b9db896 Also abort if 'git status' fails 2016-11-16 15:04:05 +01:00
nyuszika7h
82d6760c5a !update: Don't restart the bot if already up-to-date 2016-11-16 14:59:29 +01:00
Vgr E. Barry
abd2dd149d Allow handle_error to decorate its instances 2016-11-16 08:20:02 -05:00
nyuszika7h
be2d33dbe6 Make traceback pastes not expire automatically
Since we have the UUID now, we can delete them at any time if needed,
they don't have to expire automatically, which can be annoying when
trying to look up an old error (although it's also in errors.log).
2016-11-16 14:05:18 +01:00
Vgr E. Barry
3f806620e4 _ 2016-11-15 20:38:29 -05:00
Vgr E. Barry
3e61e9ec6a Beauty is in the eye of the tiger 2016-11-15 20:37:40 -05:00
Vgr E. Barry
360204bf43 Massively improve user handling
This changes how users are handled, making it less likely to encounter duplicate users; in normal circumstances, duplicates shouldn't happen.
2016-11-15 19:54:42 -05:00
jacob1
01924504fe Fix day never ending when the only votes are on the bot at day timeout 2016-11-14 23:34:09 -05:00
nyuszika7h
2c3aafc101 Improvements to !rules
* RULES is now not defined in settings.py, only in botconfig.py.

* If there are no rules specified, a default message is shown
  instructing users to configure it.

* The "#CHANNEL channel rules: " prefix is now automatically prepended
  (skipped if the string already contains that,
  for backwards-compatibility).

* The prefix and the no-rules message can be customized
  as they are in messages.py now.
2016-11-13 11:54:48 +01:00
Trigonoculus
629fe51fd7 Make rules string unconfigured by default (#269)
The old link was outdated anyway, and other networks may not use the same rules as freenode, so it should be just configured in botconfig.py like it always could.
2016-11-13 11:32:30 +01:00
skizzerz
64e6a90921 *hic*
Make doctor immunize work against doomsayer sickness and pestilence
totem
2016-11-12 23:46:45 -06:00
Vgr E. Barry
e161325d01 Remove 'channels' from the user interface
We don't use it, as the only places where we'd need to, it's only one channel, and the surrounding code needs to add the user to the channel and vice-versa, so that's pretty pointless.
2016-11-10 10:44:38 -05:00
Vgr E. Barry
52b28b4317 Fix case-sensitiveness on weird IRCds 2016-11-08 17:04:32 -05:00
Ryan Schmidt
8039b5e2a1 Merge pull request #266 from lykoss/werecrow_kill
Allow werecrow to both observe and kill at the same time
2016-11-07 23:13:10 -07:00
jacob1
0c8afe4f64 Fix db error when adding a tempban sanction on a player that already has one, fixes #245
Can happen when doing it manually, or when adding a warning after it expired but before expire_tempbans() is called
2016-11-07 21:10:18 -05:00
jacob1
cd118dbabe allow werecrow to both observe and kill at the same time 2016-11-07 20:52:58 -05:00
Vgr E. Barry
d6f2882741 Fix syntax error
Turns out that's 3.5+
2016-11-06 22:18:17 -05:00
Vgr E. Barry
fb2ece45e6 Clean up some of doomsayer's code 2016-11-06 21:54:29 -05:00
Vgr E. Barry
7c753b2810 Improve the error handler
Also, thanks to @nyuszika7h for the uuid idea. I took his early draft and implemented it properly as part of the refactoring I did.
2016-11-06 21:43:01 -05:00
Vgr E. Barry
a39ded6053 Improve handling of fake contexts 2016-11-06 17:27:09 -05:00
Vgr E. Barry
61bca595c5 Fix small oversight 2016-11-06 17:26:46 -05:00
jacob1
3db042967d fix adding/removing tempbans to hostmasks 2016-11-05 11:40:16 -04:00
jacob1
fde2ce94db fix bot pinging fake players after !fstop 2016-11-05 11:13:35 -04:00
jacob1
5d0021de7d fix possible error when setting flags on users 2016-11-05 00:21:15 -04:00
nyuszika7h
e4f696abe6 Fix villagergame appearing above 9p
In join phase, var.PLAYERS is empty, so var.ALL_PLAYERS needs to be
checked instead.

(While I'm at it, changed it to <= 9 rather than < 10, just for
consistency with the rest of the code.)

Fixes #263.
2016-11-04 21:45:29 +01:00
jacob1
6293b61d83 fix error when villagergame kills someone with a retribution totem, fixes #224 2016-11-03 23:26:30 -04:00
jacob1
f101c62af8 Fix !fflags +j overwriting flags when account name is uppercase, fixes #254
Also allow setting flags on players that haven't played any games
2016-11-03 22:06:13 -04:00
nyuszika7h
136e41a14c Add newline for readability 2016-11-04 00:06:51 +01:00
skizzerz
341cce6a8f Split mayor
Also adjust revealing totem so that it always fires after mayor, in case
someone has both. Before it would depend on the order the files were
imported, which could lead to oddities down the road.

This fixes #256
2016-11-03 16:29:15 -05:00
Vgr E. Barry
2244ed4370 Fix wrong function calls in user functions 2016-11-03 12:04:26 -04:00
Vgr E. Barry
a6424605ad Fix error when bot restarting and players were joined
AKA name error
2016-11-03 11:35:17 -04:00
Vgr E. Barry
cce2797e7b Fix name 2016-11-03 11:29:03 -04:00
Vgr E. Barry
851cebdbd7 Remove test function
Oops.
2016-11-03 11:26:39 -04:00
Vgr E. Barry
62abf6dae8 Fix small issues with fake nicks and channels 2016-11-02 23:35:13 -04:00
Vgr E. Barry
d090e573b7 Greatly improve channel handling
This also does some more bits of rudimentary user handling, but most of it still remains to be done.

Note: This adds DEV_PREFIX to botconfig and LOG_PREFIX to settings (var), make sure to properly update your bot!
2016-11-02 22:31:54 -04:00
Vgr E. Barry
49208db148 Make backwards-compatible users.add return the new "user" 2016-11-02 16:15:16 -04:00
Vgr E. Barry
04e7f952d3 Improve error handler 2016-11-02 15:18:32 -04:00
Vgr E. Barry
0120836669 Don't bother using a channel state in __del__
If the channel is being deleted, we don't need to care about the state. Furthermore, if the channel is being deleted as Python is shutting down, _States will have been deleted (or set to None), so we can't access it. Rather than trying to work around the garbage collection, we just set it to None and call it a day.
2016-11-02 14:52:30 -04:00
Vgr E. Barry
b4fc7ac82d Remove leftover parameter 2016-11-02 14:34:33 -04:00
Vgr E. Barry
736d1219ed Fix oversight in account handling 2016-11-01 23:04:47 -04:00
nyuszika7h
6932c42574 Fix traceback syntax highlighting
Additional text at the end (local variables) has a red border for each
line with py3tb, but not with pytb.
2016-11-01 23:16:55 +01:00
nyuszika7h
dccfd9de38 Require "!leave -force" to quit during a game 2016-11-01 15:34:49 +01:00
Vgr E. Barry
b67043d25f Small tweaks 2016-10-31 22:25:20 -04:00
Vgr E. Barry
3de4469809 Comment out yet-to-be-tested hooks 2016-10-31 22:23:42 -04:00
Vgr E. Barry
fe141b288f Allow specifying a prefix (e.g. for channels) for context.send() 2016-10-31 22:22:48 -04:00
Vgr E. Barry
5c9b13ce87 Improve NOTICE handling
The `notice` parameter is now keyword-only, and the handler now uses `functools.partial` instead of a lambda function.
2016-10-31 20:59:52 -04:00
Vgr E. Barry
12eab068be Change the user handling calls in wolfgame.py 2016-10-31 20:44:10 -04:00
Vgr E. Barry
795caa83fe Forward fixes for the new interface 2016-10-31 17:57:48 -04:00
Ryan Schmidt
7e856859cb Merge pull request #250 from lykoss/irc-hooks
Add a new hooks.py file
2016-10-31 10:13:19 -07:00
jacob1
0a7752fd15 newline changes in error logger
local variables were right next to the next traceback in errors.log even though the belonged to the previous one
2016-10-30 23:02:50 -04:00
Vgr E. Barry
d602a33efd Update handle_error to be more useful
Now, local variables from the innermost frame (i.e. where the error was raised) are printed with the traceback, and the latter includes all of the call stack (instead of just up to the innermost error handler).
2016-10-30 22:34:46 -04:00
Vgr E. Barry
a2257ce692 Fix pastebin_tb to actually use the passed traceback 2016-10-30 22:32:54 -04:00
nyuszika7h
c968e1192a Even better exception printing, like in tracebacks 2016-10-30 20:12:15 +01:00
Vgr E. Barry
e5f922d548 Improve exception printing through !eval and !exec 2016-10-30 14:03:46 -04:00
nyuszika7h
57a628f135 Update help text for !say/!act
No longer requires !f prefix so display the preferred command names
in the help text.
2016-10-29 23:26:35 +02:00
skizzerz
21fc1f81c0 Fix error on attempting to warn with invalid expiration value 2016-10-28 17:19:12 -05:00
Vgr E. Barry
eef934c433 Custom keys can't fit in lykos. Tsk tsk @laneatomic 2016-10-28 14:37:17 -04:00
Vgr E. Barry
f3e1273dbc Add a new hooks.py file 2016-10-27 19:15:33 -04:00
Ryan Schmidt
af96a2544e Merge pull request #248 from lykoss/context-base-stuff
New IRCContext, Channel and User classes
2016-10-27 15:26:45 -07:00
Vgr E. Barry
317a5edab9 @skizzerz must *obviously* be an op! 2016-10-27 18:15:29 -04:00
nyuszika7h
5eba188607 Also fix idols when wild child itself changes nick 2016-10-27 20:49:56 +02:00
nyuszika7h
a0092b981f Update wild child's idol when they change nick
Closes #249.
2016-10-27 20:42:11 +02:00
Vgr E. Barry
349433c9ab Do a direct lookup for hostmasks for stasis. 2016-10-27 09:13:07 -04:00
Vgr E. Barry
2877abea55 Update as per @skizzerz's comments 2016-10-26 20:06:29 -04:00
skizzerz
430b73ef33 Re-do 85972db5 to not be utterly idiotic 2016-10-25 21:29:53 -05:00
Vgr E. Barry
85972db5b1 Update Event to allow arbitrary keyword arguments
Comments are on the same line as the possibly-failing line; if it fails,
the traceback will include that line (so it will be obvious what the
error is without looking at the source).
2016-10-25 21:25:33 -04:00
Vgr E. Barry
5ec273c6e0 New IRCContext, Channel and User classes
Right now these don't do anything, but in the future they will be how
we'll do channel and user handling.
2016-10-25 18:20:31 -04:00
nyuszika7h
0ad4af4240 Change !fstop back to require prefix
Per @skizzerz's comment on IRC, you're forcing the game to stop,
as it would also stop on its own when it ends normally.
2016-10-25 21:42:28 +02:00
nyuszika7h
281ac8e21e Don't require !f prefix for admin commands where unambiguous
I didn't change !fflags to !flags as it may be a good idea to add
a !flags command to allow users to view their own flags.
2016-10-25 21:07:47 +02:00
nyuszika7h
6ac05fb3e6 Make !update not pull if a game is running
The reason we defer pulling is because if an error happens before
restarting, the line numbers in the traceback may not reflect the
actual line numbers since the code has changed.
2016-10-25 17:49:10 +02:00
nyuszika7h
946e84cbd3 Add !update command 2016-10-25 17:00:50 +02:00
nyuszika7h
797d95fac8 Fixes to !fpull and !frestart 2016-10-25 16:38:46 +02:00
jacob1
1d664fae6b fix error when doing 'kill and', 'kill and 7' will try killing 'and' and '7' 2016-10-25 08:27:28 -04:00
jacob1
24c5e845d3 prevent bodyguard from guarding self, this shouldn't be possible 2016-10-24 23:04:02 -04:00
nyuszika7h
0580915150 Allow specifying lover wins with fool in !fgame roles 2016-10-24 17:25:51 +02:00
jacob1
430fa3c7c7 really fix role_attribution argument order in random 2016-10-22 22:16:56 -04:00
nyuszika7h
d0c19357df Fix wrong order of arguments 2016-10-22 17:59:21 +02:00
skizzerz
c2fd50a33e Fix piper !pass breaking the bot
Piper shouldn't be able to !pass anyway, so let's just remove that
entirely.
2016-10-20 16:47:26 -05:00
jacob1
ab8a05ac1b log errors to errors.log again 2016-10-19 21:01:41 -04:00
skizzerz
c8a5f804da Fix wolfteam VG killing protected people 2016-10-19 19:25:52 -05:00
nyuszika7h
684abf58b4 Minor code style fixes to previous commit
Making this a separate commit to avoid invalidating the PGP signature,
though it doesn't really matter for lykos anyway.
2016-10-19 21:48:41 +02:00
Lukas Martini
a6c6236e4f Stop start vote timer if player leaving is the only one who voted 2016-10-19 21:44:19 +02:00
skizzerz
55c70570af Switch param order of role_attribution event
Standardizing on first two params for event handlers to be cli, var
2016-10-18 21:56:56 -05:00
nyuszika7h
95133160ab Tell dullahan their role at night even if targets dead 2016-10-18 15:06:33 +02:00
jacob1
9c041e253c fix "you are a cursedtraitor"
also add tags support to all the other wolf roles in case we do that sometime
2016-10-15 22:16:35 -04:00
Ryan Schmidt
4e8f083dc2 Make !refreshdb expire stasis and tempbans
It was slightly annoying that there was no way to do this via a command. Should also have these expire if someone !quits to end a game, someone should work on that :)
2016-10-13 15:04:30 -07:00
Vgr E. Barry
6b9453afa1 Use more specific OS exceptions
Python 3.3 added some more specific exceptions for OS-related
operations, specifically to help mitigate this kind of hard-to-read
boilerplate. See
https://docs.python.org/3/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy
for reference.
2016-10-08 08:47:23 -04:00
nyuszika7h
36b5543d24 Remove !wiki title check as it is too restrictive
It didn't allow user pages or pages with disambiguation suffixes.
I think it's fine for it to just return "not found" for invalid titles.
2016-09-26 16:32:18 +02:00
Vgr E. Barry
925819e517 Remove stray cat from busy street 2016-09-26 07:11:12 -04:00
jacob1
5ef750aa2e Update !wiki to use the new wiki 2016-09-25 23:39:38 -04:00
skizzerz
2dac49f741 Fix dullahan spine whip breaking due to FA split 2016-09-25 19:39:52 -05:00
nyuszika7h
12edbdfb43 Make "!gstats <num>" also show total of all gamemodes
Also capitalized the role names and "Total wins" for consistency with
!pstats and upgraded the schema to create a new index for game lookups
without specifying the game mode.
2016-09-24 23:22:33 +02:00
jacob1
3ce7e1d72f fix error in !gamestats # 2016-09-24 15:31:46 -04:00
nyuszika7h
e0bf47c182 Make !gstats show totals for all game modes by default 2016-09-24 12:27:45 +02:00
skizzerz
810433b656 Revamp alpha
Make 10+ because it's pointless otherwise.

Revamp low counts because it was too punishing towards village, if they
made a single mistake then alpha could win with a successful bite. This
reduces overall wolf count making that situation more difficult (and
until crow joins in 12p requires that alpha turns a lycan before being
able to bite). Higher counts rejiggered a bit too to be a bit more
interesting, although may still need further adjustment.
2016-09-23 23:28:28 -05:00
skizzerz
bfc675e953 Split fallen angel
Also fixes some bugs with using stop_propagation instead of
stop_processing in events (the former does absolutely nothing).

Added a skeleton file to assist with adding new roles, contains the
needed imports on top and vim modeline on the bottom.

Yes, these are all related and need to go in the same commit, stop
throwing things at me.
2016-09-23 20:10:04 -05:00
skizzerz
9f21eb65c3 Fix gstats reporting 'foo wins' 2016-09-23 18:52:21 -05:00
nyuszika7h
5a20801209 Mention game mode in !gstats output
This is to make it clear that !gstats without arguments returns stats
only for the default game mode.
2016-09-23 15:14:27 +02:00
skizzerz
1bce120e1c Remove cursed and mayor from evilvillage
Both templates serve to make life miserable for village team, who
already have it rough as-is. Cursed makes it so that hunter's sole shot
misses half the time, and mayor makes it so that fakeclaiming has less
of a chance of working out (and wolf kills the fakeclaimer the next
night thus ending any confusion).
2016-09-17 13:29:17 -05:00
nyuszika7h
4ab6acee09 Always use pipe separator for notes in warning log
Warning reasons might contain parentheses so it may be ambiguous, and
deletions are already logged with the pipe character, which is also used
when setting the warning, anyway.
2016-09-15 15:20:41 +02:00
skizzerz
cc7138eb44 Fix cursed villager not being seen as wolf 2016-09-13 16:42:54 -05:00
skizzerz
01dfdc7ac4 Split blessed and cursed villager 2016-09-13 16:35:54 -05:00
skizzerz
f5d510374a Fix !warn ack duplicating stasis, remove !fquit warning 2016-09-13 10:55:52 -05:00
nyuszika7h
9ea822d7d8 Lowercase account in !fflags with single argument 2016-09-13 12:42:34 +02:00
skizzerz
0a763b64e5 Fix previous commit to ACTUALLY set the stasis 2016-09-12 23:42:42 -05:00
skizzerz
b23f17cd75 Delay stasis until warning is acked 2016-09-12 23:39:11 -05:00
skizzerz
cd9e436bc2 Fix error when VG is driven off by retribution totem
Error only manifests if it was a wolf-side VG, or if it was a
village-side VG and no wolf-side VGs also attempted to kill that person
(in other words, the VG was given lead credit for the kill).
2016-09-12 14:05:32 -05:00
nyuszika7h
01b7cea83c Use regular lowercase for hosts + minor code cleanup 2016-09-11 19:59:46 +02:00
nyuszika7h
037065b40c Don't let dead players with same account/host rejoin in maelstrom 2016-09-11 17:40:39 +02:00
jacob1
cae1df1423 Fix !swap and !fsync voicing players during night if DEVOICE_DURING_NIGHT is set 2016-09-10 23:28:20 -04:00
skizzerz
446d77b452 Split GA and bodyguard 2016-09-10 11:22:10 -05:00
skizzerz
87e8b57745 Adjust warnings track 2016-09-10 11:00:04 -05:00
nyuszika7h
ecbf32c9ad Add an explanatory message for pings after bot restart
Just like when a game is canceled due to taking too long to start,
although in this case players may notice that the bot restarted, it
doesn't hurt to make it clear to them.
2016-09-09 21:41:45 +02:00
nyuszika7h
21c3931b7b Reply in private at night if DEVOICE_DURING_NIGHT is on 2016-09-09 21:29:02 +02:00
skizzerz
0adee06b40 Fix voting mayor 2016-09-08 19:07:22 -05:00
nyuszika7h
20d5ede0f2 Fix !ftemplate 2016-09-08 22:07:00 +02:00
nyuszika7h
8dddd4c3b0 Move other nicks to be kicked to guest nick pattern 2016-09-08 22:02:45 +02:00
jacob1
f51833d4c4 fix error when day times out with a tie vote 2016-09-03 14:28:39 -04:00
skizzerz
0287b05bcd Split shaman
This has a number of related changes in other files due to needing to
re-prioritize events and fixing other bits of code to play more nicely
with split-off totems. Alpha wolf handling was moved after protection
handling because it should've been that way to begin with, and as part
of splitting off protection totem it needed to be split at the same
time. Same with fallen angel changes with how protection now adjusts the
killers lists.
2016-09-02 13:56:26 -05:00
nyuszika7h
8bd98b9e5c Make guest nick pattern configurable
Closes #247.
2016-08-29 00:55:51 +02:00
nyuszika7h
1082736d2e Check for actual guest nicks rather than anything starting with "Guest" 2016-08-27 17:11:17 +02:00
skizzerz
2dd19f3277 Fix death totems not triggering VG correctly 2016-08-26 13:19:19 -05:00
skizzerz
e816f4b436 Fix issue where sometimes the bot didn't recognize someone returning to the village 2016-08-25 21:47:54 -05:00
jacob1
2f0d299903 Fix !fwarn del log message, modify colors 2016-08-25 21:59:43 -04:00
skizzerz
b950060285 Fxi tpyo 2016-08-25 13:17:31 -05:00
nyuszika7h
67e6d086a2 Add support for CTCP TIME 2016-08-24 23:09:07 +02:00
skizzerz
55fa1cbb88 Fix error when wolves attack monster 2016-08-23 12:05:50 -05:00
skizzerz
cd0423deb0 Fix wild child 2016-08-21 21:11:12 -05:00
skizzerz
411d8a6509 Revert "Disable wild child in random"
This reverts commit b089a6eee8.
2016-08-21 14:10:43 -05:00
jacob1
b089a6eee8 Disable wild child in random
role is buggy, needs further testing
2016-08-21 15:09:14 -04:00
skizzerz
1fdd9250d6 Fix tempban sanction not working 2016-08-19 23:46:13 -05:00
skizzerz
ac78e46e91 Fix VG win attribution 2016-08-19 23:46:04 -05:00
jacob1
f222c9ab16 fix dullahan spine whip 2016-08-18 23:06:12 -04:00
jacob1
ead74e0fe5 log !fwarn add/set/del to LOG_CHANNEL, if set 2016-08-17 23:55:22 -04:00
skizzerz
3479b72ce7 Let mystic know of all unsplit special roles too 2016-08-17 17:22:00 -05:00
skizzerz
d5d30eb6ae Squash error on fdie/frestart
oyoyo already closes the socket as part of a finally block, we don't
need to also do that.
2016-08-17 17:14:53 -05:00
skizzerz
af2fef5ea9 Fix exchange totem not firing 2016-08-17 17:06:27 -05:00
skizzerz
ebb3bdccfb Split mystic/wolf mystic 2016-08-17 16:52:37 -05:00
skizzerz
32dc611acf Split detective 2016-08-17 16:07:01 -05:00
skizzerz
457feb92de Split off doomsayer's sickness too 2016-08-17 12:46:16 -05:00
skizzerz
f66a1502dc Split doomsayer 2016-08-17 11:46:40 -05:00
skizzerz
3eccf32765 Use a non-discriminatory variable name #WolfSphereLivesMatter 2016-08-16 10:34:16 -05:00
Vgr E. Barry
9333588126 Modify the decorators so that nicks may be used for commands
Also add framework so that custom roles can modify what roles are part
of a pack of tetrahedron wolves more easily, but no other part has been
done to help that.
2016-08-15 23:38:33 -04:00
skizzerz
2e11f67e7e Fix error when 2 people kill each other the same night 2016-08-15 21:22:08 -05:00
skizzerz
781c1bfb99 Rebuild indexes after schema updates
Also bump schema version to 4 to force a reindex
2016-08-15 21:10:03 -05:00
skizzerz
32f2a2eb2c Fix !stats for non-players 2016-08-15 19:41:45 -05:00
skizzerz
28ba8e2175 Fix missing import in warnings 2016-08-15 19:08:51 -05:00
skizzerz
b5571c82e0 split VG 2016-08-15 18:59:24 -05:00
Vgr E. Barry
fe4ccc3ca7 Add __all__ to src/utilities.py 2016-08-13 13:03:03 -04:00
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