Commit graph

162 commits

Author SHA1 Message Date
jesopo
bdcb4b5db2 Add missing ":" 2019-04-25 17:50:41 +01:00
jesopo
1240b154cb Support interfaces that don't have AF_INET and/or AF_INET6 2019-04-25 17:48:51 +01:00
jesopo
7643a962bd Refuse to get the title for any url that points locall 2019-04-25 15:58:58 +01:00
jesopo
dffee4d223 Move REGEX_URL out of isgd.py and title.py in to utils.http 2019-04-24 15:46:54 +01:00
jesopo
e095c56f77 Record and show when a !to was created 2019-04-24 14:32:56 +01:00
jesopo
032f6fbc3b IRCServer.alias is no longer optional 2019-04-24 11:45:21 +01:00
jesopo
87340bcbf9 change utils.iso8601_format to default to no milliseconds, switch to using
utils.iso8601 functions in badges.py
2019-04-23 21:27:43 +01:00
jesopo
0eaeca8f83 Put spaces between units in output from utils.to_pretty_time 2019-03-21 17:59:42 +00:00
jesopo
5d7f017c9c Enum values shouldn't be all upper case 2019-03-10 13:14:25 +00:00
jesopo
6b59830a6e Only print ANSI reset characters when appropriate 2019-03-06 21:48:31 +00:00
jesopo
197ae2e053 Raise a specific exception in utils.http.request for "wrong content type" 2019-02-28 23:28:45 +00:00
jesopo
9335ca5d16 Treat both a and a= as None for message-tags 2019-02-27 22:20:01 +00:00
jesopo
846b881e52 Throw ValueError when utils.http.request tries to soup non-html/xml data 2019-02-27 15:16:08 +00:00
jesopo
cfaf6864fc Don't try to parse non-html/xml stuff with BeautifulSoup 2019-02-26 11:18:50 +00:00
jesopo
d627ed49e2 Pull "is main thread" logic out to utils, force Database to be accessed on main
thread
2019-02-25 10:36:17 +00:00
jesopo
8c94bcf6ca Move utils.irc.IRCParsedLine to IRCLine.ParsedLine, improve truncation
mechanism, don't convert sent line from ParsedLine to text to ParsedLine for
line_handler handling
2019-02-23 21:33:04 +00:00
jesopo
c6699c509e .upper() command in IRCParsedLine.format() 2019-02-23 16:11:26 +00:00
jesopo
54218b747f Only allow the last arg of a formatted line to be :trailing 2019-02-23 16:07:20 +00:00
jesopo
47c2cbb0fa Split line_handler.py out in to different files for different categories 2019-02-22 11:23:36 +00:00
jesopo
62eab40968 Revert "Treat both a and a= as having a value of None in message-tags (utils.irc)"
This reverts commit e7ec4b5716.
2019-02-21 07:29:19 +00:00
jesopo
e7ec4b5716 Treat both a and a= as having a value of None in message-tags (utils.irc) 2019-02-20 22:26:31 +00:00
jesopo
ddb69685d3 again, r"\" isn't valid. 2019-02-20 16:53:40 +00:00
jesopo
98215f66eb r"\" isn't valid - use "\\" (utils.irc) 2019-02-20 16:52:14 +00:00
jesopo
c1881fbafb Remove '\' from post-unescaped message-tags 2019-02-20 16:34:14 +00:00
jesopo
47841ed154 don't replace '\\' with '\\' with message-tag unescape 2019-02-20 16:33:48 +00:00
jesopo
81d82413d4 draft/message-tags-0.3 (JSON tags) was rejected 2019-02-20 14:46:40 +00:00
jesopo
577fae7cea Don't pass None around as tag default, fix some missing return type args 2019-02-19 15:57:00 +00:00
jesopo
3f8ac871ed typo, 'utls' -> 'utils' (utils.irc) 2019-02-19 15:44:23 +00:00
jesopo
114d1054a5 Add .message( and .notice( to IRCSendBatch 2019-02-19 15:41:17 +00:00
jesopo
bc772ef5cc Default IRCParsedLine.tags to empty dict, not None 2019-02-19 15:40:56 +00:00
jesopo
53e5a7fe7e contextualise JOIN key check, otherwise it doesn't send channel_name 2019-02-19 09:32:17 +00:00
jesopo
9f946e236d copy paste fail, batch end should be "-" not "+" 2019-02-19 08:25:25 +00:00
jesopo
b76b153672 Add batch_start and batch_end to utils.irc.protocol 2019-02-18 23:11:36 +00:00
jesopo
509a7ff42e Default tags to null for utils.irc.protocol's message and notice 2019-02-18 23:06:41 +00:00
jesopo
07cb14d98c utils.irc.protocol.join()'s keys param should be typing.Optional 2019-02-18 23:03:21 +00:00
jesopo
3bb917b619 Add src/utils/irc/__init__.py that should have been added some commits ago 2019-02-18 23:00:50 +00:00
jesopo
cd97a653cc Don't try to use keys if we try to join a channel without any keys 2019-02-18 15:00:05 +00:00
jesopo
186b6b82a2 Shift formatting protocol data to it's own file: utils.irc.protocol 2019-02-18 14:58:27 +00:00
jesopo
d937145f93 Add missing : 2019-02-18 13:54:09 +00:00
jesopo
6da35a899b don't pass around has_arbitrary - we don't need it. 2019-02-18 12:42:52 +00:00
jesopo
cb0314da67 Put a helper function in utils to do iso8601 formatting. change IRCServer's
last-read setting to use it.
2019-02-17 14:15:40 +00:00
jesopo
1136162057 Fix 'Optional[str]!=str' type hinting issue in utils.irc line parsing 2019-02-13 11:00:22 +00:00
jesopo
e1de8cd9be We were just checking if arbitrary was falsey, thus losing empty trailing args
(' :' with nothing after it) (utils.irc)
2019-02-12 20:42:09 +00:00
jesopo
b4092a14ca Also strip \x01 off the start of CTCP commands, if it's there (utils.irc) 2019-02-12 16:49:24 +00:00
jesopo
86bc49a0a1 Only put a ":" on trailing args when it's required 2019-02-12 13:55:57 +00:00
jesopo
01a7c05687 Change arg types of constant_time_compare to typing.AnyStr (utils.security) 2019-02-12 11:59:55 +00:00
jesopo
9667b8a6e0 Move constant-time compare function to utils.security 2019-02-12 11:57:49 +00:00
jesopo
8c9626f0a9 Put an strf format for ISO8601 in utils 2019-02-12 11:08:24 +00:00
jesopo
2f5a232c4e Hold on to tags and type for BATCHes 2019-02-11 22:15:12 +00:00
jesopo
bd9eaad0b2 Return truncted data from encode_truncate and hold it in IRCLine.Line 2019-02-10 18:16:19 +00:00