Commit graph

427 commits

Author SHA1 Message Date
jesopo
ee8c7813f7 Add IRCServer.send_raw so modules don't have to parse messages before sending
them
2019-04-16 13:47:45 +01:00
jesopo
34848324d5 Bump version to v1.4.0 2019-04-16 09:59:40 +01:00
jesopo
272b60842e 'IRCChannels._get_id' -> 'IRCChannels.get_id' 2019-04-07 13:59:53 +01:00
jesopo
0eaeca8f83 Put spaces between units in output from utils.to_pretty_time 2019-03-21 17:59:42 +00:00
jesopo
10ca8a1219 Add IRCUser.hostmask() to format nick/user/host in to a hostmask 2019-03-12 10:39:54 +00:00
jesopo
5d7f017c9c Enum values shouldn't be all upper case 2019-03-10 13:14:25 +00:00
jesopo
1fcbdd305c 'failed to connect' log line needs 2 "%s"s 2019-03-09 20:21:15 +00:00
jesopo
5c5b4ef139 Handle negative (end-relative) indexes being given to IRCArgs.get 2019-03-08 23:35:52 +00:00
jesopo
f1348e5679 Handle IRCArgs being empty strings (e.g. 'PRIVMSG #test :') 2019-03-08 23:23:09 +00:00
jesopo
b3472c009a Only log exception message, not full stacktrace, when a connect fails 2019-03-08 10:12:01 +00:00
jesopo
6b59830a6e Only print ANSI reset characters when appropriate 2019-03-06 21:48:31 +00:00
jesopo
1b7a8bc896 Log content of lines that need fallback encoding 2019-03-06 17:19:37 +00:00
jesopo
c842c459f4 Specifically only catch UnicodeDecodeError in IRCSocket.read 2019-03-06 17:02:58 +00:00
jesopo
11c4d70156 add IRCServer.clear_send_buffer() to clear queued lines 2019-03-05 11:35:24 +00:00
jesopo
91c2ab03ba add IRCServer.send_enabled, to prevent sending after QUIT in signals.py 2019-03-05 11:29:46 +00:00
jesopo
b43a5a7c74 Add -N to start.py to disable to-file logging 2019-03-04 19:35:18 +00:00
jesopo
7a3db82300 Add IRCServer.has_capability and use it throughout line_handler 2019-03-03 22:38:34 +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
948c86adbc Need to str() Hostmask objects in ParsedLine.format() 2019-02-28 16:22:17 +00:00
jesopo
9335ca5d16 Treat both a and a= as None for message-tags 2019-02-27 22:20:01 +00:00
jesopo
d16046fb49 Simplify ParsedLine._tag_str and ParsedLine.format() 2019-02-27 22:14:53 +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
5aaf6eb7df Bump version to v1.2.1 2019-02-25 21:47:36 +00:00
jesopo
56f6511ad3 Critical security fix: truncate IRCLine.ParsedLine.format() at newline 2019-02-25 21:46:23 +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
faa305f2e8 Add -m/-M args to ./start.py that call command_line on individual modules 2019-02-24 10:43:46 +00:00
jesopo
276d753711 Change --verbose short to -V, add --version/-v, add IRCBot.VERSION 2019-02-24 08:37:42 +00:00
jesopo
8d55319f56 Rename IRCLine.Line to IRCLine.SentLine, for clarity 2019-02-24 08:25:12 +00:00
jesopo
1473f41b03 Fire preprocess.send per-command - use this to only strip colors from ParsedLine
objects for PRIVMSG and NOTICE
2019-02-23 21:40:11 +00:00
jesopo
5baa688fbc Make IRCArgs mutable 2019-02-23 21:39:46 +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
8b54046ca4 Add target typehint on IRCServer.send_tagmsg, add send_tagmsg to IRCChannel/IRCUser 2019-02-22 22:34:54 +00:00
jesopo
9d72cbca73 Keep track of a user's away message, not just whether they're away or not 2019-02-22 22:26:50 +00:00
jesopo
8a0fd009e4 Also unload submodules within packages (ModuleManager.py) 2019-02-22 17:58:53 +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
deedab7248 Add IRCServer.send_joins, a nicer interface than manually ",".joining 2019-02-20 17:08:30 +00:00
jesopo
ddb69685d3 again, r"\" isn't valid. 2019-02-20 16:53:40 +00:00
jesopo
e343bf3e6a Check throttle space when queueing more data not whether there's no queued data 2019-02-20 16:52:45 +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