Coder Social home page Coder Social logo

rirc's Introduction

      _
 _ __(_)_ __ ___
| '__| | '__/ __|
| |  | | | | (__
|_|  |_|_|  \___|
=================

A minimalistic IRC client written in C.


Configure
---------

Configure compile time defaults by editing `config.h`.
To generate a default config file:

    $ make config.h


Install
-------

    $ make
    $ make install

Building rirc requires a c11 compiler and GNU make.

The build toolchain and install paths can be configured via
standard environment variables, i.e.:

    $CC, $CFLAGS, $LDFLAGS, $DESTDIR, $PREFIX

The default install paths are:

    /usr/local/bin/rirc
    /usr/local/share/man/man1/rirc.1


Documentation
-------------

See `rirc --help` or `man rirc` for a summary of usage. For
complete documentation, refer to:

    https://rcr.io/rirc/

rirc's People

Contributors

dforsyth avatar eklitzke avatar jdan avatar lessandro avatar rcr avatar strafe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rirc's Issues

Compile error on macOS 10.13.6: undeclared identifier 'TIME_UTC'

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.)

Keyboard shortcuts

What is keyboard shortcut to switch between channels?

Could you maybe update the README with a basic matrix of keyboard shortcuts? :) :)

Thanks!

Would you be willing to support OSX?

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 :)

customized shortcuts

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).

Better unicode support

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.

Option to display notices in the server buffer

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.

Builds on windows but doing anything crashes it

crash

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

[Feature] Alert while user's nick appears

First, thank you _a lot_ for this wonderful irc client!

A proposition: use a print a terminal bell (as in printf '\a') while the user's nick is being quoted.

This would trigger my tmux, then st, then dwm, to produce this:

In tmux, bash is in alert state:

2016-03-31-143354_1366x768_scrot2

In dwm, tag 1 is in alert state:

2016-03-31-132615_1366x768_scrot

error.h should be a conditional include on OSX

--- ~/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

Emoji

rirc currently doesn't handle emojis

this is unacceptable

Implementing logs

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.

Allow dynamic linking of mbedtls

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.

a gcc compile warning

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"))

Scrollback blocked until new message while resizing client

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.

name auto complete

auto complete doesn't cycle through names

when you auto complete a name, there's no space after it either

Allow for default config file.

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.

TLS connections fail on macOS

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.