]> git.gir.st - ircpipe.git/blob - spec.txt
free TLS context after closing
[ircpipe.git] / spec.txt
1 # ircpipe
2
3 sets up an irc connection, and not much more.
4
5 ## on connection
6
7 - [x] connect
8 - [x] tls (optional cert validation)
9 - [?] sasl plain (untested)
10 - [x] set user and nick
11 - [x] wait for motd/001-message
12 - [x] optionally, do an initial join
13
14 ## in the background
15
16 - respond to server pings
17 - keep track of when we last received an irc mesasge; if t > $timeout, send ping ourselves.
18 (first implementation can just send a ping every $timeout (milli)seconds)
19 (should $timeout be the time between last message and send-ping or between last message and ping-reponse?)
20 - different timeouts:
21 - ping interval
22 - connect timeout
23 - time between sent message and received response
24 - send/recv block: invalid, due to polling
25
26 ## interfaces
27
28 - read from stdin, write to stdout
29 - cli for setting timeout, user/nick, server info, ...
30 - netcat-like (everything but host[{: }port] optional
31 - how to specify tls?
32 - how to specify auth?
33 - relatively secure password handling!
34
35
36 ## minor TODOs
37
38 - check if port is valid
39 - irc_poll: handle poll() EINTR (don't exit on nonfatal signal received)
40
41
42 ## future todos:
43 - flood protection!
44
45
46 ## dropped features (patches accepted)
47 - nickserv: freenode and hackint support sasl, efenet neither. rest don't care.
48 - sasl cert: don't care for it
49 - optionally use socket instead of stdin/stdout?
50 - checking responses to NICK, JOIN, CAP-REQ, AUTHENTICATE
51 for now, we're just assuming everything went ok.
52 - NICK/USER
53 ok: 001 (checked, to block further commands)
54 err: 432 433 436 437 <nick>
55 - JOIN
56 ok: JOIN <chan>
57 err: 471 473 474 475 403 405 437 <chan>
58 - CAP REQ/CAP END
59 ok: CAP <nick?> ACK
60 err: CAP <nick?> NAK
61 err: 421
62 - AUTHENTICATE
63 ok: 900 903 <nick>
64 err: 902 904 905 908 <nick>
65 - maybe allow HOST:PORT (nc doesn't)
66 - maybe allow HOST +PORT and/or HOST:+PORT for tls
67 - maybe allow irc://HOST:PORT and ircs://HOST:PORT
68 - what to do when nick is taken
69 - use random nick
70 - use fallback nick (append '_')
71 - allow specifying alternate nicks
72 - exit (this is what we do now on receiving the numeric error response)
73
74 ## discarded ideas
75 all of these would require modifying the streaming data, which is more trouble
76 than it's worth. these could be implemented as external filters, though.
77 - -C flag to translate CRLF to LF (from server) and LF to CRLF (from stdin)
78 - -A flag to strip ctrlchars (formatting, colors, etc) from stdout
79 - enforce max line length (512 bytes, including CRLF) by splitting PRIVMSG
80
81 ## for responses
82
83 we need to check and handle multiple responses to commands we've send:
84 - ping: pong (everytime, everywhere. keep current hack)
85 - sasl: cap-ack, 900+903 or 90x (when authenticating, during setup)
86 - (after connecting/authenticating): 001, nick-in-use (everytime, during setup)
87
88 the server may send unrelated responses in-between - including pings - and we
89 want to enforce a timeout in which we expect the response (2000ms).
90
91
92 essentially, we send a command, then block until we receive a response or an error.
93 commands we send that we need to wait for are:
94 - PING
95 ok: PONG :<whatever>
96
Imprint / Impressum