Commit Graph

778 Commits

Author SHA1 Message Date
Ryan Schmidt
b1271ecbe0 Merge pull request #277 from lykoss/part-quit-hooks
Improve user part/quit/nick hooks
2017-01-06 10:17:28 -07:00
nyuszika7h
a6e4d2b3c1 Fix ping handling
Don't start a new timer every time someone calls !latency, and make it
work even if automatic pinging is disabled. Also, moved the command to
handler.py per @Vgr255's suggestion.
2017-01-06 17:07:42 +01:00
nyuszika7h
6f7e4398dd Simplify latency checking code
Since we send the timestamp of the request with the ping and the server
will send it back, there is no need to store it.
2017-01-06 16:20:40 +01:00
nyuszika7h
06c60dfdc3 Fix circular import
The strange thing is that it was working on my test instance.
Probably because Python 3.6 changed something regarding that.
2017-01-06 15:58:53 +01:00
nyuszika7h
a6e3c0a720 Periodically ping server to detect disconnection
In some cases, disconnection from the server can be unclean and won't be
noticed until the bot tries to send a message, which may never happen if
it did not disconnect during the game. To solve this problem, it will
now ping the server every 2 minutes by default, which will result in
a broken pipe error if the connection is dead. This won't be able to
detect netsplits where the server the bot is on stays online, because
those are impossible to correctly detect in every case.

This commit also adds a !latency command so that users can verify if the
bot is lagging.
2017-01-06 15:52:26 +01:00
Vgr E. Barry
e0f8f172d6 Update part/quit/kick/nick hooks 2016-12-19 13:29:20 -05:00
skizzerz
6bf12520f1 Fix day timeout causing game to end twice 2016-12-14 10:23:00 -06:00
nyuszika7h
144b01cfed !restart already fixed, small change for consistency 2016-12-11 10:27:39 +01:00
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
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
nyuszika7h
3d5aa8c8e3 Fix message name 2016-12-05 14:06:22 +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
skizzerz
a01f8860d0 Delay night properly in villagergame 2016-11-23 16:26:06 -06:00
jacob1
bb99493ae8 fix protections not carrying over after nick change 2016-11-23 11:53:45 -05: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
skizzerz
ed2576ef7e Remove debug printouts 2016-11-20 12:49:21 -06:00
skizzerz
73fb0c65c9 Fix coin/pony chances 2016-11-20 12:33:39 -06: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
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
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
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
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
skizzerz
64e6a90921 *hic*
Make doctor immunize work against doomsayer sickness and pestilence
totem
2016-11-12 23:46:45 -06:00
jacob1
cd118dbabe allow werecrow to both observe and kill at the same time 2016-11-07 20:52:58 -05: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
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
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
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
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
736d1219ed Fix oversight in account handling 2016-11-01 23:04:47 -04:00
nyuszika7h
dccfd9de38 Require "!leave -force" to quit during a game 2016-11-01 15:34:49 +01:00
Vgr E. Barry
12eab068be Change the user handling calls in wolfgame.py 2016-10-31 20:44:10 -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
Vgr E. Barry
eef934c433 Custom keys can't fit in lykos. Tsk tsk @laneatomic 2016-10-28 14:37:17 -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
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
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
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
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
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
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
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
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
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
nyuszika7h
67e6d086a2 Add support for CTCP TIME 2016-08-24 23:09:07 +02: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
2e11f67e7e Fix error when 2 people kill each other the same night 2016-08-15 21:22:08 -05:00
skizzerz
32f2a2eb2c Fix !stats for non-players 2016-08-15 19:41:45 -05:00
skizzerz
b5571c82e0 split VG 2016-08-15 18:59:24 -05: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
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
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
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
nyuszika7h
6b90e52aef Add another gif 2016-08-09 11:30:59 +02: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
Ryan Schmidt
f8d953f8ab Don't reply on bad invites
DDoS vector
2016-08-08 15:29:31 -07: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
3fcfa83c43 Really fix pre_restart_state (for real this time) 2016-07-27 23:07:29 -05:00
skizzerz
e6b6383b45 rejigger fdie too 2016-07-27 23:01:28 -05: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
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
nyuszika7h
d59f2ec4a8 Use reply() in !warn/!fwarn instead of hardcoding cli.notice() 2016-07-18 10:28:13 +02: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
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
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
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
nyuszika7h
accd75cfaf Changed winner = "none" to "no_team_wins" 2016-05-01 20:43:48 +02: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
44ca368724 Add !stasis command to view amount of stasis you have without joining 2016-04-19 13:54:57 +02: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
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
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
io
4e41dfe47a Add CTCP VERSION support 2016-04-04 16:18:04 -07: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
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
Vgr E. Barry
05bab1d83f Fix ALL THE THINGS 2016-02-11 13:55:25 -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