{"id":37164365,"url":"https://github.com/darkliquid/goirc","last_synced_at":"2026-01-14T19:31:35.878Z","repository":{"id":13558672,"uuid":"16250856","full_name":"darkliquid/goirc","owner":"darkliquid","description":"Event-based stateful IRC client framework for Go.","archived":false,"fork":true,"pushed_at":"2014-02-01T23:47:27.000Z","size":796,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"go1","last_synced_at":"2024-06-20T12:51:01.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.pl0rt.org/code/goirc/","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"fluffle/goirc","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darkliquid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-26T09:57:01.000Z","updated_at":"2024-06-20T12:51:01.036Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/darkliquid/goirc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/darkliquid/goirc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkliquid%2Fgoirc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkliquid%2Fgoirc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkliquid%2Fgoirc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkliquid%2Fgoirc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darkliquid","download_url":"https://codeload.github.com/darkliquid/goirc/tar.gz/refs/heads/go1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darkliquid%2Fgoirc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-14T19:31:34.051Z","updated_at":"2026-01-14T19:31:35.866Z","avatar_url":"https://github.com/darkliquid.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"GoIRC Client Framework\n======================\n\n### Acquiring and Building\n\nPretty simple, really:\n\n\tgo get github.com/darkliquid/goirc/client\n\nThere is some example code that demonstrates usage of the library in `client.go`. This will connect to freenode and join `#go-nuts` by default, so be careful ;-)\n\nPlease note: this branch has been feature-frozen for a while. Check out master\nfor some interesting (but not backwards-compatible) changes that will become\nthe new go1 branch when they're stable. See `fix/goirc.go` and the README there\nfor a quick way to migrate.\n\n### Using the framework\n\nSynopsis:\n\n    import \"flag\"\n\timport irc \"github.com/darkliquid/goirc/client\"\n\n\tfunc main() {\n        flag.Parse() // parses the logging flags.\n\t\tc := irc.SimpleClient(\"nick\")\n\t\t// Optionally, enable SSL\n\t\tc.SSL = true\n\n\t\t// Add handlers to do things here!\n\t\t// e.g. join a channel on connect.\n\t\tc.AddHandler(irc.CONNECTED,\n\t\t\tfunc(conn *irc.Conn, line *irc.Line) { conn.Join(\"#channel\") })\n\t\t// And a signal on disconnect\n\t\tquit := make(chan bool)\n\t\tc.AddHandler(irc.DISCONNECTED,\n\t\t\tfunc(conn *irc.Conn, line *irc.Line) { quit \u003c- true })\n\n\t\t// Tell client to connect\n\t\tif err := c.Connect(\"irc.freenode.net\"); err != nil {\n\t\t\tfmt.Printf(\"Connection error: %s\\n\", err.String())\n\t\t}\n\n\t\t// Wait for disconnect\n\t\t\u003c-quit\n\t}\n\nThe test client provides a good (if basic) example of how to use the framework.\nReading `client/handlers.go` gives a more in-depth look at how handlers can be\nwritten. Commands to be sent to the server (e.g. PRIVMSG) are methods of the\nmain `*Conn` struct, and can be found in `client/commands.go` (not all of the\npossible IRC commands are implemented yet). Events are produced directly from\nthe messages from the IRC server, so you have to handle e.g. \"332\" for\n`RPL_TOPIC` to get the topic for a channel.\n\nThe vast majority of handlers implemented within the framework deal with state\ntracking of all nicks in any channels that the client is also present in. These\nhanders are in `client/state_handlers.go`. State tracking is optional, disabled\nby default, and can be enabled and disabled by calling `EnableStateTracking()`\nand `DisableStateTracking()` respectively. Doing this while connected to an IRC\nserver will probably result in an inconsistent state and a lot of warnings to\nSTDERR ;-)\n\n### Misc.\n\nSorry the documentation is crap. Use the source, Luke.\n\n[Feedback](mailto:a.bramley@gmail.com) on design decisions is welcome. I am\nindebted to Matt Gruen for his work on\n[go-bot](http://code.google.com/p/go-bot/source/browse/irc.go) which inspired\nthe re-organisation and channel-based communication structure of `*Conn.send()`\nand `*Conn.recv()`. I'm sure things could be more asynchronous, still.\n\nThis code is (c) 2009-11 Alex Bramley, and released under the same licence terms\nas Go itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkliquid%2Fgoirc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkliquid%2Fgoirc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkliquid%2Fgoirc/lists"}