Commit graph

106 commits

Author SHA1 Message Date
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
74d9bf4da3 _messag_factory._ should take a tags arg 2019-10-28 11:24:56 +00:00
jesopo
e6b4321f30 '_mesage_factory' -> '_message_factory' 2019-10-28 11:23:55 +00:00
jesopo
627e564dbd _mess_factory -> _message_factory. funny typo lol 2019-10-28 11:23:02 +00:00
jesopo
7ee65f8f8c remove src/utils/irc/protocol.py 2019-10-28 10:56:33 +00:00
jesopo
8f4b5a0e70 move IRCLine related code from utils.irc to IRCLine.py 2019-10-27 10:19:00 +00:00
panicbit
c94327b58b Remove @staticmethod 2019-10-12 18:30:22 +02:00
panicbit
d069d4b83f Adjust line splitpoints to word boundaries 2019-10-09 20:54:42 +02: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
5cae13edba replace \n\n with \n in command outputs 2019-07-15 14:27: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
d30f01670e Allow commands to append to out/err prefix 2019-07-03 14:04:24 +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
938e1db963 add margin arg to ParsedLine.truncate so commands/outs.py doesn't do it
manually and cause potential issues with multi-byte chars
2019-06-19 10:34:42 +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
b3b8c6534b Remove debug prints 2019-06-18 16:51:00 +01:00
jesopo
621830c360 Simplify SentLine by shifting truncation to ParsedLine (and commands.outs) 2019-06-18 14:14:37 +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