fancy-prompt.lua: fix parametrized modes
This commit is contained in:
parent
b666ce6926
commit
a813babb89
|
@ -52,11 +52,11 @@ local prompt = degesch.hook_prompt (function (hook)
|
||||||
if active ~= "" then active = "(" .. active .. ")" end
|
if active ~= "" then active = "(" .. active .. ")" end
|
||||||
local x = current_n .. ":" .. current.name
|
local x = current_n .. ":" .. current.name
|
||||||
if chan then
|
if chan then
|
||||||
local param = ""
|
local params = ""
|
||||||
for mode, param in pairs (chan.param_modes) do
|
for mode, param in pairs (chan.param_modes) do
|
||||||
param = param .. " +" .. mode .. " " .. param
|
params = params .. " +" .. mode .. " " .. param
|
||||||
end
|
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 modes ~= "" then x = x .. "(+" .. modes .. ")" end
|
||||||
if chan.users_len ~= 0 then x = x .. "{" .. chan.users_len .. "}" end
|
if chan.users_len ~= 0 then x = x .. "{" .. chan.users_len .. "}" end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue