Various fixes related to channel modes

Bugs unnoticed for so long.
This commit is contained in:
2016-12-30 07:49:10 +01:00
parent eb70bf3fbc
commit 8e668ff31a
3 changed files with 39 additions and 13 deletions

View File

@@ -51,14 +51,14 @@ local prompt = degesch.hook_prompt (function (hook)
end
if active ~= "" then active = "(" .. active .. ")" end
local x = current_n .. ":" .. current.name
if chan then
if chan and chan.users_len ~= 0 then
local params = ""
for mode, param in pairs (chan.param_modes) do
params = params .. " +" .. mode .. " " .. param
end
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
x = x .. "{" .. chan.users_len .. "}"
end
if current.hide_unimportant then x = x .. "<H>" end