{"id":16592675,"url":"https://github.com/prikhi/hirc","last_synced_at":"2025-10-29T10:30:35.593Z","repository":{"id":80049360,"uuid":"131049613","full_name":"prikhi/hIRC","owner":"prikhi","description":"An IRC Client with a Split Connection Daemon \u0026 TUI Frontend.","archived":false,"fork":false,"pushed_at":"2018-11-20T00:21:47.000Z","size":74,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-02T01:01:57.845Z","etag":null,"topics":["brick","demuxer","haskell","irc","irc-client","multiplexer","tui"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prikhi.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","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-04-25T18:44:55.000Z","updated_at":"2024-09-30T23:33:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c7387de-cf45-4ba7-a287-b9e08723ee8e","html_url":"https://github.com/prikhi/hIRC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prikhi%2FhIRC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prikhi%2FhIRC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prikhi%2FhIRC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prikhi%2FhIRC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prikhi","download_url":"https://codeload.github.com/prikhi/hIRC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238803526,"owners_count":19533331,"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":["brick","demuxer","haskell","irc","irc-client","multiplexer","tui"],"created_at":"2024-10-11T23:21:53.398Z","updated_at":"2025-10-29T10:30:35.271Z","avatar_url":"https://github.com/prikhi.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hIRC\n\n[![hIRC Travis-CI Build Status](https://travis-ci.org/prikhi/hIRC.svg?branch=master)](https://travis-ci.org/prikhi/hIRC)\n\n`hIRC` is an IRC client that is split into a connection daemon \u0026 channel viewer\nclient. The daemon is responsible for connecting, authenticating, \u0026 sending\nmessages to IRC servers. The client provides a UI for you to view \u0026 send\nmessages to channels.\n\n\n## Build / Run\n\nYou should test against a local IRC server, something like `oragono`:\n\n    sudo packer -S oragono\n    mkdir ircd; cd ircd;\n    oragono initdb; oragono run\n\nThen build and run the daemon:\n\n    stack build\n    stack exec hircd\n\nAnd run the client in another terminal:\n\n    stack exec hirc\n\nPress `Enter` to send messages \u0026 `Control-q` to quit.\n\n\n## Configuration\n\nThe configuration file is written in YAML and should live at\n`~/.config/hirc/config.yaml`. See the `config-example.yaml` file in this\nrepository for a documented example.\n\nBy default, `hircd` will look in `~/.config/hirc` for a `config.yaml` file. You\ncan also pass one via the command line:\n\n    stack exec hircd config-example.yaml\n\n\n## Motivation\n\nWhy not just use `irssi` coupled with `screen`?\n\nI was! But I always desired an IRC client with this specific architecture so I\ncould always be connected to all my servers \u0026 channels, but view subsets of\nthem via multiple terminals.\n\nWith `irssi` \u0026 `screen` I had a constantly running, backgroundable IRC client\nthat would automatically connect to archlinux, python, django, haskell, \u0026\nxmonad channels(and many more).\n\nHowever, when I'm working on a python project I only care about the python \u0026\ndjango channels - everything else is extra noise and wasted space. And irssi\nonly presents a single UI so I had to do manual layout manipulation when I want\nto switch from python to haskell channels.\n\n`hIRC` lets you eliminate that extra noise \u0026 layout work - I can have one\nterminal showing my Python channels, and another showing the Haskell channels.\nInstead of swapping the Python channels with Haskell channels, I can simply\nswitch terminals.\n\n\n## Architecture\n\n### Daemon\n\nThree message queues are used in the daemon. One for sending messages to\nClients via the socket server. One for receiving messages from Clients via the\nsocket server. And one for areceiving messages from IRC clients.\n\nOn startup, initialize the application state, fork connections to the IRC\nservers, \u0026 fork a socket server.\n\nThen it reads the message queues and handle any events until the daemon is\nterminated.\n\nThe IRC forks simply connect to the server, register/identify the user, \u0026 adds\nany messages to the `IrcQueue`. The IRC server's state is saved in a TVar so\nmessages can be sent to the server from the main thread.\n\nThe socket server simply pipes the `ClientQueue` into the socket \u0026 the socket\ninto the `DaemonQueue`.\n\n\n### Client\n\nThe client is currently super simple.\n\nOn startup, it creates message queues from/to the daemon, connects to the\ndaemon's socket server, \u0026 starts the Brick application.\n\nThe UI contains the message log for the current channel, as well as an input\nform. When the input form is submitted, the Client will send the message to the\nDaemon, which sends it to the IRC server as well as any clients subscribed to\nthat channel.\n\nWhen a new IRC message is received from the daemon, it is added to the\nrespective channel's message log.\n\n\n### Message Flow\n\nWhen a client connects to the daemon, the daemon sends it a Hello message\ncontaining it's Client ID \u0026 the list of available channels. The client can then\nreply with a Subscribe message containing the list of channels it cares about.\n\nThen when a client sends a chat message or the IRC server sends us a new\nmessage, the message is forwarded to any clients subscribed to the channel.\n\nWhen a client exits, it sends a Goodbye message to let the daemon know it can\nclose it's message queue \u0026 socket connection.\n\n\n## License\n\nGPL-3.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprikhi%2Fhirc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprikhi%2Fhirc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprikhi%2Fhirc/lists"}