{"id":21980046,"url":"https://github.com/parafoxia/ircparser","last_synced_at":"2025-04-30T04:35:31.586Z","repository":{"id":50529698,"uuid":"519346565","full_name":"parafoxia/ircparser","owner":"parafoxia","description":"An IRC (RFC1459) parser and formatter, built in Rust.","archived":false,"fork":false,"pushed_at":"2022-08-02T01:20:19.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-31T09:39:06.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/ircparser","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parafoxia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-29T20:51:31.000Z","updated_at":"2024-02-23T21:49:57.000Z","dependencies_parsed_at":"2022-08-26T03:43:08.635Z","dependency_job_id":null,"html_url":"https://github.com/parafoxia/ircparser","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fircparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fircparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fircparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fircparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parafoxia","download_url":"https://codeload.github.com/parafoxia/ircparser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227174143,"owners_count":17742399,"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-11-29T17:09:23.709Z","updated_at":"2024-11-29T17:09:24.541Z","avatar_url":"https://github.com/parafoxia.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ircparser\n\nAn IRC (RFC1459) parser and formatter, built in Rust.\n\n`ircparser` should work on basically any Rust version, but the earliest version checked in the CI is v1.31 (the first version with Rust 2018 support).\n\n## Setup\n\nTo use the latest stable version of `ircparser`, add it to your Cargo.toml file like so:\n\n```toml\n[dependencies]\nircparser = \"^0.2.1\"\n```\n\nYou can also use the latest development version by specifying the following:\n\n```toml\n[dependencies]\nircparser = { git = \"https://github.com/parafoxia/ircparser\" }\n```\n\n## Usage\n\n`ircparser` currently only has one public function — `parse`.\nThis function takes a line of an IRC message, and parses it into an easy-to-use `Line` object.\n\n```rs\nuse ircparser;\n\nfn main() {\n    let msg = \"@id=123;name=rick :nick!user@host.tmi.twitch.tv PRIVMSG #rickastley :Never gonna give you up!\";\n    match ircparser::parse(msg) {\n        Ok(x) =\u003e {\n            let line = x;\n\n            assert_eq!(\u0026line.tags[\"id\"], \"123\");\n            if line.source.is_some() {\n                assert_eq!(line.source.unwrap(), \":nick!user@host.tmi.twitch.tv\");\n            }\n            assert_eq!(line.command, \"PRIVMSG\");\n            assert_eq!(line.params[0], \"#rickastley\");\n            assert_eq!(line.params[1], \"Never gonna give you up!\");\n        }\n        Err(e) =\u003e {\n            println!(\"A parsing error occured: {e}\");\n            return;\n        }\n    };\n}\n```\n\n## License\n\nThe `ircparser` crate for Rust is licensed under the [BSD 3-Clause License](https://github.com/parafoxia/ircparser/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparafoxia%2Fircparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparafoxia%2Fircparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparafoxia%2Fircparser/lists"}