Commit graph

1038 commits

Author SHA1 Message Date
jesopo
e0686ef7b4 support command spec literals 2020-01-26 02:01:18 +00:00
jesopo
c3bb46ad23 only show "not enough arguments" n>len(args) 2020-01-26 02:00:43 +00:00
jesopo
b83e066dad show topic timestamp in a more human readable format 2020-01-26 00:49:31 +00:00
jesopo
1d1e2d95a9 split utils/parse.py in to multiple files 2020-01-26 00:06:47 +00:00
jesopo
b24d62c0e6 update !ignore to use command specs 2020-01-25 23:59:00 +00:00
jesopo
ced3bb23da "time" spec arg renamed to "duration" 2020-01-25 23:58:09 +00:00
jesopo
1a8a4ac9d4 support spec arg "context" (e.g. private only), marked exported as private 2020-01-25 23:57:27 +00:00
jesopo
6a3702577f when available, use command spec for !help usage 2020-01-25 23:15:02 +00:00
jesopo
0c28d63822 add utils.parse.argument_spec_human() for usage strings 2020-01-25 22:56:56 +00:00
jesopo
bd33ea5d8a implement default spec argument types 2020-01-25 22:56:06 +00:00
jesopo
478223f88c support type names of spec arguments 2020-01-25 21:17:35 +00:00
jesopo
341b314104 change command specs to be compiled at runtime by a decorator 2020-01-25 14:01:11 +00:00
jesopo
264e544ce5 support !... as "one or more", show "not enough args" error 2020-01-25 11:33:09 +00:00
jesopo
1d9621022c remove debug print 2020-01-25 11:32:49 +00:00
jesopo
5722a567a1 fix format_token_replace for $$ 2020-01-25 11:32:01 +00:00
jesopo
09fa9363b3 support e.g. "!r~channel" spec to change the context of "!cuser" 2020-01-24 17:00:55 +00:00
jesopo
241382fe66 add some comments about all the command_spec spec types 2020-01-24 16:50:25 +00:00
jesopo
e16831cc83 better "!user" spec error 2020-01-24 16:42:23 +00:00
jesopo
f51b06aae1 check "channel" coming from command_spec.py parsing (check_mode, channel_access) 2020-01-24 16:26:53 +00:00
jesopo
f0d8853549 implement "important" command spec pieces, esp. for channel perms 2020-01-24 16:25:50 +00:00
jesopo
def6a019d6 don't args[0] for rchannel when [], better rchannel error 2020-01-24 15:35:05 +00:00
jesopo
47cb5eaab8 utils.parse.timed_args() min_args should be optional 2020-01-24 15:30:32 +00:00
jesopo
4e2f463d39 add ruser/rchannel (r for relevant) to command_spec.py 2020-01-24 15:29:13 +00:00
jesopo
52c3cab627 still append None when an optional spec is missed 2020-01-24 14:27:47 +00:00
jesopo
fa98b72fd5 first draft of command_spec.py 2020-01-24 14:24:54 +00:00
jesopo
a9a9cd816b channel.send_mode() BEFORE calling self.join event 2020-01-24 10:37:41 +00:00
jesopo
cf544d66f9 extraneous newline 2020-01-23 17:41:57 +00:00
jesopo
f6e6dd0339 remove received.server-notice related code 2020-01-23 14:08:58 +00:00
jesopo
d919e5c345 simplify snotice detection, handle as normal NOTICE 2020-01-23 13:10:45 +00:00
jesopo
ab2ed90ef9 set_own_nickname before sending self.nick event 2020-01-23 12:51:18 +00:00
jesopo
4515cf84e1 support WATCH as well as MONITOR nick nick_regain.py 2020-01-23 12:50:58 +00:00
jesopo
022eed84f6 pull mode for RPL_(ENDOF)QUIETLIST from args[2] 2020-01-23 12:34:18 +00:00
jesopo
ef2d80511d only check missed modes if our mode changes and MODE #chan responds 2020-01-23 12:23:27 +00:00
jesopo
cded6b6877 only query missing list modes on MODE when we're seen ENDOFWHO 2020-01-23 12:09:45 +00:00
jesopo
9ac2fe96fe changed failed list modes after ENDOFWHO, not when our mode changes 2020-01-23 11:45:51 +00:00
jesopo
007fd1206c add typehint for IRCChannel.mode_lists 2020-01-22 18:01:22 +00:00
jesopo
2a33b25930 correctly support INVEX and EXCEPTS lists 2020-01-22 17:58:12 +00:00
jesopo
811b85d0f9 move mode list (beIq e.g.) to it's own module, mode_lists.py 2020-01-22 17:41:20 +00:00
jesopo
175e8c0a16 change utils.irc.strip_font() to remove tokens, no regex 2020-01-22 16:32:21 +00:00
jesopo
f79aa036f2 fix hostmask_match_many typehint 2020-01-22 15:04:48 +00:00
jesopo
ade5cbb1f3 add an optional mask pattern arg to !clear 2020-01-22 15:00:59 +00:00
jesopo
64848f5ab7 add a special "require_mode" arg; "highest" meaning "highest mode possible" 2020-01-22 14:12:48 +00:00
jesopo
b6f18f809c add a special "require_mode" arg; "admin" meaning "above op if available" 2020-01-22 14:10:45 +00:00
jesopo
5258b8cc8f typo; 'resaon' -> 'reason' 2020-01-22 12:46:07 +00:00
jesopo
cabc5942b4 server should be IRCServer, not IRCChannels 2020-01-22 12:28:05 +00:00
jesopo
1c5d67f836 parse proposed ISUPPORT QUIET token 2020-01-22 11:19:44 +00:00
jesopo
369160d46f allow requesting utils.irc.color() to not add terminating code 2020-01-21 16:40:01 +00:00
jesopo
c336fdf93b split permission for !alias/!balias in to two 2020-01-21 16:14:01 +00:00
jesopo
fb457c52fb IRCBuffer.find's not_pattern arg should be optional 2020-01-20 16:28:50 +00:00
jesopo
119066b549 user varaible doesn't exist in invite formatting code
closes #231
2020-01-20 14:17:50 +00:00
jesopo
6b0bb512ef colourise server name for server notice formatting 2020-01-20 14:12:37 +00:00
jesopo
0abcc173cd {~TNICK}, not {TNICK} 2020-01-20 14:00:20 +00:00
jesopo
5a0a340e44 better formatting for server notices 2020-01-20 13:48:50 +00:00
jesopo
1f2beef0f5 pass :source or connection_params.hostname through server-notice event 2020-01-20 13:48:29 +00:00
jesopo
8fbf91a2f0 show account and realname in JOIN formatting when available 2020-01-20 13:42:36 +00:00
jesopo
c6d913e218 provide {NICK} as well as {~NICK} as default formatting args 2020-01-20 13:25:33 +00:00
jesopo
dba3f7abc3 .zfill(3) milliseconds in utils.datetime.datetime_human 2020-01-20 13:24:58 +00:00
jesopo
cb73507c5e use a TimeSpec system to request milliseconds in utils.datetime 2020-01-20 13:20:26 +00:00
jesopo
fbe4c93c58 don't overwrite line in MOTD formatting 2020-01-20 13:20:08 +00:00
jesopo
50be75a5e2 also do .format(**) when there's no user object 2020-01-20 13:19:47 +00:00
jesopo
0eb92278cc do all user-provided formatting as {VAR} formatting
otherwise, e.g., a PRIVMSG with {~NICK} will be replaced with user nickname
2020-01-20 12:07:04 +00:00
jesopo
631e669426 _on_topic doesn't always have a user 2020-01-17 18:13:35 +00:00
jesopo
ba5d79c953 fix utils.datetime.iso8601_parse linting error 2020-01-17 16:37:31 +00:00
jesopo
9efe952a9f BufferLine.id should be a string 2020-01-17 16:37:22 +00:00
jesopo
b4e3ee5d0e pass draft/delete events through to format_activity/print_activity 2020-01-17 16:28:48 +00:00
jesopo
95668f2b8b give BufferLine.id default value, overwrite in ircv3_msgid.py 2020-01-17 16:28:23 +00:00
jesopo
5c7026886d overwrite BufferLine.timestamp with ircv3 server-time when available 2020-01-17 15:58:37 +00:00
jesopo
3e574f3c52 add BufferLine.timestamp (datetime.datetime object) 2020-01-17 15:58:08 +00:00
jesopo
e4d71f6c0c add dateutil as a dependency, use it in utils.datetime.iso8601_parse 2020-01-17 15:57:30 +00:00
jesopo
ae7c6d8572 export function for formatting activity lines 2020-01-17 15:36:34 +00:00
jesopo
e3070f52ff refactor format_activity to use {FORMATTING} for maybe-colored things 2020-01-17 15:31:12 +00:00
jesopo
a79f866269 tidy up IRCBuffer.find, respect line.deleted there too 2020-01-17 14:27:45 +00:00
jesopo
44644dcd56 allow BufferLines to be marked as deleted 2020-01-17 14:19:46 +00:00
jesopo
f8b509ef94 give ever BufferLine an ID (IRCv3 msgid or uuid4()) 2020-01-17 14:19:30 +00:00
jesopo
10006a9986 catching account-tag should be PRIORITY_HIGH 2020-01-16 09:50:37 +00:00
jesopo
c180900929 pay attention to account tag on PRIVMSGs 2020-01-16 09:47:57 +00:00
jesopo
21694c39a5 allow !part to work for "current channel" when op/!access 2020-01-13 20:06:32 +00:00
jesopo
6633427cb7 send expect_output on private command events too 2020-01-11 19:20:30 +00:00
jesopo
d06d74efb9 default pattern-based commands to expect_output=False 2020-01-11 19:10:19 +00:00
jesopo
ba958f341b also Accept-Language "en" in HTTP requests (0.5 weight) 2020-01-11 17:55:18 +00:00
jesopo
366a7bf326 Revert "explicitly .close() task in http.request_many()"
This reverts commit 7478d62b77.
2020-01-06 17:17:49 +00:00
jesopo
7478d62b77 explicitly .close() task in http.request_many() 2020-01-06 17:04:30 +00:00
jesopo
e9f82fc645 sort variable $names descending so longer ones are caught first 2020-01-03 06:59:22 +00:00
jesopo
9efb0b05fc by default, don't trigger command.regex events when in a statusmsg 2020-01-01 10:04:32 +00:00
jesopo
627b17e894 pass through (as well as stripping) statusmsg characters to events 2020-01-01 10:04:06 +00:00
jesopo
9dc6069e06 add missing closing paren to bitbot's User Agent 2019-12-29 08:00:05 +00:00
jesopo
e3455f94fb only respect CASEMAPPING when it's not an empty string 2019-12-27 21:34:08 +00:00
jesopo
cff1a55fe6 actually replace "$$" with "$" 2019-12-27 13:55:55 +00:00
jesopo
f2eba715b4 i should shift righwards also when finding double sigil 2019-12-27 13:50:12 +00:00
jesopo
a9c5b1dd83 remove extraneous space in "MONITOR -" command 2019-12-25 01:42:21 +00:00
jesopo
a5e7767f80 refactor nick_regain, also look for NICK/QUIT for regain 2019-12-25 01:41:01 +00:00
jesopo
b2c5ad041c simplify token replace, catch one-char end-of-string tokens 2019-12-21 21:40:44 +00:00
jesopo
2218d4a888 use utils.parse.format_token_replace() in aliases.py 2019-12-21 21:17:08 +00:00
jesopo
bc1c77d8a8 implement standardised $token replacement in utils.parse 2019-12-21 21:16:50 +00:00
jesopo
b0a71f8bb2 don't have [''] as args_split when there's no args (for alias) 2019-12-21 21:16:14 +00:00
jesopo
3c77793490 only look at 329 when it's a channel we know we are in 2019-12-20 22:03:40 +00:00
jesopo
a2ac26c072 use +=timedelta(minutes=1) when calculating next minute
closes #223
2019-12-19 14:02:55 +00:00
jesopo
e458127fb5 move --database/data-dir/log-dir to bot.conf, do some work for diff db engines 2019-12-19 13:56:58 +00:00
jesopo
cfcccdd37b we no longer use DECODE_CONTENT_TYPES 2019-12-18 20:04:14 +00:00
jesopo
1fedaf02bd 'hostmaks' -> 'hostmask' typo in code for !hostmask add 2019-12-18 19:36:52 +00:00