Commit Graph

32 Commits (0cf067315de4960522df360f8e1b2b04a23db7f0)

Author SHA1 Message Date
Curtis McEnroe 240f9ebf84
Use PascalCase for constants
Begone underscores.
2018-09-02 16:13:00 -04:00
Curtis McEnroe e5663d45df
Add aswprintf
The format string won't get checked but I'm not sure I can reasonably
use the same hack.
2018-09-02 01:03:12 -04:00
Curtis McEnroe e5f0c63e7f
Include time.h for time_t in chat.h 2018-09-02 00:09:36 -04:00
Curtis McEnroe b4ca3a5dfc
Don't clobber tab order on /who 2018-08-20 19:11:44 -04:00
Curtis McEnroe 4e4eb0de0f
Add wcsnchr, wcsnrchr, awcsntombs
This eliminates calls to editHead and editTail inside edit.c.

Oh god I'm sorry for following libc naming conventions for this stuff.
2018-08-20 18:43:16 -04:00
Curtis McEnroe e049d5a2d7
Name project chatte 2018-08-20 15:35: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 11d445b672
Add termTitle 2018-08-13 22:54:02 -04:00
Curtis McEnroe 2ae5b6b9ab
Add /query, /part and /close
Closing a channel before parting it is a bit weird, but if I send a PART
on /close, it would get reopened again to show the part message.
2018-08-13 13:49:03 -04:00
Curtis McEnroe 1232ce451d
Factor out input param and add tagFind
So that /view can't just invent tags.
2018-08-12 23:55:12 -04:00
Curtis McEnroe 19464369c3
Fix /open ranges by passing all URLs to open(1)
This is going to be incompatible with xdg-open since it takes only one
URL at a time. Write a wrapper script.
2018-08-12 23:44:58 -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 461bfca378
Add term.c for extra terminal features
Look at the cute little state machine!
2018-08-11 15:49: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 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 eac0f83efa
Factor out line editing to edit.c 2018-08-08 16:59:26 -04:00
Curtis McEnroe 43eee8da71
Implement cycling tab complete
Not properly hooked up to the UI yet.
2018-08-07 22:40:05 -04:00
Curtis McEnroe 7d76246c3f
Highlight and beep pings 2018-08-07 17:51:23 -04:00
Curtis McEnroe a6ede6f91f
Factor out allocating conversion between wcs and mbs 2018-08-07 16:24:14 -04:00
Curtis McEnroe fe21b1410f
Convert input to multibyte before handling 2018-08-07 15:46:04 -04:00
Curtis McEnroe 5d2b5cd51e
Populate tab-complete list 2018-08-07 14:58:32 -04:00
Curtis McEnroe fa270d9287
Hack clang into checking uiFmt format strings 2018-08-07 14:11:19 -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 ccdeb0c556
Split source into several files
Can't believe I have to do this.
2018-08-04 13:35:29 -04:00