goxxx

module
v0.0.0-...-25f99af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2017 License: MIT

README

goxxx Build Status

IRC bot written in Go.

Install

Once you have a working installation of Go (Go version >= 1.5), you just need to run:

$ go get github.com/vaz-ar/goxxx

Build

Under $GOPATH/src/github.com/vaz-ar/goxxx, run:

$ make

Usage

Minimal command to start goxxx is the following:

$ goxxx -channel "#my_channel" -config config.ini

Where config.ini is a configuration file (see sample_config.ini to write your own file).

To get help about program usage, just run:

$ goxxx
Configuration file
  • By default goxxx will search for a file named goxxx.ini in the directory where it is started.
  • You can also specify a path for the configuration file via the -config flag.
Log file
  • The log file will be created in the directory where goxxx is started, and will be named goxxx_logs.txt.
Troubles

If command fails silently, search in goxxx_logs.txt for similar lines:

2016/09/28 17:33:42 unable to open database file
2016/09/28 17:33:42 Error while applying migrations, exiting ...

You need to set correct permissions on ./storage/:

$ chmod u+rw storage

Commands

Currently implemented commands:

invoke
  • !invoke <nick> [<message>] => Send an email to an user, with an optionnal message
memo
  • !memo/!m <nick> <message> => Leave a memo for another user
  • !memostat/!ms => Get the list of the unread memos (List only the memos you left)
pictures
  • !p/!pic <search terms> => Search in the database for pictures matching <search terms>
  • !addpic <url> <tag> [#NSFW] => Add a picture in the database for <tag> (<url> must have an image extension)
  • !rmpic <url> <tag> => Remove a picture in the database for <tag> (Admin only command)
quote
  • !q/!quote <nick> [<part of message>]
  • !aq/!addquote <nick> <part of message>
  • !rmq/!rmquote <nick> <part of the quote> (Admins only)
  • !d/!dg/!ddg <terms to search> => Search on DuckduckGo
  • !w/!wiki <terms to search> => Search on Wikipedia EN
  • !wf/!wfr <terms to search> => Search on Wikipedia FR
  • !u/!ud <terms to search> => Search on Urban Dictionnary
url
  • !url <search terms>=> Return links with titles matching <search terms>
xkcd
  • !xkcd [<comic number>] => Return the XKCD comic corresponding to the number. If number is not specified, returns the last comic.

Tests

to run the tests:

$ make test

It will run the tests for all the packages.

Development / Contributions

Pull requests are welcome.

Directories

Path Synopsis
Package core contains the bot's core functionalities
Package core contains the bot's core functionalities
Package database manages the database used by the bot
Package database manages the database used by the bot
Main package for the goxxx project For the details see the file goxxx.go, as godoc won't show the documentation for the main package.
Main package for the goxxx project For the details see the file goxxx.go, as godoc won't show the documentation for the main package.
modules
help
Package help manages the help messages
Package help manages the help messages
invoke
Package invoke allow to send an email to an user, asking her/him to join a channel
Package invoke allow to send an email to an user, asking her/him to join a channel
memo
Package memo allow to leave memo for AFK users
Package memo allow to leave memo for AFK users
pictures
Package pictures contains picture related commands
Package pictures contains picture related commands
quote
Package quote contains quote commands
Package quote contains quote commands
search
Package search allow to do web searches Current sources: - DuckduckGo - Urban Dictionnary - Wikipedia EN - Wikipedia FR
Package search allow to do web searches Current sources: - DuckduckGo - Urban Dictionnary - Wikipedia EN - Wikipedia FR
webinfo
Package webinfo retrieves informations from links
Package webinfo retrieves informations from links
xkcd
Package xkcd retrieves XKCD Comics
Package xkcd retrieves XKCD Comics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL