fixing my mistakes =x
This commit is contained in:
parent
50145ec6b8
commit
6db87aa78b
|
@ -109,7 +109,14 @@ local function onOpenChannel(channelId, channelName)
|
||||||
Console.addChannel(channelName, channelId)
|
Console.addChannel(channelName, channelId)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onOpenPrivateChannel(channelId, channelName)
|
local function onOpenPrivateChannel(receiver)
|
||||||
|
local privateTab = Console.getTab(receiver)
|
||||||
|
if privateTab == nil then
|
||||||
|
Console.addTab(receiver)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function onOpenOwnPrivateChannel(channelId, channelName)
|
||||||
local privateTab = Console.getTab(channelName)
|
local privateTab = Console.getTab(channelName)
|
||||||
if privateTab == nil then
|
if privateTab == nil then
|
||||||
Console.addChannel(channelName, channelId, true)
|
Console.addChannel(channelName, channelId, true)
|
||||||
|
@ -123,7 +130,7 @@ local function onCloseChannel(channelId)
|
||||||
local tab = Console.getTab(channel)
|
local tab = Console.getTab(channel)
|
||||||
if tab then
|
if tab then
|
||||||
consoleTabBar:removeTab(tab)
|
consoleTabBar:removeTab(tab)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -175,7 +182,8 @@ function Console.init()
|
||||||
connect(g_game, { onCreatureSpeak = onCreatureSpeak,
|
connect(g_game, { onCreatureSpeak = onCreatureSpeak,
|
||||||
onChannelList = onChannelList,
|
onChannelList = onChannelList,
|
||||||
onOpenChannel = onOpenChannel,
|
onOpenChannel = onOpenChannel,
|
||||||
onOpenOwnPrivateChannel = onOpenPrivateChannel,
|
onOpenPrivateChannel = onOpenPrivateChannel,
|
||||||
|
onOpenOwnPrivateChannel = onOpenOwnPrivateChannel,
|
||||||
onCloseChannel = onCloseChannel,
|
onCloseChannel = onCloseChannel,
|
||||||
onGameEnd = Console.clear })
|
onGameEnd = Console.clear })
|
||||||
|
|
||||||
|
@ -209,6 +217,7 @@ function Console.terminate()
|
||||||
disconnect(g_game, { onCreatureSpeak = onCreatureSpeak,
|
disconnect(g_game, { onCreatureSpeak = onCreatureSpeak,
|
||||||
onChannelList = onChannelList,
|
onChannelList = onChannelList,
|
||||||
onOpenChannel = onOpenChannel,
|
onOpenChannel = onOpenChannel,
|
||||||
|
onOpenPrivateChannel = onOpenPrivateChannel,
|
||||||
onOpenOwnPrivateChannel = onOpenPrivateChannel,
|
onOpenOwnPrivateChannel = onOpenPrivateChannel,
|
||||||
onCloseChannel = onCloseChannel,
|
onCloseChannel = onCloseChannel,
|
||||||
onGameEnd = Console.clear })
|
onGameEnd = Console.clear })
|
||||||
|
|
Loading…
Reference in New Issue