fancy-prompt.lua: fix parametrized modes

This commit is contained in:
Přemysl Eric Janouch 2016-12-02 12:28:12 +01:00
parent b666ce6926
commit a813babb89
Signed by: p
GPG Key ID: B715679E3A361BE6
1 changed files with 3 additions and 3 deletions

View File

@ -52,11 +52,11 @@ local prompt = degesch.hook_prompt (function (hook)
if active ~= "" then active = "(" .. active .. ")" end
local x = current_n .. ":" .. current.name
if chan then
local param = ""
local params = ""
for mode, param in pairs (chan.param_modes) do
param = param .. " +" .. mode .. " " .. param
params = params .. " +" .. mode .. " " .. param
end
local modes = chan.no_param_modes .. param:sub (2)
local modes = chan.no_param_modes .. params:sub (3)
if modes ~= "" then x = x .. "(+" .. modes .. ")" end
if chan.users_len ~= 0 then x = x .. "{" .. chan.users_len .. "}" end
end