[UNDER HEAVY DEVELOPMENT] Simple and lightweight IRC protocol helper
This repository has been archived on 2021-04-17. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Alex D. b06ce004c8
Add new alloc
2021-04-17 12:42:10 +00:00
include/uirc Few tweaks to use new API 2021-04-16 18:10:33 +00:00
src Add new alloc 2021-04-17 12:42:10 +00:00
.clang-format Reformat code, add if preprocessor comments, shorten structrs, remove analyzer 2020-12-16 14:22:25 +00:00
.clang-tidy Lookup tables and organizing 2021-04-07 21:45:44 +00:00
CMakeLists.txt Few tweaks to use new API 2021-04-16 18:10:33 +00:00
COPYING Add GPL and .clang-format 2020-06-22 19:10:57 +02:00
README.md Update readme 2021-03-21 18:43:48 +00:00

README.md

MicroIRC, a simple, lightweight IRC protocol helper

Requirements

  • CMake (tested on 3.17)
  • C99 compiler (ideally clang or gcc, should work with anything that supports these though)
  • corelibs libraries (https://git.redxen.eu/caskd/corelibs)
    • llist (linked list library)
    • stringext (string.h extensions/wrappers)

Building

First, create the required build files (usually the Makefile)

cmake -B build/ -DCMAKE_BUILD_TYPE=Release .
Option Description Type Status Default
BUILD_IRCV3 Build IRCv3 support boolean WIP ~20% false
BUILD_VALIDATORS Build validators that check if the messages follow the standards boolean WIP 0% false
BUILD_DOCS Build documentation using doxygen boolean WIP ~35% false
BUILD_TESTS Build tests that check if the build results behave as they should boolean WIP ~60% false
CODE_ANALYZER Use static analysis tools boolean WIP TK false
CODE_COVERAGE Generate code coverage output boolean WIP CI false

Following that, just use your build system and compile it

Example for make:

make -C build

You now should have the library built at build/libuirc.a or build/libuirc.so.VERSION

Features

Finished

  • IRC message parsing and assembly that doesn't lose details
  • Simple message allocation and translation between string format and in-memory structure

Planned / Not finished

  • RFC2812 compliant parser (still need to verify a few things)
  • Variable-size lists wrappers (capabilities, tags, messages in a buffer etc.)
  • Message validators (checks messages for formatting problems)
  • CTCP -> ANSI formatting translation
  • Mode masks

Motivation

I have started this project initally to learn more about the protocol and learn C. This project has taught me on how to organize code, what tasks are required to maintain a codebase clean and other smaller things. Over the time this learning process has resulted into multiple rewrites or/and redesigns. These include:

  • Splitting the daemon from the core (library)
  • Parsing tags into structs
  • Storing structs in memory instead of pointers to buffers
  • Separating structs
  • Parsing read-only by copying buffers

Each of these required redesigning some/all of the code and some also have their downsides.

Over the time it has turned into a more generalized library that is supposed to not be tied to a specific codebase. I am motivated to write this as i've seen that many codebases have turned into overly-fragmented code or monolithic code. This library isn't supposed to replace any other libraries but instead it should fill this small space that i've noticed was missing.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.