Commit Graph

52 Commits (8bdd1578c735931bafd213792ce5903f9f78486b)

Author SHA1 Message Date
Curtis McEnroe e20c64d5d7
Reorganize UI code for the umpteenth time
It's actually in a good state now, I think.
2019-02-22 14:11:50 -05:00
Curtis McEnroe 2797ac8abf
Rename verbose to raw
And change the format of the sticky tag names again.
2018-12-05 14:46:34 -05:00
Curtis McEnroe e01b03c963
Revert half-working reconnecting stuff 2018-12-04 14:58:14 -05:00
Curtis McEnroe 9106bd61fa
Add -a auth option for unimplemented SASL 2018-12-04 10:39:38 -05:00
Curtis McEnroe 7ea54828a6
Call uiShow at init so that TermFocus gets set 2018-12-03 15:52:04 -05:00
Curtis McEnroe 26db6e6c10
Ignore ~ username prefixes
This simplifies a lot.
2018-12-03 00:08:24 -05:00
Curtis McEnroe 452aeb5ecf
Move host, port, pass, webp to self 2018-12-02 23:22:18 -05:00
Curtis McEnroe 0e1297e068
Add -r option for realname 2018-12-02 23:08:49 -05:00
Curtis McEnroe 9d769111ae
Separate ircConnect and ircDisconnect 2018-11-30 18:06:43 -05:00
Curtis McEnroe 2eaa36a309
Add notification with notify-send 2018-10-28 02:44:09 -04:00
Curtis McEnroe bd48cb5e7d
Move event loop to event.c 2018-09-06 00:41:06 -04:00
Curtis McEnroe 240f9ebf84
Use PascalCase for constants
Begone underscores.
2018-09-02 16:13:00 -04:00
Curtis McEnroe 9469db993c
Add logging
The reason logFmt takes a timestamp as a parameter is to support IRCv3
server-time in the future to accurately log the znc buffer. Hopefully.
2018-08-17 21:50:45 -04:00
Curtis McEnroe 38fc42f03d
Add UI "heat" for status/messages/pings
Bring back the beeps! Allow pings from notices. Also factor out
dequoting of part/quit messages.
2018-08-17 14:00:08 -04:00
Curtis McEnroe a281f89592
Rework UI code for multi-channel
Tags are now permanently assigned (and I'm betting on never needing more
than 256 of them) and the UI maps tags to a linked list of views for
easy reordering and removal. Currently, views can only be added. Views
don't have a topic window until they need one. All UI code wants to be
functional reactive.

Beeping is temporarily removed until message priorities (status,
message, ping) can be added to the UI. At that point spawning
notify-send should also be possible. Priorities will also help with
unnecessary markers, which will not appear for status messages.

The tab system is now used to send QUIT and NICK messages to all the
relevant tags. Verbose output now goes to its own tag, and sending to
it sends raw IRC.

IRC colors are now listed in chat.h and handler functions for numeric
replies have real names. The color algorithm now uses a real hash
function for hopefully better results. QUIT, PART and KICK messages are
scanned for URLs.
2018-08-11 20:02:03 -04:00
Curtis McEnroe a1bb27ae01
Fix commented out error handling
Oops. Had commented it out so I could attach a debugger without exiting
on EINTR.
2018-08-11 12:47:39 -04:00
Curtis McEnroe 07c750d25c
Become multi-channel
There's a lot of UI missing for it, but it technically works.
2018-08-10 23:31:20 -04:00
Curtis McEnroe e9793b4bce
Move process spawning onto the event loop
Child processes weren't being reaped before, either. I wanted to have a
function called readEmAndReap but the reaping should actually happen in
a signal handler.
2018-08-10 13:36:00 -04:00
Curtis McEnroe 1a9ae050d6
Rename chan to join
In preparation for multi-channel?
2018-08-10 00:01:35 -04:00
Curtis McEnroe 4e1501df41
Add -u option for setting user 2018-08-09 21:46:22 -04:00
Curtis McEnroe d1fea96e86
Add PASS option
WEBIRC is now -W.
2018-08-09 18:26:53 -04:00
Curtis McEnroe a64f1a4ea2
Add URL detection, listing and opening
Might also add /copy, like /open.
2018-08-09 00:24:49 -04:00
Curtis McEnroe c024147504
Add commands to tab complete 2018-08-08 21:48:30 -04:00
Curtis McEnroe fe21b1410f
Convert input to multibyte before handling 2018-08-07 15:46:04 -04:00
Curtis McEnroe d6fb797b11
Use wchar_t strings for all of UI
vaswprintf is a nightmare.
2018-08-06 14:19:52 -04:00
Curtis McEnroe 6df61b5dda
Show source link on exit 2018-08-04 21:23:28 -04:00
Curtis McEnroe 7b5bc5aa41
Rename ui chat to log 2018-08-04 17:59:43 -04:00
Curtis McEnroe 35589a5624
Rename client to irc 2018-08-04 17:54:46 -04:00
Curtis McEnroe 39507f0f8f
Handle terminal resizing 2018-08-04 15:04:48 -04:00
Curtis McEnroe 5217f876b0
Do not free const string port 2018-08-04 13:43:36 -04:00
Curtis McEnroe ccdeb0c556
Split source into several files
Can't believe I have to do this.
2018-08-04 13:35:29 -04:00
Curtis McEnroe c6cd59f5c8
Exit on zero read 2018-08-04 01:38:43 -04:00
Curtis McEnroe fc5bf09c46
Handle nick errors 2018-08-04 01:37:07 -04:00
Curtis McEnroe 7baaff0777
Handle /nick and /quit
/quit doesn't actually... quit, right now. The only way to know that the
connection is closed is tls_read returning zero, it seems.
2018-08-04 01:13:06 -04:00
Curtis McEnroe fe938fba53
Track own nick 2018-08-04 01:12:26 -04:00
Curtis McEnroe 5522529e83
Word all status messages in present 2018-08-04 00:09:39 -04:00
Curtis McEnroe 269662d9ca
Handle input
This turned out a lot better than expected. Still a long way to go in
terms of line-editing, but at least backspace works!
2018-08-03 23:54:28 -04:00
Curtis McEnroe 9f17adce80
Track own username
So that we can colour our own messages correctly.
2018-08-03 23:00:53 -04:00
Curtis McEnroe 1daf23d8a5
Use a wide pad for the topic 2018-08-03 19:48:15 -04:00
Curtis McEnroe 18dcb256ac
Ignore NOTICEs not sent to the channel 2018-08-03 19:34:28 -04:00
Curtis McEnroe 0e99c48912
Handle KICK and NICK 2018-08-03 19:34:19 -04:00
Curtis McEnroe a2ea9a9035
Continue on EINTR from poll
Resizing the terminal causes it.
2018-08-03 19:22:44 -04:00
Curtis McEnroe 674e527b33
Handle ACTIONs 2018-08-03 19:17:29 -04:00
Curtis McEnroe 6ccaf872fc
Use more octal char literals
I might be coming around to octal.
2018-08-03 19:16:46 -04:00
Curtis McEnroe c609684d2b
Send a WHO in response to NAMES to get usernames
Other than this slight hack, I think coloring by username rather than
nick is a much better idea.
2018-08-03 18:58:19 -04:00
Curtis McEnroe 3b490562d4
Colorize nicks and channels 2018-08-03 18:07:19 -04:00
Curtis McEnroe 9e0bcb3805
Add support for mIRC colors 2018-08-03 18:00:48 -04:00
Curtis McEnroe 0a1528796b
Handle bold, italic, underline 2018-08-03 14:18:14 -04:00
Curtis McEnroe c383f9f3a7
Add prift function for "prefix shift"
Forgive me.
2018-08-03 14:12:49 -04:00
Curtis McEnroe d3e90b6cf2
Use libtls "compat" ciphers
irc.mozilla.org, using GnuTLS, doesn't support *any* of the "secure"
ciphers!
2018-08-02 23:59:41 -04:00