Commit Graph

2182 Commits

Author SHA1 Message Date
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
9ac1f3fd5b Fix missing comma 2016-06-06 07:43:43 +02:00
jacob1
a552e1cc56 Update mad scientist message to say it is village sided
people get confused about this a lot
2016-06-05 21:25:38 -04:00
Ryan Schmidt
2b7ce0b6da Further detective message tweak
Let's make it grammar good now
2016-05-30 11:36:57 -07:00
Ryan Schmidt
793428f69b Remove spurious newlines from detective_notify 2016-05-30 11:17:59 -07:00
Ryan Schmidt
8fd3e365c2 Update harlot message
Instruct harlots to use pass instead of visiting self; both work but the latter is an anachronism from before other roles were able to skip doing things at night. Pretty much every other role has normalized on the pass command, so that's what we should advertise here too.

Also fix up the pass message for bodyguard to put it after the command they use to act. It just seems better that way.
2016-05-26 21:09:58 -07:00
nyuszika7h
9ea9a1a317 Fix modelines in other files 2016-05-11 16:09:19 +02:00
nyuszika7h
2d1c745ae6 messages/en.json: Fix indentation, add vim modeline 2016-05-11 15:53:41 +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