{"id":13726272,"url":"https://github.com/johnelse/ocaml-irc-client","last_synced_at":"2025-10-14T17:10:14.453Z","repository":{"id":7746955,"uuid":"9114201","full_name":"johnelse/ocaml-irc-client","owner":"johnelse","description":"OCaml IRC client library","archived":false,"fork":false,"pushed_at":"2023-06-30T21:18:20.000Z","size":341,"stargazers_count":51,"open_issues_count":7,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-07T17:05:25.784Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnelse.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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}},"created_at":"2013-03-30T10:12:59.000Z","updated_at":"2024-11-05T00:11:32.000Z","dependencies_parsed_at":"2024-01-06T02:03:34.268Z","dependency_job_id":"4830e4a0-4889-4f13-baa0-63709a9a8703","html_url":"https://github.com/johnelse/ocaml-irc-client","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/johnelse/ocaml-irc-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnelse%2Focaml-irc-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnelse%2Focaml-irc-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnelse%2Focaml-irc-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnelse%2Focaml-irc-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnelse","download_url":"https://codeload.github.com/johnelse/ocaml-irc-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnelse%2Focaml-irc-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020087,"owners_count":26086805,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-03T01:02:57.709Z","updated_at":"2025-10-14T17:10:14.432Z","avatar_url":"https://github.com/johnelse.png","language":"OCaml","funding_links":[],"categories":["OCaml"],"sub_categories":[],"readme":"IRC client library, supporting Lwt and Unix blocking IO.\n\n[![Build status](https://github.com/johnelse/ocaml-irc-client/actions/workflows/workflow.yml/badge.svg)](https://github.com/johnelse/ocaml-irc-client/actions)\n[![Coverage Status](https://coveralls.io/repos/johnelse/ocaml-irc-client/badge.svg?branch=master)](https://coveralls.io/r/johnelse/ocaml-irc-client?branch=master)\n[![API reference](https://img.shields.io/badge/docs-API_reference-blue.svg)](https://johnelse.github.io/ocaml-irc-client)\n\nBuild dependencies\n------------------\n\n* [lwt](http://ocsigen.org/lwt/) (optional)\n* [dune](https://github.com/ocaml/dune)\n* [logs](https://github.com/dbuenzli/logs)\n\nTo run tests:\n* [ounit](http://ounit.forge.ocamlcore.org/)\n\nThe latest tagged version is available via [opam](http://opam.ocaml.org): `opam install irc-client`\n\nUsage\n-----\n\nSimple bot which connects to a channel, sends a message, and then logs all\nmessages in that channel to stdout:\n\n```ocaml\nopen Lwt\nmodule C = Irc_client_lwt\n\nlet host = \"localhost\"\nlet port = 6667\nlet realname = \"Demo IRC bot\"\nlet nick = \"demoirc\"\nlet username = nick\nlet channel = \"#demo_irc\"\nlet message = \"Hello, world!  This is a test from ocaml-irc-client\"\n\nlet callback _connection result =\n  let open Irc_message in\n  match result with\n  | Result.Ok msg -\u003e\n    Lwt_io.printf \"Got message: %s\\n\" (to_string msg)\n  | Result.Error e -\u003e\n    Lwt_io.printl e\n\nlet lwt_main =\n  Lwt_unix.gethostbyname host\n  \u003e\u003e= fun he -\u003e C.connect ~addr:(he.Lwt_unix.h_addr_list.(0))\n                  ~port ~username ~mode:0 ~realname ~nick ()\n  \u003e\u003e= fun connection -\u003e Lwt_io.printl \"Connected\"\n  \u003e\u003e= fun () -\u003e C.send_join ~connection ~channel\n  \u003e\u003e= fun () -\u003e C.send_privmsg ~connection ~target:channel ~message\n  \u003e\u003e= fun () -\u003e C.listen ~connection ~callback ()\n  \u003e\u003e= fun () -\u003e C.send_quit ~connection\n\nlet _ = Lwt_main.run lwt_main\n```\n\nCompile the above with:\n\n```\nocamlfind ocamlopt -package irc-client.lwt -linkpkg code.ml\n```\n\nAlternatively, you can find it at `examples/example1.ml`; enable its compilation\nwith `./configure --enable-examples --enable-lwt`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnelse%2Focaml-irc-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnelse%2Focaml-irc-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnelse%2Focaml-irc-client/lists"}