Fixed a crash related to default channels
This commit is contained in:
parent
1c64bb07a0
commit
0dcbd28036
|
@ -3,6 +3,8 @@ MumbleDJ Changelog
|
||||||
|
|
||||||
### October 18, 2014
|
### October 18, 2014
|
||||||
* Fixed a crash when an error occurs during the audio downloading & encoding process.
|
* Fixed a crash when an error occurs during the audio downloading & encoding process.
|
||||||
|
* Fixed a crash that occurs when the bot tries to join a default channel that does not exist. If the default channel does not exist, the bot will just move itself
|
||||||
|
to the root of the server instead.
|
||||||
|
|
||||||
### October 13, 2014
|
### October 13, 2014
|
||||||
* Added `SETUP.md` which contains a guide on how to configure MumbleDJ and install its dependencies.
|
* Added `SETUP.md` which contains a guide on how to configure MumbleDJ and install its dependencies.
|
||||||
|
|
|
@ -16,6 +16,10 @@ function piepan.onConnect()
|
||||||
print(piepan.me.name .. " has connected to the server!")
|
print(piepan.me.name .. " has connected to the server!")
|
||||||
local user = piepan.users[piepan.me.name]
|
local user = piepan.users[piepan.me.name]
|
||||||
local channel = user.channel(config.DEFAULT_CHANNEL)
|
local channel = user.channel(config.DEFAULT_CHANNEL)
|
||||||
|
if channel == nil then
|
||||||
|
print("The channel '" .. config.DEFAULT_CHANNEL .. "' does not exist. Moving bot to root of server...")
|
||||||
|
channel = piepan.channels[0]
|
||||||
|
end
|
||||||
piepan.me:moveTo(channel)
|
piepan.me:moveTo(channel)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Reference in a new issue