Commit graph

110 commits

Author SHA1 Message Date
jesopo
6b042d9460 Split command StdOut/StdErr in to their own file (commands) 2019-02-09 17:49:01 +00:00
jesopo
ac16887c48 Reply to statusmsg commands (e.g. '/msg +channel !ping') with the same statusmsg 2019-02-04 21:32:44 +00:00
jesopo
a2e23acc61 Logging takes format params as a separate arg (commands.py) 2019-01-30 19:39:03 +00:00
jesopo
72072bbd3d Make sure to call the specific hook we've decided is valid (commands.py) 2019-01-30 19:35:43 +00:00
jesopo
0e66921d34 Break when we've found a suitable command hook (commands.py) 2019-01-30 19:15:11 +00:00
jesopo
051e4347f9 Actually remove call to preprocess.command to after min_args check
(commands.py)
2019-01-30 11:41:25 +00:00
jesopo
f25bfd0ae2 Correctly check if we're in a channel command before checking if the current
hook is valid (commands.py)
2019-01-30 11:37:47 +00:00
jesopo
c822a1afd6 Check min_args before we check if a user has permission (commands.py) 2019-01-30 11:37:29 +00:00
jesopo
fc4a8d8e34 We should be using potential_hook until we've decided on a valid hook
(commands.py)
2019-01-30 11:26:54 +00:00
jesopo
64d12e3415 Get all hooks when checking command hooks, not just the first (commands.py) 2019-01-30 11:23:17 +00:00
jesopo
8a832b7230 Check all hooks for a command and pick the first applicable one, to allow for
private_only and channel_only commands to share the same command string
(commands.py)
2019-01-30 11:20:14 +00:00
jesopo
2071a10180 Support a way to check user channel access in a private command
(channel_access.py)
2019-01-30 11:16:34 +00:00
jesopo
a501fdea1f Stop processing a command when we've decided the user doesn't have permission
(commands.py)
2019-01-29 15:38:04 +00:00
jesopo
7937be5128 Don't double up command prefix in !usage output (commands.py) 2019-01-29 08:36:47 +00:00
jesopo
f97c1f02fd Actually show the command prefix we now pass to _get_usage (commands.py) 2019-01-29 08:33:32 +00:00
jesopo
79ff20b66a Show command prefix in usage strings (commands.py) 2019-01-29 08:32:22 +00:00
jesopo
5d47e7e895 Add a permission to !ghwebhook so an admin user can use it without +o (github) 2019-01-29 08:06:59 +00:00
jesopo
549332db38 Check a return is truthy before we decide it's an error (command.py) 2019-01-28 23:57:12 +00:00
jesopo
ee1770cc08 Typo, force_success -> force_success = False (commands.py) 2019-01-28 23:52:30 +00:00
jesopo
d10a6d94c1 Add a way to force success and force failure of a command permission check
(commands.py)
2019-01-28 23:29:52 +00:00
jesopo
335f1545a8 Give StdOut.send the new method param (commands.py) 2019-01-25 07:11:45 +00:00
jesopo
26603c23ac Also pass method to StdOut/StdErr Send() when a send.stdout or
`send.stderr` event is sent (commands.py)
2019-01-23 21:39:05 +00:00
jesopo
64cb723901 Move logic to get command-method out of Out object (commands.py) 2019-01-23 20:35:28 +00:00
jesopo
5dc5e3fbfd LIGHTGREEN -> GREEN for successful commands (commands.py) 2019-01-17 21:10:12 +00:00
jesopo
eadb49d41a Don't use bolding for command colors (commands.py) 2019-01-11 20:57:52 +00:00
jesopo
3d60d59510 We need to normalise between a single usage string and multiple (making both
lists) to reuse the formatting code (commands.py)
2018-12-29 21:38:03 +00:00
jesopo
ee8d3a6287 Remove an erroneous level of indentation that prevented the command being
prepended to a usage string when only 1 usage string was available (commands.py)
2018-12-29 21:35:06 +00:00
jesopo
bd8ca2083b Typo, 'aliase' -> 'aliases' (commands.py) 2018-12-22 01:06:42 +00:00
jesopo
be1d06796b Add !removealias (commands.py) 2018-12-22 01:05:47 +00:00
jesopo
3039119f4a Actually set new args_split (commands.py) 2018-12-22 01:02:55 +00:00
jesopo
ae5eb9fc47 .partition returns a tuple of 3 (commands.py) 2018-12-22 01:01:25 +00:00
jesopo
498c1d647e Add basics of a command alias system 2018-12-22 01:00:38 +00:00
jesopo
44d2455766 This regex should have been r"" (commands.py) 2018-12-22 00:49:00 +00:00
jesopo
8b9062b942 Better constifying of color/font chars 2018-11-13 16:02:26 +00:00
jesopo
fad4715b5c Add "prefixed-commands" to !channelset 2018-11-12 23:00:51 +00:00
jesopo
0c8678d44f Add a way to tell bitbot to only response to highlight-based commands (e.g. "bitbot: ping") but ignore prefixed commands (e.g. "!ping") 2018-11-12 22:59:21 +00:00
jesopo
49a21b2d36 Add a way to prevent responses to commands at all in specific channels 2018-11-12 22:55:40 +00:00
jesopo
1696492a78 Add ability to hide [Prefix] from command outputs 2018-11-07 11:27:10 +00:00
jesopo
24e4e2c5ad Add a way to silently stop commands executing in modules/commands.py
(preprocess.command)
2018-11-02 11:13:43 +00:00
jesopo
4fcb80b834 serverset identity-mechanism should be in modules/permissions.py 2018-11-02 11:08:03 +00:00
jesopo
b34f4d70a5 Remove extra ) in modules/commands.py 2018-10-28 11:54:55 +00:00
jesopo
5553ac9e49 Typo in modules/command.py, 'is' -> 'if' 2018-10-28 11:53:31 +00:00
jesopo
ec72787f86 Support multiple "usage" values in commands.py 2018-10-28 11:50:56 +00:00
jesopo
547c57c8b8 str(utils.EventError) should be written to stderr, not stdout 2018-10-16 15:15:20 +01:00
jesopo
42a1cda92c 'EventManager.EventError' -> 'utils.EventError' in modules/commands.py 2018-10-16 14:49:01 +01:00
jesopo
ba3cd00c78 Add utils.EventError, utilise it for stderr in commands.py/coins.py 2018-10-16 14:47:01 +01:00
jesopo
376825ea96 Mark command hooks that are aliases ('g' vs 'google') 2018-10-10 10:42:41 +01:00
jesopo
b778ad2902 Support denoting command response [prefix] in docstring 2018-10-04 11:04:24 +01:00
jesopo
09b6f52d8e Fix showing usage when a user doesn't provide enough args to a command 2018-10-03 17:01:26 +01:00
jesopo
02e76444d1 Add 'remove_empty' kwarg for commands, to strip out empty space 2018-10-03 17:01:10 +01:00