rcr / rirc Goto Github PK
View Code? Open in Web Editor NEWA terminal IRC client in C
Home Page: https://rcr.io/rirc/
License: MIT License
A terminal IRC client in C
Home Page: https://rcr.io/rirc/
License: MIT License
cc -std=c99 -Wall -pedantic -O3 -g -c -o src/bld/net.o src/net.c
src/net.c: In function ‘send_mesg’:
src/net.c:402:17: warning: ‘cmd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
else if (streqi(cmd, "JOIN"))
I know this may be hard for you to troubleshoot since I don't believe you use macOS, but it's kind of a bummer and I don't know enough about C/mbedtls to take a look myself.
$ ./rirc.debug -s chat.freenode.net
07:25 ? ~ Connecting to chat.freenode.net:6697
07:25 ? ~ .. Connected [204.225.96.251]
07:25 ? ~ .. Establishing TLS connection
07:25 ! ~ .... The certificate is not correctly signed by the trusted CA
07:25 ! ~ ....
07:25 ! ~ .. X509 - Certificate verification failed, e.g. CRL, CA or signature
~ check failed
07:25 ! ~ .. TLS connection failure
07:25 ! ~ .. Connection failed -- retrying
07:25 ? ~ Attemping reconnect in 00:04
07:25 ? ~ Connecting to chat.freenode.net:6697
07:25 ? ~ .. Connected [185.30.166.37]
07:25 ? ~ .. Establishing TLS connection
07:25 ! ~ .... The certificate is not correctly signed by the trusted CA
07:25 ! ~ ....
07:25 ! ~ .. X509 - Certificate verification failed, e.g. CRL, CA or signature
~ check failed
07:25 ! ~ .. TLS connection failure
07:25 ! ~ .. Connection failed -- retrying
07:25 ? ~ Attemping reconnect in 00:08
If logs must be created, there will be a directory to put them in, like rirc -l path/to/log-dir
. Inside of it, there can be either a flat structures with irc.server-name.net_#channel-name.log
or a tree, like: irc.server-name.net/#channel-name.log
. For now, I use the former. I am not sure what permission I should put for the logs.
Rirc sends everything it to print out to newline
and newlinef()
, which both use _newline()
. There could be a call to an appendlog()
function in there that would write each line at the end of the log file. I'll work on this on the logs branch.
It would be cool if rirc would green text if > is the first character in a line
I'm trying to compile rirc on macOS, but I'm getting a couple of errors.
The first was:
src/io.c:625:16: error: use of undeclared identifier 'SIGWINCH'
if (sigaction(SIGWINCH, &sa, NULL) < 0)
I fixed this by adding CFLAGS += -D_DARWIN_C_SOURCE
to the Makefile
.
However, now I'm getting:
src/io.c:925:24: error: use of undeclared identifier 'TIME_UTC'
if (timespec_get(&ts, TIME_UTC) != TIME_UTC)
^
src/io.c:925:37: error: use of undeclared identifier 'TIME_UTC'
if (timespec_get(&ts, TIME_UTC) != TIME_UTC)
I think this is because Apple doesn't include this.
(See this StackOverflow question.)
rirc currently doesn't handle emojis
this is unacceptable
Hey!
Any chance you would be up for porting this to "homebrew"? I have tried compiling it on OSX but it lacks the -fsanitize
clang option. If there was a binary available for OSX's Darwin BSD variant, it could easily be added to the "homebrew" repo.
Then OSX users could just do brew install rirc
:)
I don't want to use the default short cuts. :)
For example, scrolling up and down with j and k makes a lot more sense (vim uses same keys and they're next to each other to easily go up and down).
stackdump:
Exception: STATUS_ACCESS_VIOLATION at rip=001004089FA
rax=0000000000000000 rbx=0000000600056C10 rcx=0000000600056F28
rdx=0000000600056E20 rsi=0000000000000000 rdi=000000000022C7A9
r8 =00000005FFE2A839 r9 =00000001802FC400 r10=0000000000230000
r11=000000010040158A r12=00000001802D5800 r13=0000000000000001
r14=00000001802D5800 r15=000000010040B3E0
rbp=000000000022C7B7 rsp=000000000022C430
program=E:\rirc\rirc.exe, pid 4244, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame Function Args
0000022C7B7 001004089FA (00100401533, 00180000088, 00000000006, 00000000074)
0000022C7B7 0010040763D (0000022C7A1, 001802D5800, 00100401C3F, 00000000001)
006000437D0 00100403A19 (0000022C7BB, 00000000007, 000000007C8, 0000319019A)
0000022C7A1 001004040B6 (00000000100, 00180324F70, 00180081F81, 7463656E6E6F632F)
00000000001 00100401EAA (0010040FDC0, 00000000001, 0010040C7DA, 00600043938)
00000000001 001004029D0 (0010040BA3D, 00600043760, 00000000007, 0000022CAAC)
00000000001 00100409885 (00000000020, FF0700010302FF00, 00180048340, 0000022D680)
0000022CBC0 001800483B1 (00000000000, 00000000000, 00000000000, 0000022CD40)
00000000000 0018004602C (00077285902, 0000022FEE8, 00000000001, 0000022CFB8)
00000000000 001800460C4 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00100409001 (00000000000, 00000000000, 0007E110000, 00000000000)
00000000000 00100401010 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00077025A4D (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 0007725B831 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
--- ~/Projects » git clone [email protected]:rcr/rirc.git
Cloning into 'rirc'...
remote: Counting objects: 1483, done.
remote: Total 1483 (delta 0), reused 0 (delta 0), pack-reused 1483
Receiving objects: 100% (1483/1483), 913.45 KiB | 367.00 KiB/s, done.
Resolving deltas: 100% (984/984), done.
Checking connectivity... done.
--- ~/Projects » cd rirc
--- Projects/rirc ‹master» make clean rirc
cleaning
cc -pthread -std=c99 -Wall -Wextra -pedantic -O2 -c -o src/bld/draw.o src/draw.c
In file included from src/draw.c:10:
src/common.h:55:10: fatal error: 'error.h' file not found
#include <error.h>
^
1 error generated.
make: *** [src/bld/draw.o] Error 1
--- Projects/rirc ‹master» uname -a 2 ↵
Darwin core1anet.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
More info here: https://www.gnu.org/software/gnulib/manual/html_node/error_002eh.html
auto complete doesn't cycle through names
when you auto complete a name, there's no space after it either
I received some feedback demonstrating some bugs in how unicode is handled. This is caused by the way rirc discards non-printable ascii bytes. The fix for this would require a bit of refactoring to replace all instances of char with wide chars, and improve the receiving/input routines.
I'll be tackling this fix next.
What is keyboard shortcut to switch between channels?
Could you maybe update the README with a basic matrix of keyboard shortcuts? :) :)
Thanks!
I'd like to package rirc for OpenBSD for which having mbedtls dynamically linked (or included in a release) would be necessary. The porting infrastructure of OpenBSD does not allow network access to the build process and therefore mbedtls can not be fetched.
You have done an amazing job here. It all feels so comfortable. It would be awesome if you could supply a default config in the user homedir. Something object based like YAML or JSON.
Something where you could supply the sever to connect to and the list of default channels to join. Basically all the grunt work. I could tie this into a development vm build process where it auto joins the channels related to the project at hand.
I find a lot of companies are staffing IRC channels. Like the Stripe payment system.
Then, I can not scroll while I resized the client. I use it in either DVTM, tmux, abduco, X11.
If i reduce the size, and then increase it again, I can retrieve all of the text (eventually the whole buffer), so content does not seems to be lost.
To me, this has lower priority than logs, as I could browse logs to check mhat is not on screen.
Had a quick peak at what Weechat is doing, and it seems a little more in-depth than just putting all notices in the server buffer, but close enough.
I hate connecting to freenode and getting private message buffers opened from freenode-connect
and NickServ
every time. Weechat seems to redirect these to the server buffer if a private message buffer does not currently exist for that nick. But a config setting to just always send them to the server buffer would suffice pretty nicely.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.