diff --git a/mumbledj/.gitignore b/mumbledj/.gitignore index 6f065dc..b229014 100644 --- a/mumbledj/.gitignore +++ b/mumbledj/.gitignore @@ -1,2 +1 @@ -piepan -*.ogg +certs diff --git a/mumbledj/mumbledj.rb b/mumbledj/mumbledj.rb index eea1f9c..bd1f210 100644 --- a/mumbledj/mumbledj.rb +++ b/mumbledj/mumbledj.rb @@ -8,13 +8,12 @@ class MumbleDJ # Initializes a new instance of MumbleDJ. The parameters are as follows: # username: Desired username of the Mumble bot - # cert: Path to certificate file (if needed) # server_address: IP address/web address of Mumble server to connect to # server_port: Port number of Mumble server (generally 64738) # default_channel: The channel you would like the bot to connect to by # default. If the channel does not exist, the bot will connect to # the root channel of the server instead. - def initialize(username, server_address, server_port=64738, default_channel="", password="", cert="") + def initialize(username, server_address, server_port=64738, default_channel="", password="") @username = username @password = password @cert = cert @@ -25,9 +24,7 @@ class MumbleDJ Mumble.configure do |conf| conf.sample_rate = 48000 conf.bitrate = 32000 - if @cert != "" - conf.ssl_cert_opts[:cert_dir] = File.expand_path(@cert) - end + conf.ssl_cert_opts[:cert_dir] = File.expand_path("certs") end end diff --git a/mumbledj/run_bot.rb b/mumbledj/run_bot.rb index 7d94633..e79684f 100644 --- a/mumbledj/run_bot.rb +++ b/mumbledj/run_bot.rb @@ -1,7 +1,7 @@ require_relative "mumbledj" require 'thread' -bot = MumbleDJ.new(username="MumbleDJ", server_address="localhost") +bot = MumbleDJ.new(username="MumbleDJTest", server_address="matthieugrieger.com") bot.connect begin