{"id":36252131,"url":"https://github.com/jerodev/php-irc-client","last_synced_at":"2026-01-11T07:01:27.618Z","repository":{"id":56998088,"uuid":"173153410","full_name":"jerodev/php-irc-client","owner":"jerodev","description":"php irc client based on ReactPHP","archived":false,"fork":false,"pushed_at":"2023-10-30T12:57:20.000Z","size":120,"stargazers_count":16,"open_issues_count":1,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-14T20:54:40.807Z","etag":null,"topics":["irc","php","reactphp"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/jerodev.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":"2019-02-28T17:08:30.000Z","updated_at":"2024-11-08T02:20:31.000Z","dependencies_parsed_at":"2024-11-19T01:44:21.136Z","dependency_job_id":null,"html_url":"https://github.com/jerodev/php-irc-client","commit_stats":{"total_commits":45,"total_committers":4,"mean_commits":11.25,"dds":0.5333333333333333,"last_synced_commit":"5548cd764363eddcd5b5a8fadfdce0d15683bbed"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jerodev/php-irc-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerodev%2Fphp-irc-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerodev%2Fphp-irc-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerodev%2Fphp-irc-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerodev%2Fphp-irc-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerodev","download_url":"https://codeload.github.com/jerodev/php-irc-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerodev%2Fphp-irc-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28296941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T04:44:51.577Z","status":"ssl_error","status_checked_at":"2026-01-11T04:44:44.232Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["irc","php","reactphp"],"created_at":"2026-01-11T07:01:05.553Z","updated_at":"2026-01-11T07:01:27.610Z","avatar_url":"https://github.com/jerodev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP IRC Client\n[![Build Status](https://travis-ci.com/jerodev/php-irc-client.svg?branch=master)](https://travis-ci.com/jerodev/php-irc-client) [![StyleCI](https://github.styleci.io/repos/173153410/shield?branch=master)](https://github.styleci.io/repos/173153410) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/jerodev/php-irc-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/jerodev/php-irc-client/?branch=master)\n\nA pure PHP IRC client based on [ReactPHP](https://reactphp.org/).\n\n\u003e :wrench: This project is under development and will probably not work in its current state.\n\n## Documentation\n\n  - [Client](#client)\n    - [Connecting to the server](#client-connect)\n    - [Sending commands to the server](#client-send-command)\n    - [Joining a channel](#client-join-channel)\n    - [Leaving a channel](#client-leave-channel)\n    - [Sending messages](#client-sending-messages)\n  - [Events](#events)\n    - [Registered on server](#client-event-registered)\n    - [Message of the day](#client-event-motd)\n    - [Topic changed](#client-event-topic)\n    - [Channel users received](#client-event-names)\n    - [Message received](#client-event-message)\n    - [Ping received](#client-event-ping)\n\n---\n\n## Client\n\nThe client is the heart of the library, this object is used to perform all communication between your application and the IRC server. It will manage the connection to the IRC server and has all functions needed to interact with the server.\n\n    use Jerodev\\PhpIrcClient\\IrcClient;\n\n    $client = new IrcClient('irc.server:6667', 'Jerodev');\n    $client-\u003econnect();\n\n### \u003ca name=\"client-connect\"\u003e\u003c/a\u003e Connecting to the server\n\n    $client-\u003econnect()\n\nThis function opens the connection to the IRC server. Username has to be set before the connection can be opened.\n\n### \u003ca name=\"client-send-command\"\u003e\u003c/a\u003e Sending commands to the server\n\n    $client-\u003esend(string $command)\n\nSends a raw IRC command directly to the server. This method should only be used if you really know what you are doing, it is recommended to use the built-in functions below.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$command` | *string* | The raw irc command\n\n\n### \u003ca name=\"client-join-channel\"\u003e\u003c/a\u003e Joining a channel\n\n    $client-\u003ejoin(string $channel)\n\nJoins a specified channel\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$channel` | *string* | The name of the channel to join.\n\n### \u003ca name=\"client-leave-channel\"\u003e\u003c/a\u003e Leaving a channel\n\n    $client-\u003epart(string $channel)\n\nLeave a channel. If the specified channel has not yet been joined, nothing will happen.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$channel` | *string* | The name of the channel to part.\n\n### \u003ca name=\"client-sending-messages\"\u003e\u003c/a\u003e Sending messages\n\n    $client-\u003esay(string $target, string $message)\n\nSends a message to a channel or user.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$target` | *string* | A name of a channel staring with `#` or the nickname of the user to send a message to.\n| `$message` | *string* | The message to send to the target.\n\n---\n\n## Events\n\nThe `on()` function on the client can be used to register to several different events. This can be done both before and after connecting to the IRC server. Events have variable callback arguments, all are described below.\n\n### \u003ca name=\"client-event-registered\"\u003e\u003c/a\u003e Registered on server\n\n    $client-\u003eon('registered', function () { });\n\nEmitted when the server sends the initial welcome message (`001`). This indicates that you are connected to the server.\n\n### \u003ca name=\"client-event-motd\"\u003e\u003c/a\u003e Message of the day\n\n    $client-\u003eon('motd', function (string $motd) { });\n\nEmitted when the server sends the message of the day to the client. If the message of the day is multiple lines, this event might be emitted multiple times.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$motd` | *string* | The server's *Message Of The Day*.\n\n### \u003ca name=\"client-event-topic\"\u003e\u003c/a\u003e Topic changed\n\n    $client-\u003eon('topic', function (string $channel, string $topic) { });\n\nEmitted when joining a channel or when the topic of a joined channel changes.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$channel` | *string* | The channel where the topic has changed.\n| `$topic` | *string* | The new topic for this channel.\n\n### \u003ca name=\"client-event-names\"\u003e\u003c/a\u003e Channel users received\n\n    $client-\u003eon('names', function (string $channel, string[] $nicks) { });\n\nEmitted when the server sends a list of nicks for a channel. This happens immediately after joining a channel and on request.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$channel` | *string* | The channel name.\n| `$names` | *string[]* | A list of nicknames who are currently in this channel.\n\n\u003e You can also specify the channel you want to listen on by adding `#channel` to the event.\u003cbr /\u003e\n\u003e For example: `$client-\u003eon('names#channel', function ($names) {})`\n\n### \u003ca name=\"client-event-message\"\u003e\u003c/a\u003e Message received\n\n    $client-\u003eon('message', function (string $from, IrcChannel $channel, string $message) { });\n\nEmitted when a message is sent to a connected channel.\n\n| Name | Type | Description\n| --- | --- | --- |\n| `$from` | *string* | The nickname of the user who sent the message.\n| `$channel` | *IrcChannel* | The channel where the message was sent.\n| `$message` | *string* | The received message.\n\n\u003e You can also specify the channel you want to listen on by adding `#channel` to the event.\u003cbr /\u003e\n\u003e For example: `$client-\u003eon('message#channel', function ($from, $channel, $message) {})`\n\n### \u003ca name=\"client-event-ping\"\u003e\u003c/a\u003e Ping received\n\n    $client-\u003eon('ping', function () { });\n\nEmitted when the server sends a `ping` request to the client. The pong request has already been sent back to the server before this event is emitted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerodev%2Fphp-irc-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerodev%2Fphp-irc-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerodev%2Fphp-irc-client/lists"}