From 7efd3aefc6bd26d1afe0ffc845c77f6a8d9432d1 Mon Sep 17 00:00:00 2001 From: blackbeard420 Date: Thu, 6 Mar 2025 21:41:28 -0500 Subject: [PATCH] readme --- readme.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..12d4412 --- /dev/null +++ b/readme.md @@ -0,0 +1,23 @@ +[![Go Report Card](https://goreportcard.com/badge/git.thc420.dev/blackbeard420/irc)](https://goreportcard.com/report/git.thc420.dev/blackbeard420/irc) + +# irc + +Basic but complete irc library for go + +- [x] Callbacks for Messages (direct and channel), Joins/parts/quits and numeric codes +- [x] Maintains list of nicks in a channel +- [ ] TLS support (upcoming) + +## usage + +basic example: + +```go +con := NewConnection("irc.ouch.chat:6667", "irc-go", "irc-go", nil, []string{channel}) + +con.PrivmsgCallback = func(target, from, msg) { + log.Printf("message from %s in channel %s > %s", GetNick(from), target, msg) +} + +con.Run() +``` \ No newline at end of file