Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
IRC bot mini-framework
Go
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
bot.go
client.go
parser.go
parser_test.go

README.md

Gorbachov

Mini framework for writing IRC bots in Go. Just for fun (there are like 1000 others)

Installation

go get github.com/ivoscc/gorbachov

Usage

To build a simple (and annoying) echo bot that will repeat everything you say, you can do the following.

package main

import (
    "github.com/ivoscc/gorbachov"
)

func EchoHandler(bot *gorbachov.Bot, message gorbachov.Message) {
    text := message.GetPrivMSG()
    bot.Say(text)
}

func main() {
    // Declare the bot
    bot := gorbachov.CreateBot("irc.freenode.org:6667", "Gorbachov", "#some_channel")
    bot.AddHandler(".*", EchoHandler) // You may use any regexp here
    bot.Start()
}

And that's it.

Something went wrong with that request. Please try again.