{"id":13758327,"url":"https://github.com/domsson/libtwirc","last_synced_at":"2026-01-29T10:22:34.091Z","repository":{"id":87911103,"uuid":"159398704","full_name":"domsson/libtwirc","owner":"domsson","description":"Twitch IRC library for Linux - no dependencies","archived":false,"fork":false,"pushed_at":"2023-05-16T22:37:05.000Z","size":237,"stargazers_count":25,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-16T15:37:37.380Z","etag":null,"topics":["irc","lib","linux","no-dependencies","public-domain","twitch","twitch-irc"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/domsson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-27T21:01:48.000Z","updated_at":"2024-10-04T16:02:02.000Z","dependencies_parsed_at":"2024-01-15T03:42:33.259Z","dependency_job_id":null,"html_url":"https://github.com/domsson/libtwirc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domsson%2Flibtwirc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domsson%2Flibtwirc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domsson%2Flibtwirc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/domsson%2Flibtwirc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/domsson","download_url":"https://codeload.github.com/domsson/libtwirc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389373,"owners_count":21900749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["irc","lib","linux","no-dependencies","public-domain","twitch","twitch-irc"],"created_at":"2024-08-03T13:00:27.482Z","updated_at":"2026-01-29T10:22:34.043Z","avatar_url":"https://github.com/domsson.png","language":"C","readme":"# libtwirc\n\n`libtwirc` is a Twitch IRC client library written in C, developed on and for Linux. It allows you to easily implement chat bots or clients for Twitch with C or any language that can call into C libraries. The interface is pretty similar to that of `libircclient`.\n\n`libtwirc` specifically implements the Twitch IRC flavor. This means that many features described in the IRC protocol are not supported, most notably `DCC` and SSL. On the other hand, IRCv3 tags, `CAP REQ`, `WHISPER` and other Twitch-specific commands are supported.\n\nPart of the development happens live on Twitch: [twitch.tv/domsson](https://twitch.tv/domsson)\n\n# Status\n\nThe library is feature-complete for the current (initial) release and seems to work well. However, I have not unit-tested it yet, so there are most likely some bugs lurking still. I would love some feedback from actual users, so why not give it a try?\n\n# How to use\n\nCheck out the [wiki](https://github.com/domsson/libtwirc/wiki), which should have all the information to get you started. Also, there is some example code available over at [twircclient](https://github.com/domsson/twircclient). The rough and overly simplified outline of using `libtwirc` looks something like this:\n\n```\ntwirc_state_t *s = twirc_init();                             // create twirc state\ntwirc_connect(s, \"irc.chat.twitch.tv\", \"6667\", USER, TOKEN); // connect to Twitch IRC\ntwirc_loop(s);                                               // run in a loop until disconnected\ntwirc_kill(s);                                               // free resources\n```\n\n# Motivation\n\nI wanted to write a Twitch chat bot in C. I found `libircclient` and was using it happily, but ran into two issues. First, it doesn't support IRCv3 tags, which Twitch is using. Second, it uses a GPL license. Now, my bot (and almost all my software) is CC0 (aka public domain) and even after more than 4 hours of research, I couldn't figure out if I would be able to release my code as CC0 when using a GPL licensend library. This, plus the fact that I'm still learning C and am looking for small projects to help me gain more experience, I decided to write my own IRC library. To keep the scope smaller, I decided to make it Twitch-specific and, for now, Linux only.\n\n# Code style\n\nIf you want to contribute code or are, for whatever reason, otherwise interested in my \"code guidelines\", here is a rough list:\n\n- I keep it simple, 'cause I'm stupid\n- I add plenty of comments for future me \n- I always use braces, even for one-liners\n- I always put braces on their own lines\n- I prefix public functions with `twirc_`\n- I prefix private functions with `libtwirc_`\n- I try to use little memory (lots of `malloc`)\n- I put the asterisk next to the var/func name\n- I prefer many small funcs over a few big ones\n- I only use `typedef` sparingly\n- I add `_t` to typedef'd variable names\n- I try to keep lines to 80 chars if possible\n- I rather exceed 80 chars a bit than wrap a line \n- I rather wrap a line than exceed 80 chars by a lot\n","funding_links":[],"categories":["Libraries"],"sub_categories":["C"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomsson%2Flibtwirc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdomsson%2Flibtwirc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdomsson%2Flibtwirc/lists"}