Commit Graph

33 Commits

Author SHA1 Message Date
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
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
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
Vgr E. Barry
e8aff5d0c3 Small change to allow stacking of cmd decorators 2016-04-09 14:07:39 -04:00
Vgr E. Barry
a5c9541543 Make sure handle_error(im) is failproof 2015-12-13 10:32:58 -05:00
skizzerz
747249991e Add botconfig.OWNERS_ONLY_COMMANDS to further restrict commands 2015-11-16 12:11:52 -07:00
Lane Farrow
a4e21aa997 move irc messages to json and allow overriding in custom file 2015-11-10 19:58:50 -06:00
Vgr E. Barry
bb8041e0fd Fixed some protected functions not working 2015-11-04 14:19:02 -05:00
Vgr E. Barry
8c0582477e Some tweaks to the error handler 2015-11-04 13:16:35 -05:00
Vgr E. Barry
b28d4bf6e3 Properly fix the error handler 2015-11-04 12:41:47 -05:00
jacob1
55070fd44b add utilities.py, which contains some functions possibly needed by gamemode events
this also fixes it so priest death events finally happen
2015-10-30 17:03:54 -04:00
skizzerz
26e7acc8f8 More fallow/fdeny fixes
- Always apply host-based allows/denies even in var.ACCOUNTS_ONLY is set
- Fix display of mixed-mode allows/denies for a particular user
- Make -acc and -host switches operate more intelligently on both the
  bare command as well as when given an argument
2015-10-18 20:56:27 -05:00
skizzerz
f5ec9c9627 Expand host-based variabls to take full-on hostmasks
This allows for things like making ADMINS/OWNERS take a full hostmask,
or fallowing/fdenying a full hostmask with wildcards. It also allows for
a distinction between two people that share a hostmask but have a
different ident.

stasis now checks all matching stasis and returns the highest amount

fallow/fdeny have two new options -acc and -host to explicitly specify
what type the argument is

-cmds in fallow/fdeny show commands from all matching masks, to bring it
in line with how actual allow/deny parsing works, before it would only
show the first match
2015-09-03 19:38:59 -05:00
Vgr E.Barry
7c9b5ce51b Fix decorators 2015-07-31 13:29:26 -04:00
skizzerz
93345c990d Make DISABLE_ACCOUNTS actually disable account-related stuff.
Right now the only thing that still tracks accounts if DISABLE_ACCOUNTS
is True is stats stuff (in sqlite), as I'm unsure of how we want to
handle that for when accounts aren't enabled; likely track by nick but
unsure on that right now.

This further implements issue #112 but doesn't fix it entirely yet.
2015-07-19 14:37:17 -05:00
Vgr E.Barry
5c6a14154e Change !help to not display aliases
Also improve message splitting and remove string concatenation to use
faster and more memory-efficient methods
2015-06-18 23:20:56 -04:00
nyuszika7h
dd2d82392d Reorganize imports 2015-06-15 15:20:27 +02:00
skizzerz
4d15ee0421 Revert "Speed up startup time a bit"
This reverts commit 77d1eda074.

Let's not use "private" modules for nonexistent performance boosts.
2015-06-14 22:25:58 -05:00
Vgr E.Barry
77d1eda074 Speed up startup time a bit
_collections is the C implementation (and where defaultdict lies), and
is as such already loaded when the interpreter is launched. collections
imports a bunch of other useless stuff we're not interested in.
2015-06-14 23:13:49 -04:00
nyuszika7h
1591655c68 Log admin commands to audit.log as well 2015-06-14 17:45:46 +02:00
Vgr E.Barry
6a7f9fe906 Fix denied commands still triggering
...
2015-06-05 22:58:38 -04:00
Vgr E.Barry
910fd0a8cb Fix decorators erroring with every message 2015-06-04 19:51:21 -04:00
Vgr E.Barry
4382d91008 Modify hook handling 2015-06-04 10:55:53 -04:00
Vgr E.Barry
49f0ba220b Modify all commands call to properly call the commands 2015-06-04 10:50:10 -04:00
Vgr E.Barry
dcc23ce554 Modify how permissions are checked 2015-06-04 09:45:31 -04:00
Vgr E.Barry
b6211748a1 Add the 'phases' and 'silenced' arguments to the cmd decorator 2015-06-04 09:44:34 -04:00
Vgr E.Barry
f1285d2237 Tweak the decorators to no longer have mangled __call__ 2015-06-03 11:09:26 -04:00
Vgr E.Barry
ca2e901d58 Mass overhaul to the decorators 2015-06-01 16:37:22 -04:00
jacob1
338f24aa66 fix bug where players in var.DISCONNECTED couldn't use any commands (like !stats) 2015-05-28 21:01:34 -04:00
nyuszika7h
599ad45544 Reorganize imports 2015-04-07 12:01:59 +02:00
Vgr E.Barry
378334478c Move files around and update references 2015-04-04 07:39:54 -04:00