💣 girc is a flexible IRC library for Go 👌
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
cmdhandler cmdhandler: add RawArgs field Nov 20, 2017
.travis.yml explicitly add 1.9 to travisci Jan 27, 2018
CONTRIBUTING.md update contrib ref Mar 3, 2018
LICENSE fix github license recognition Oct 27, 2017
README.md update contrib ref Mar 3, 2018
builtin.go fix Client.conn data race during pong; closes #11 Apr 7, 2018
cap.go fix: don't check if the CAP LS command has args (inspircd) Sep 13, 2018
cap_sasl.go make sasl error less specific Feb 4, 2018
cap_tags.go split out sasl and tag handling Feb 4, 2018
cap_test.go spelling, simplify Jul 3, 2017
client.go docs: rename reference to Client.Latency() Sep 9, 2018
client_test.go cleanup and fix some test cases Aug 19, 2017
commands.go add Ban, Unban and Mode to Commands Nov 30, 2017
conn.go add Event.Echo field Jan 28, 2018
conn_test.go remove proxy support in favor of new dialer interface implementation Aug 20, 2017
constants.go spelling.. Jan 28, 2018
ctcp.go use rune literals for ease of reading Nov 30, 2017
ctcp_test.go clean up ctcp tests Apr 18, 2017
doc.go update doc Mar 30, 2017
event.go Event.Pretty(): fill in reason even if none is given Sep 6, 2018
event_test.go add draft/msgid ircv3 support Jan 28, 2018
example_test.go Commands -> Cmd Jun 15, 2017
format.go Fix IsValidUser() (#12) Apr 27, 2018
format_test.go more tests; additional documentation Nov 30, 2017
handler.go add Event.Echo field Jan 28, 2018
modes.go use rune literals for ease of reading Nov 30, 2017
state.go client method refactoring; additional tests Jan 28, 2018
state_test.go client method refactoring; additional tests Jan 28, 2018

README.md

girc, a flexible IRC library for Go

Build Status Coverage Status GoDoc Go Report Card IRC Chat

Status

girc is fairly close to marking the 1.0.0 endpoint, which will be tagged as necessary, so you will be able to use this with care knowing the specific tag you're using won't have breaking changes

Features

  • Focuses on simplicity, yet tries to still be flexible.
  • Only requires standard library packages
  • Event based triggering/responses (example, and CTCP too!)
  • Documentation is mostly complete.
  • Support for almost all of the IRCv3 spec.
    • SASL Auth (currently only PLAIN and EXTERNAL is support by default, however you can simply implement SASLMech yourself to support additional mechanisms.)
    • Message tags (things like account-tag on by default)
    • account-notify, away-notify, chghost, extended-join, etc -- all handled seemlessly (cap.go for more info).
  • Channel and user tracking. Easily find what users are in a channel, if a user is away, or if they are authenticated (if the server supports it!)
  • Client state/capability tracking. Easy methods to access capability data (LookupChannel, LookupUser, GetServerOption (ISUPPORT), etc.)
  • Built-in support for things you would commonly have to implement yourself.

Installing

$ go get -u github.com/lrstanley/girc

Examples

See the examples within the documentation for real-world usecases. Here are a few real-world usecases/examples/projects which utilize girc:

Project Description
nagios-check-ircd Nagios utility for monitoring the health of an ircd
nagios-notify-irc Nagios utility for sending alerts to one or many channels/networks
matterbridge bridge between mattermost, IRC, slack, discord (and many others) with REST API

Working on a project and want to add it to the list? Submit a pull request!

Contributing

Please review the CONTRIBUTING doc for submitting issues/a guide on submitting pull requests and helping out.

License

Copyright (c) 2016 Liam Stanley <me@liamstanley.io>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

girc artwork licensed under CC 3.0 based on Renee French under Creative Commons 3.0 Attributions.

References