Skip to content

Extensible Mumble bot that can play audio and control MPD through chat commands.

License

Notifications You must be signed in to change notification settings

promi/mumble-pluginbot-plusplus

Repository files navigation

mumble-pluginbot-plusplus

Build Status Coverty Scan Status

Introduction

mumble-pluginbot-plusplus is an extensible Mumble bot which can play audio, can be fed by different sources, and much more.

It is a C++ rewrite of several libraries and the original mumble-ruby-pluginbot written in Ruby:

Thanks to all the original authors! See the source code for copyright information.

Status

The rewrite is not complete yet.

What works:

  • Command line parsing (Pass "--help" to the executable to see the syntax)
  • Creating a RSA private + public key pair (PEM format)
  • Creating a X.509 certificate (PEM format)
  • Connection to a Mumble server
  • Auto moving to a channel after connect
  • Some simple chat commands such as ".help"
  • FIFO reading / OPUS encoding / Streaming
  • MPD plugin
  • Version plugin
  • Messages plugin
  • YouTube plugin

What doesn't work:

  • Some chat commands don't work
  • Soundcloud plugin
  • Bandcamp plugin
  • Ektoplazm plugin
  • Radiostream plugin
  • CELT support
  • Portaudio support
  • WAV reading / writing
  • Automatic MPD startup
  • Probably more ;)

Dependencies

The code is using modern C++ language features only present in C++14.

  • GCC 4.9+ or Clang 3.6+
  • autoconf
  • automake
  • libtool
  • OpenSSL (libcrypto + libssl)
  • libopus 1.1
  • libprotobuf
  • protobuf (for the protoc compiler)
  • libmpdclient
  • libuv (will most likely be an optional dependency in the future)
  • uvw (is automatically pulled in via a Git submodule)

On Debian you can get the dependencies using Apt:

sudo apt-get install build-essential automake libtool pkg-config libopus-dev libssl-dev libprotobuf-dev libmpdclient-dev protobuf-compiler

On Ubuntu 14.04 (Trusty Thar) (GCC) you have to also add the ubuntu-toolchain-r/test PPA:

sudo apt-add-repository "ppa:ubuntu-toolchain-r/test"
sudo apt-get install build-essential automake libtool g++-4.9 libopus-dev libssl-dev libprotobuf-dev libmpdclient-dev protobuf-compiler

Building + Installing

The repository is autotools-based, you have to regenerate the configure script:

./autogen.sh

Then the usual autotools process applies:

./configure
make
sudo make install

There is experimental support for Debian Jessie and Ubuntu Trusty, invoke configure like this:

CXX='g++ -std=c++1y' ./configure --without-libuv

It also works without installing. libtool provides a wrapper script for this:

./mumble-pluginbot-plusplus --help

A running mpd is currently necessary or the bot will crash, there is a script included to start mpd:

tools/start-mpd.sh

However the script expects a working mpd.conf in ~/.config/mumble-pluginbot-plusplus/mpd.conf. You can start with the example script from the mumble-ruby-pluginbot repository:

https://github.com/MusicGenerator/mumble-ruby-pluginbot/blob/master/templates/mpd.conf

Debugging

When using gdb either install first and invoke gdb as usual or use libtools execute mode to debug without installing:

libtool --mode=execute gdb --args ./mumble-pluginbot-plusplus -h mumble.example.org ...

For the best debugging experience compile with debugging symbols and without optimizations:

CXX='clang++ -std=c++14' CXXFLAGS='-O0 -ggdb' ./configure

License

mumble-pluginbot-plusplus is licensed under the AGPLv3+ license. The original code is licensed under the MIT license.

Code structure

The code consists of several libtool libraries and a binary:

  • libaither - Contains a Log class with severity levels
  • libmumble-pluginbot-plusplus-io - Basic File I/O
  • libmumble-pluginbot-plusplus-network - TCP network socket
  • libmumble-pluginbot-plusplus-openssl - Wrapper for OpenSSL (certificate + SSL/TLS)
  • libmumble-pluginbot-plusplus-opus - libopus C++ wrapper
  • libmumble-pluginbot-plusplus-mumble - Utility classes to talk to a Mumble server
  • libmumble-pluginbot-plusplus-mpd - Utility classes to talk to a MPD server
  • mumble-pluginbot-plusplus - The main binary containing the core Bot and the enabled plugins

About

Extensible Mumble bot that can play audio and control MPD through chat commands.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published