Commit graph

90 commits

Author SHA1 Message Date
jesopo
73232b40e1 new_event doesn't exist when check_success is false 2019-11-25 10:43:30 +00:00
jesopo
be44244a71 reimplement send.stdout/send.stderr events 2019-11-22 17:29:49 +00:00
jesopo
5730d6fe59 refactor commands (mostly stdout/stderr) and split typing/reply out
closes #208
2019-11-22 16:23:30 +00:00
jesopo
72d418a307 pattern-url isn't used anymore 2019-11-20 17:06:37 +00:00
jesopo
050bfd29f7 args_split shouldn't be [""] when args is empty 2019-11-20 12:03:02 +00:00
jesopo
17edb1c8cb move command aliases out to their own module (aliases.py) 2019-11-20 11:34:36 +00:00
jesopo
6a55b14afa only try to shlex when we know we've found a command hook 2019-11-15 13:26:11 +00:00
jesopo
64ab4ca1a1 we should be passing args in to _find_command_hook, not args_split 2019-11-15 12:37:43 +00:00
jesopo
35cdc5321f implement opt-in shlex for command args
closes #202
2019-11-15 11:33:52 +00:00
jesopo
7d1cdd2251 prepend user nickname to command error messages 2019-11-11 13:26:14 +00:00
jesopo
5dc1ea3ffa move on to command.regex if a given command isn't found 2019-11-06 13:05:41 +00:00
jesopo
7ee65f8f8c remove src/utils/irc/protocol.py 2019-10-28 10:56:33 +00:00
jesopo
95f098b6d6 pass whether a command.regex trigger was an ACTION or not 2019-10-03 16:42:11 +01:00
jesopo
afb07f6531 only check arg number at all when not "$-" 2019-09-30 16:33:21 +01:00
jesopo
0a1a3551a2 support "$-" for alias arg, meaning "0 or more args" 2019-09-30 10:15:12 +01:00
jesopo
30588da3a7 returned is now a tuple; we want message 2019-09-26 12:19:50 +01:00
jesopo
2e80b223de allow all preprocess.command and check.command failures to have a message 2019-09-26 12:14:55 +01:00
jesopo
4bb20c49dd make !silence effect min_args and unknown-command
closes #160
2019-09-26 11:56:14 +01:00
jesopo
04489ce90a return command (in case resolved alias) from _find_command_hook() 2019-09-12 21:53:52 +01:00
jesopo
203216d94d Switch more settings to FunctionSettings 2019-09-04 14:27:10 +01:00
jesopo
85efd75518 'usage' does not exist 2019-09-01 08:34:55 +01:00
jesopo
25b507e80c Refactor hook kwargs to be stored as a list of tuples to support key duplicates
closes #108
2019-07-28 12:35:04 +01:00
jesopo
e7e32c0978 Show warning for private-only commands in channels and visa versa
closes #89
2019-07-11 13:31:35 +01:00
jesopo
84df0cb054 only set last_stdout/last_stderr when there's actually output 2019-07-07 11:29:22 +01:00
fosslinux
d7f72b642a fix typo; closes issue #80 2019-07-06 17:06:17 +10:00
jesopo
72840fc63f add bot-wide command-method option 2019-07-04 14:06:40 +01:00
jesopo
6a823fac52 don't overwrite command_check_self() 2019-07-01 19:20:36 +01:00
jesopo
fda9869690 Add check.command.is-channel handler in commands module 2019-07-01 13:51:13 +01:00
jesopo
a732bcfc25 Only accept highlight-commands when they have "," or ":" 2019-06-28 23:33:14 +01:00
jesopo
ae9d099a41 Refactor set/channelset/serverset/botset in to 'utils.Setting' objects 2019-06-28 23:16:05 +01:00
jesopo
d2a1763dc8 'call_unsafe_for_result' -> 'call_for_result_unsafe' 2019-06-26 11:04:41 +01:00
jesopo
29b15da179 Switch all 'hook.kwargs.get(' calls to 'hook.get_kwarg(' 2019-06-26 10:59:52 +01:00
jesopo
6667f49ee3 dont use "|" multi-event syntax. it's weird 2019-06-26 10:59:03 +01:00
jesopo
7f0af15e2d send is_channel kwarg on unknown.command event 2019-06-24 22:54:34 +01:00
jesopo
3f84c9871a Fire an event when a user tries an unknown command 2019-06-24 22:53:28 +01:00
jesopo
d3dda297e6 Don't exclude !commands from IRCBuffer objects 2019-06-20 11:55:58 +01:00
jesopo
282bde82c5 Move !ignore logic to it's own file 2019-06-20 11:51:04 +01:00
jesopo
6d034c3b42 Move !help to it's own module and entirely rework its interface 2019-06-18 17:34:16 +01:00
jesopo
98e1202c78 Allow command.regex hooks to opt-in to being triggered from a /me
closes #68
2019-06-16 18:40:25 +01:00
jesopo
c9de95f44a forgot to pass stdout and stderr to command callbacks! 2019-06-16 09:51:45 +01:00
jesopo
8ab4880c5c Change from yield checks to a func in events that pass up EventErrors 2019-06-15 18:42:14 +01:00
jesopo
3fad17d1b9 catch StopIteration.value, pass back EventError that comes from a generator 2019-06-14 12:48:26 +01:00
jesopo
f614d1fc14 add self check.command, change !config to use new yields 2019-06-14 12:09:42 +01:00
jesopo
f05fc209b0 Add a way to __or__ utils.Checks, as a "if one of these passes" thing 2019-06-14 12:01:55 +01:00
jesopo
d7fa2cfa24 Catch yields in command callbacks for e.g. permission checks 2019-06-14 11:42:12 +01:00
jesopo
321bd7acf4 check stdout/stderr has_text() before .send() gets rid of it 2019-06-07 16:21:19 +01:00
jesopo
b1d07859c3 actually return ret 2019-06-07 16:21:11 +01:00
jesopo
8e6835be3c Only show typing indicators for commands that expect output 2019-06-07 15:57:15 +01:00
jesopo
5f47d86708 Send +draft/typing tag when processing commands 2019-06-07 15:30:53 +01:00
jesopo
d281f5ef17 Remove +draft/typing TAGMSG - that was for testing 2019-06-06 21:16:39 +01:00