Add password for joining channels in whosniffer
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -282,6 +282,7 @@ end
|
|||||||
|
|
||||||
-- CHANNEL fuckery
|
-- CHANNEL fuckery
|
||||||
local channel = aura_env.config.channelName or "foobar"
|
local channel = aura_env.config.channelName or "foobar"
|
||||||
|
local password = aura_env.config.channelPassword
|
||||||
local channelId = nil
|
local channelId = nil
|
||||||
|
|
||||||
local function GetChannelId(channelName)
|
local function GetChannelId(channelName)
|
||||||
@@ -298,8 +299,12 @@ end
|
|||||||
channelId = GetChannelId(channel)
|
channelId = GetChannelId(channel)
|
||||||
if not channelId then
|
if not channelId then
|
||||||
print(string.format("channel %s not found, joining", channel))
|
print(string.format("channel %s not found, joining", channel))
|
||||||
|
if password then
|
||||||
|
JoinPermanentChannel(channel, password)
|
||||||
|
else
|
||||||
JoinPermanentChannel(channel)
|
JoinPermanentChannel(channel)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
channelId = GetChannelId(channel)
|
channelId = GetChannelId(channel)
|
||||||
aura_env.channelId = channelId
|
aura_env.channelId = channelId
|
||||||
print(string.format("channel %s resolved to id %d", channel, channelId))
|
print(string.format("channel %s resolved to id %d", channel, channelId))
|
||||||
|
Reference in New Issue
Block a user