To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Module:ChangeLog

From ZNC
Revision as of 09:19, 2 April 2017 by DarthGandalf (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Documentation for this module may be created at Module:ChangeLog/doc

local p = {}

function p.prev(frame)
  local versions = mw.text.split(frame:expandTemplate{title='ZNC-Versions'}, '%s')
  local found = nil
  for i = 1, #versions, 1 do
    if versions[i] == frame.args.this then
      found = i - 1
      break
    end
  end
  local result, num = mw.ustring.gsub(frame.args.template, 'XXX', versions[found])
  return result
end

function p.next(frame)
  local versions = mw.text.split(frame:expandTemplate{title='ZNC-Versions'}, '%s')
  local found = nil
  for i = 1, #versions, 1 do
    if versions[i] == frame.args.this then
      found = i + 1
      break
    end
  end
  local result, num = mw.ustring.gsub(frame.args.template, 'XXX', versions[found])
  return result
end

function p.stability(frame)
  if frame:expandTemplate{title='ZNC-Version'} == frame.args.this then
    return 'stable'
  end
  local versions = mw.text.split(frame:expandTemplate{title='ZNC-Versions'}, '%s')
  local result = 'unknown'
  for i = 1, #versions, 1 do
  end
  return result
end

return p