Commit graph

159 commits

Author SHA1 Message Date
Valentin Lorentz
fbf8cd1a16 Fix type errors detected by 'mypy --ignore-missing-imports src'. 2019-10-30 22:26:59 +01:00
jesopo
9958c9169d fix _line() related type hinting issues in IRCServer.py 2019-10-30 13:46:29 +00:00
jesopo
9f48dfb1f1 send_mode() args is already a list 2019-10-29 10:23:47 +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
jesopo
9d1b640db4 re-add list moving CAP objects from capability_queue to capabilities_requested 2019-10-25 11:52:11 +01:00
Valentin Lorentz
d8c48fa98f Make send_capability_queue split 'CAP REQ' message based on string length.
Instead of sending caps by groups of 10.
2019-10-23 21:20:56 +02:00
jesopo
50d1eb6b8c combine find_setting() and find_setting_prefix() on user/channel/server/bot 2019-10-07 12:46:52 +01:00
jesopo
16ba52f5dc forgot to commit kwargs for get_user() 2019-09-27 15:52:25 +01:00
jesopo
47d38c7d18 refactor all checks for channel_type to server.is_channel() 2019-09-20 14:52:41 +01:00
jesopo
9d33354d16 translate INVITE from [channel_name, target] to [target, channel_name] 2019-09-12 11:24:25 +01:00
jesopo
540c7b8c44 Revert "INVITE should be [channel_name, target]"
This reverts commit f3d8ffad2c.
2019-09-12 11:23:29 +01:00
jesopo
f3d8ffad2c INVITE should be [channel_name, target] 2019-09-12 11:21:29 +01:00
jesopo
dadefeb8f3 remove try-rejoin (on 477) logic. will move to a module later 2019-09-07 15:21:35 +01:00
jesopo
163e979f95 move socket creation to it's own function, send event just prior to .connect 2019-07-28 18:07:23 +01:00
jesopo
f9d5271762 "paramatered" -> "parametered" 2019-07-04 17:23:36 +01:00
jesopo
bb749b111f Refactor EventManager to only hold hooks on a root object 2019-06-26 11:01:09 +01:00
jesopo
22574448da until_read_timeout is a func - read_timed_out has always been returning false 2019-06-22 23:31:06 +01:00
jesopo
f1abc5f10c remove remove_own_mode( check - deferred_read.py better solves the issue.
the issue was getting a MODE line on irc.com prior to 001, thus we didn't know
what our nickname was thus we didn't know that the MODE was for us. not dying
when we saw +x was easy to do with this check but I think it's more correct to
actually parse that MODE after 001 so we know we have +x.
2019-06-22 22:23:05 +01:00
jesopo
bffc5b0ec4 WARN log when we try to remove a mode from ourselves that we didn't have 2019-06-21 11:16:53 +01:00
jesopo
01438f28f6 check we have a mode before trying to remove it 2019-06-21 11:14:10 +01:00
jesopo
72ce880478 Only panic() when a server connection is part of bot init. closes #69 2019-06-17 14:20:11 +01:00
jesopo
dbe0b1f43b Tell servers objects when they are the result of a reconnection 2019-06-17 13:53:17 +01:00
jesopo
5fa3d66a39 Return all caps through received.cap.ls|new and check if valid in line_handler,
remove server.cap_started
2019-06-16 15:33:20 +01:00
jesopo
8135f871c3 Change send_*() function return hints to be typing.Optional 2019-06-10 15:02:03 +01:00
jesopo
6c5dc958d0 Add .assure() to ParsedLine, to make it immune from .valid() 2019-06-10 10:45:02 +01:00
jesopo
0fc03fd592 Allow preprocess.send callbacks to request a line not be sent at all 2019-06-10 10:11:31 +01:00
jesopo
e28a8d91ab IRCServer.statusmsg type hint 2019-06-08 12:10:14 +01:00
jesopo
d4ba98307f We should look at ISUPPORT's STATUSMSG token instead of PREFIX 2019-06-08 10:59:52 +01:00
jesopo
16b9361371 Only request a CAP once. closes #66 2019-06-08 10:17:13 +01:00
jesopo
09fbbae5e3 "send" event on SentLines should be run on the main thread 2019-06-07 11:05:43 +01:00
jesopo
05fcb33ff7 print lines as soon as they're read, don't wait for _post_send 2019-06-06 19:15:34 +01:00
jesopo
f96378ac07 move immediate-write-trigger to IRCServer.py, trigger _event_loop for
running=False
2019-06-06 17:58:35 +01:00
jesopo
a1ebe8035e Split read/write/process in to 3 different threads 2019-06-06 17:05:44 +01:00
jesopo
8dbae6a5e9 Give SentLine (and preproc.send events) a new event object, to track events
related to a line after it is sent
2019-06-04 17:51:20 +01:00
jesopo
3ac01197f2 Send PING and PONG as 'immediate' lines 2019-06-04 14:31:34 +01:00
jesopo
4a4d0a37d7 Only return definitely-writen lines from IRCSocket._send, refactor in prep for
lines that request to be sent 'immediately'
2019-06-04 14:28:35 +01:00
jesopo
5204ac3300 fix some CAP related type hints 2019-06-02 10:14:09 +01:00
jesopo
f9f637e084 Remove IRCSendBatch, fix some batch-related type hints 2019-06-02 10:13:51 +01:00
jesopo
c3454f2bfe available_capability returns str - fix type hint for this 2019-06-01 15:02:38 +01:00
jesopo
367eb1c60e Make labeled-resposnes it's own module, tag and track every sent line 2019-05-30 15:36:10 +01:00
jesopo
b8f778d7bd Only try to send QUITs on ctrl+c when we're connected - sys.exit otherwise 2019-05-29 16:11:47 +01:00
jesopo
768059fcf4 Switch resume.py to use the last server-time it saw, not last .recv() 2019-05-29 15:53:20 +01:00
jesopo
ab1074cf4d Remove mention of ipv4 - detect address family automatically 2019-05-21 10:11:09 +01:00
jesopo
bdd161256d has_capability -> has_capability_str, add new has_capability 2019-05-20 16:33:32 +01:00
jesopo
3ad83655d5 ParsedLine already deals with preventing newlines 2019-05-20 16:19:37 +01:00
jesopo
c607a0e67c Implement utils.irc.hostmask_match for glob-like hostmask matching 2019-05-19 16:24:38 +01:00
jesopo
7547eee96d Catch server version string, from RPL_MYINFO 2019-05-15 17:12:21 +01:00
jesopo
d291cd5063 Revamp how CAPs are tracked through REQ and ACK/NAK etc 2019-05-11 18:22:40 +01:00
jesopo
f7eae1a978 Tokenize IRC data as soon as it comes out of IRCServer 2019-05-09 10:36:33 +01:00