Skip to content

Lightweight cross-platform IRC lib written in standard C99 + IRC netcat (a.k.a. icat)

License

Notifications You must be signed in to change notification settings

Henningstone/libsrsirc

 
 

Repository files navigation

This is libsrsirc, version 0.0.14
A lightweight, cross-platform IRC library
Written in portable standard C (C99)

Interface documentation: http://penenen.de/libsrsirc/doxygen/modules.html


Some highlights:
----------------
  - Lightweight:  libsrsirc is small and uses very little resources; most of
                  the protcol handling is essentially zero-copy.  It does not
                  try to offer every conceivable feature an IRC lib could
                  possibly have, if the costs would outweight the gains.
                  This allows creating thousands of independent instances.

  - Portable:     libsrsirc is written in portable standard C, with all
                  platform-specifics cleanly separated from the core library.
                  It compiles and works on BSD, Linux, Mac OS and even Windows.
                  Porting it to new platforms is relatively straightforward.

  - Robust:       libsrsirc is tested against a huge variety of different IRC
                  networks, and while it is certainly possible for a malicious
                  IRC server to thoroughly confuse the lib, it will not cause
                  crashes or security problems.  If it does, file a bug report
                  which will be dealt with promptly.
                  It will even handle out-of-memory situations gracefully.

  - Flexible:     libsrsirc supports IPv4 and IPv6.  It can optionally link
                  against OpenSSL for secure IRC connections.
                  Apart from that, support for connecting to IRC through
                  HTTP (CONNECT), SOCKS4 and SOCKS5 proxy servers is provided.

  - Debuggable:   libsrsirc comes with a lot of built-in debug statements,
                  which can be controlled using an environment variable.
                  This allows troubleshooting even if using a dedicated
                  debugger isn't feasible for some reason.

  - Useful:       libsrsirc should be a decent foundation to build all sort of
                  IRC-related software upon, from IRC support for a specific
                  use case in a specific application, to dedicated IRC software
                  like bots, bouncers, clients.
                  It comes with 'icat', which implements a netcat-like utility
                  for writing and reading messages to/from IRC channels.


What libsrsirc does NOT do:
---------------------------
  - Servers:      libsrsirc can NOT act as an IRC server (currently, anyway,
                  but it will probably stay that way).  While certain functions
                  might still be useful to help implementing IRC servers
                  (for example the protocol parser, the casemapping-aware
                  string comparison and the user and channel maps), the
                  overall design is clearly that of a client library.

  - Transactions: libsrsirc will NOT attempt to keep track of what
                  client-issued command a given server response refers to.
                  Doing this involves heuristical approaches because most ircds
                  aren't exactly pedantic about following the standard -- and
                  even if they are, there's two standards.
                  Since libsrsirc cannot possibly know what non-standard
                  response codes a server could return, it will leave
                  correlating commands and responses - fortunately rarely
                  needed for IRC software - to the user.


Quickstart for libsrsirc users:
-------------------------------
  - Get a release tarball off the "tar" branch, DO NOT use the
    github-internal "release" feature.
    I.e. use https://github.com/fstd/libsrsirc/tree/tar
    (use "view raw" for downloading)

  - Extract the tarball, cd into the resulting directory

  - run "./configure && make" to build the lib, "make install" to install.


Quickstart for libsrsirc developers:
------------------------------------
  - Clone the repo

  - Run ./autogen.sh to setup the autohell.
    (This requires autoconf >= 2.69, automake >= 1.14, libtool >= 2.4)

  - run "./configure && make" to build the lib, "make install" to install.

  - To tear down the autohell, run ./autoclean.sh


See src/helloworld.c for a trivial example application of the lib.

See http://penenen.de/libsrsirc/doxygen/modules.html for documentation

See INSTALL for generic autohell compile/install instructions.

See COPYING for license information (tl;dr: 3-clause BSD)

(C) 2012-2015 Timo Buhrmester <van.fstd@gmail.com>
Contact: #fstd on irc.freenode.org (or by email)

About

Lightweight cross-platform IRC lib written in standard C99 + IRC netcat (a.k.a. icat)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 89.5%
  • M4 6.7%
  • Shell 3.2%
  • Makefile 0.6%