{"id":13715682,"url":"https://github.com/thoj/go-ircevent","last_synced_at":"2025-05-07T05:31:33.701Z","repository":{"id":728613,"uuid":"377209","full_name":"thoj/go-ircevent","owner":"thoj","description":"Event based IRC client library in Go (golang)","archived":false,"fork":false,"pushed_at":"2023-03-07T03:22:24.000Z","size":214,"stargazers_count":502,"open_issues_count":14,"forks_count":108,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-11-14T04:34:25.247Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"babel/generator-babel-boilerplate","license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoj.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2009-11-18T14:55:35.000Z","updated_at":"2024-11-08T05:45:33.000Z","dependencies_parsed_at":"2023-07-09T08:34:34.966Z","dependency_job_id":null,"html_url":"https://github.com/thoj/go-ircevent","commit_stats":{"total_commits":213,"total_committers":48,"mean_commits":4.4375,"dds":0.5211267605633803,"last_synced_commit":"73e444401d645f686b4aa9adcab88fa78cf85a4f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoj%2Fgo-ircevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoj%2Fgo-ircevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoj%2Fgo-ircevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoj%2Fgo-ircevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoj","download_url":"https://codeload.github.com/thoj/go-ircevent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252822995,"owners_count":21809700,"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":[],"created_at":"2024-08-03T00:01:02.070Z","updated_at":"2025-05-07T05:31:33.422Z","avatar_url":"https://github.com/thoj.png","language":"Go","funding_links":[],"categories":["Frameworks"],"sub_categories":["Self-hosted"],"readme":"Description\n-----------\n\nEvent based irc client library.\n\n\nFeatures\n--------\n* Event based. Register Callbacks for the events you need to handle.\n* Handles basic irc demands for you\n\t* Standard CTCP\n\t* Reconnections on errors\n\t* Detect stoned servers\n\nInstall\n-------\n\t$ go get github.com/thoj/go-ircevent\n\nExample\n-------\nSee [examples/simple/simple.go](examples/simple/simple.go) and [irc_test.go](irc_test.go)\n\nEvents for callbacks\n--------------------\n* 001 Welcome\n* PING\n* CTCP Unknown CTCP\n* CTCP_VERSION Version request (Handled internaly)\n* CTCP_USERINFO\n* CTCP_CLIENTINFO\n* CTCP_TIME\n* CTCP_PING\n* CTCP_ACTION (/me)\n* PRIVMSG\n* MODE\n* JOIN\n\n+Many more\n\n\nAddCallback Example\n-------------------\n\tircobj.AddCallback(\"PRIVMSG\", func(event *irc.Event) {\n\t\t//event.Message() contains the message\n\t\t//event.Nick Contains the sender\n\t\t//event.Arguments[0] Contains the channel\n\t});\n\nPlease note: Callbacks are run in the main thread. If a callback needs a long\ntime to execute please run it in a new thread.\n\nExample:\n\n        ircobj.AddCallback(\"PRIVMSG\", func(event *irc.Event) {\n\t\tgo func(event *irc.Event) {\n                        //event.Message() contains the message\n                        //event.Nick Contains the sender\n                        //event.Arguments[0] Contains the channel\n\t\t}(event)\n        });\n\n\nCommands\n--------\n\tircobj := irc.IRC(\"\u003cnick\u003e\", \"\u003cuser\u003e\") //Create new ircobj\n\t//Set options\n\tircobj.UseTLS = true //default is false\n\t//ircobj.TLSOptions //set ssl options\n\tircobj.Password = \"[server password]\"\n\t//Commands\n\tircobj.Connect(\"irc.someserver.com:6667\") //Connect to server\n\tircobj.SendRaw(\"\u003cstring\u003e\") //sends string to server. Adds \\r\\n\n\tircobj.SendRawf(\"\u003cformatstring\u003e\", ...) //sends formatted string to server.n\n\tircobj.Join(\"\u003c#channel\u003e [password]\") \n\tircobj.Nick(\"newnick\") \n\tircobj.Privmsg(\"\u003cnickname | #channel\u003e\", \"msg\") // sends a message to either a certain nick or a channel\n\tircobj.Privmsgf(\u003cnickname | #channel\u003e, \"\u003cformatstring\u003e\", ...)\n\tircobj.Notice(\"\u003cnickname | #channel\u003e\", \"msg\")\n\tircobj.Noticef(\"\u003cnickname | #channel\u003e\", \"\u003cformatstring\u003e\", ...)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoj%2Fgo-ircevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoj%2Fgo-ircevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoj%2Fgo-ircevent/lists"}