Commit Graph

147 Commits

Author SHA1 Message Date
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
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
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
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
skizzerz
87e8b57745 Adjust warnings track 2016-09-10 11:00:04 -05:00
nyuszika7h
8dddd4c3b0 Move other nicks to be kicked to guest nick pattern 2016-09-08 22:02:45 +02:00
nyuszika7h
8bd98b9e5c Make guest nick pattern configurable
Closes #247.
2016-08-29 00:55:51 +02:00
jacob1
ead74e0fe5 log !fwarn add/set/del to LOG_CHANNEL, if set 2016-08-17 23:55:22 -04: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
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
3855c54c35 Split villager/cultist 2016-08-09 12:44:30 -05: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
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
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
e14c3f1d9c Make alpha bite turn target immediately
RIP long bitten messages, you shall be missed :(
2016-07-21 18:20:29 -05:00
skizzerz
d2dc4d2deb Remove care/kill color/bold/startspam settings 2016-07-16 22:48:18 -05:00
nyuszika7h
e83e6caac3 Remove bureaucrat
Closes #220.
2016-06-23 22:20:33 +02: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
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
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
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
Vgr E. Barry
7b2cc43a50 Run, Forrest, Run! 2016-04-09 16:57:11 -04:00
skizzerz
b369a0d4b3 Nothing to see here, move along. 2016-03-31 23:46:43 -05: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
Ryan Schmidt
997b2c3c89 Default balance fix
12p default is horribly skewed towards wolves (11 and 13 are pretty well balanced though), move det from 13p to 12p to combat this
2016-02-17 16:25:44 -07:00
Vgr E. Barry
fb3e7eb8b6 woof 2016-02-11 13:26:23 -05:00
skizzerz
abc90530d8 Partial revert of 56827a2, rm unneeded (and horrific) code 2016-02-01 21:05:01 -06:00
jacob1
56827a2ce2 lycan balance adjustments
lycan#2 moved down from 10 to 9p
wolf#2 swapped for wolf shaman
GA swapped for bodyguard
2016-02-01 20:54:15 -05:00
skizzerz
6738acc82c Add disabled-by-default start spam killer
Like the color/bold killers, this can be configured to kick people if
they spam !start while it is being ratelimited for them.
2016-02-01 17:32:02 -06:00
skizzerz
b29701782f Maelstrom fixes
- Correctly assign random roles upon game start
- Let people know if they're villager/cultist or whatever even on nights
  2 and beyond
2016-01-14 01:08:49 -06:00
Ryan Schmidt
57e5aec9cd Increase quit grace time to 60s
Rejoining an IRC server after quitting can take a bunch of time for slow connections or if a lot of channels are to be joined. Additionally, quits could be indicative of temporary internet issues, want to make sure we give sufficient time to reconnect in case of a DHCP lease expiring or whatnot.
2015-12-20 14:54:22 -07:00
Vgr E. Barry
c47a84d058 Add the wolf shaman role 2015-11-23 19:36:02 -05:00
skizzerz
b351cd496f Enhance succubus win message 2015-11-14 19:22:42 -06:00
Lane Farrow
a4e21aa997 move irc messages to json and allow overriding in custom file 2015-11-10 19:58:50 -06:00
jacob1
b97085c32a fix database error 2015-11-01 19:03:13 -05:00
jacob1
d4f9e59576 add demoniac and succubus wins to gstats
tables should be automaticly converted
2015-10-31 12:13:52 -04:00
skizzerz
e2f313440d Merge remote-tracking branch 'origin/master' into sleepy 2015-10-30 19:40:46 -05:00
skizzerz
627efab5ec Fix priest death in sleepy, update alpha messages for doomsayer 2015-10-30 12:19:21 -07:00
Vgr E. Barry
e013d76d5c Remove medium from ROLE_GUIDE
We don't have time to introduce it in time for the Halloween update, so
let's remove it to prevent bad things happening (e.g. random)
2015-10-30 11:45:43 -04:00
Vgr E. Barry
e1a3ed7bf2 Add dullahan 2015-10-29 17:46:00 -04:00
skizzerz
16db66677c Complete doomsayer (untested) 2015-10-29 01:24:27 -05:00
Vgr E. Barry
3571d664ed Some succubus fixes 2015-10-29 00:06:00 -04:00