{"id":13773117,"url":"https://github.com/eazar001/irc_client","last_synced_at":"2026-01-16T14:56:26.984Z","repository":{"id":89575857,"uuid":"46007007","full_name":"eazar001/irc_client","owner":"eazar001","description":"IRC client library for SWI Prolog","archived":false,"fork":false,"pushed_at":"2017-03-27T02:41:24.000Z","size":49,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2024-02-15T02:33:21.746Z","etag":null,"topics":["irc","irc-client","irc-protocol","prolog","swi-prolog"],"latest_commit_sha":null,"homepage":null,"language":"Prolog","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/eazar001.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}},"created_at":"2015-11-11T20:10:40.000Z","updated_at":"2018-05-30T14:58:30.000Z","dependencies_parsed_at":"2024-01-13T10:43:28.579Z","dependency_job_id":"bd3c5b55-a232-4a2c-8c94-49da68e05f46","html_url":"https://github.com/eazar001/irc_client","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eazar001%2Firc_client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eazar001%2Firc_client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eazar001%2Firc_client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eazar001%2Firc_client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eazar001","download_url":"https://codeload.github.com/eazar001/irc_client/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253523690,"owners_count":21921815,"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","irc-client","irc-protocol","prolog","swi-prolog"],"created_at":"2024-08-03T17:01:11.586Z","updated_at":"2026-01-16T14:56:26.961Z","avatar_url":"https://github.com/eazar001.png","language":"Prolog","funding_links":[],"categories":["API interfaces"],"sub_categories":[],"readme":"\n# What this is\n\nThis is a low level IRC client library for making anything related to\nIRC usage. For example, one can make a traditional bot, conversation\nanalyzer, simple logging system, statistics tracker, or even a full\nblown IRC Chat application.\n\n# What this does\n\nThis is a layer of abstraction over the IRC protocol. It helps you\nestablish connections to multiple servers and channels, using different\nnicknames. Each connection will run in separate threads that contain\naliases that you give to them. The job of irc_client is to handle the\nbookkeeping of all the specs for each server connection, and handle the\nstreaming of IRC server relayed messages to event handlers that you\ndeclare. This does NOT maintain persistent connections, or even display\nthe text for you. However, this is simple enough to do by asserting \nevent handlers. See the `examples.pl` file in the examples folder for a\nclue on how to get this done. Also, an example of an IRC bot that uses\nthis library can be found at: https://github.com/eazar001/yesbot\n\n# How do I use this?\n\n```prolog\n% sends a message in the ##prolog channel saying \"hello world\", using\n% the connection with the alias, \"freenode\".\n?- priv_msg(freenode, \"hello world\", \"##prolog\").\n\n% sends a message to the user \"nick02\" with \"hello\" and \"world\", each\n% on separate lines, on the connection with the alias, \"efnet\".\n?- priv_msg(efnet, \"hello\\nworld\", \"nick02\").\n\n% sends an invitation to ##math, for freenode user, \"user001\"\n?- send_msg(freenode, invite, \"user001\", \"##math\").\n\n% disconnects from server on the efnet connection alias.\n?- send_msg(efnet, quit).\n```\n\nOne of the most important predicates is `priv_msg/N`. This is needed\nfor sending private messages to channels, or to individual users.\n\n* priv_msg(+Id, +Text, +Recipient)\n  This will send Text to the Recipient, on the connection Id. Id is\n  an atom; Text and Recipient are strings. If the character limit is\n  exceeded, the text will automatically be segmented into several\n  messages, until the full message is delivered.\n\n* priv_msg(+Id, +Text, +Recipient, :Options).\n  Here one has special options. `auto_nl(Boolean)` where Boolean can be\n  specified as true or false. If true, messages that are too large\n  will be automatically segmented into multiple messages. `at_most(N)`,\n  where N represents the number of lines that will be sent (at most).\n  This is useful for rate limiting.\n\nAnother important group of predicates is `send_msg/N`. This group of\npredicates is responsible for sending certain types of messages that\nare responsible for carrying out various IRC actions. A basic\nunderstanding of IRC protocols is required to use these. The arity (N)\nof send_msg/N, at this point, ranges from 2 to 4. ALL OF THESE commands\nmust have the first argument as the connection ID to send the message\non. The format for these commands are listed below:\n\n* send_msg(ID, admin, \"target\").\n* send_msg(ID, away, \"away message\")\n* send_msg(ID, help)\n* send_msg(ID, info).\n* send_msg(ID, links).\n* send_msg(ID, lusers, \"##channel\").\n* send_msg(ID, names, \"##channel\").\n* send_msg(ID, oper, \"username\", \"pass\").\n* send_msg(ID, rules).\n* send_msg(ID, userip, \"nick\").\n* send_msg(ID, users).\n* send_msg(ID, who_op, \"##channel\").\n* send_msg(ID, who_ops).\n* send_msg(ID, whois, \"nick\").\n* send_msg(ID, whowas, \"nick\").\n* send_msg(ID, notice, \"message\", \"chan or nick\").\n* send_msg(ID, time, \"server\").\n* send_msg(ID, kick, \"##channel\", \"user\").\n* send_msg(ID, invite, \"user\", \"##channel\").\n* send_msg(ID, topic, \"##channel\", \"topic message\").\n* send_msg(ID, quit).\n* send_msg(ID, nick, \"nickname\").\n* send_msg(ID, join, \"channel\").\n\nThere is an examples folder containing examples (with comments) that\ndemonstrate how this is meant to be used.\n\n# What else?\n\nI will add more commands and features as I find time to work on this,\nbut for now ... pull requests are very much welcome.\n\nAt the time of writing this, this library is being used for one of the\nbots in ##prolog (Yesbot). There's another bot that's used for\ninteractive prolog commands in-channel (PrologMUD). The second bot can\nbe found at https://github.com/TeamSPoon/MUD_ircbot\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feazar001%2Firc_client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feazar001%2Firc_client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feazar001%2Firc_client/lists"}