updated chat command to support new oo standard
This commit is contained in:
parent
ce56ec3fd6
commit
8e190baa75
@ -34,7 +34,7 @@ regchat(
|
|||||||
"reset", {
|
"reset", {
|
||||||
privs = {},
|
privs = {},
|
||||||
func = function(user)
|
func = function(user)
|
||||||
modpol.reset_orgs();
|
modpol.orgs.reset();
|
||||||
return true, "Reset orgs"
|
return true, "Reset orgs"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -51,7 +51,7 @@ regchat(
|
|||||||
"addorg", {
|
"addorg", {
|
||||||
privs = {} ,
|
privs = {} ,
|
||||||
func = function (user, param)
|
func = function (user, param)
|
||||||
local success, message = modpol.add_org (param, { user })
|
local success, message = modpol.instance:add_org (param)
|
||||||
return true, message
|
return true, message
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
@ -67,7 +67,7 @@ regchat(
|
|||||||
"listorg", {
|
"listorg", {
|
||||||
privs = {} ,
|
privs = {} ,
|
||||||
func = function (user, param)
|
func = function (user, param)
|
||||||
return true, "Orgs:\n" .. modpol.list_orgs()
|
return true, "Orgs:\n" .. modpol.orgs.list_all()
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ regchat(
|
|||||||
"joinorg", {
|
"joinorg", {
|
||||||
privs = {},
|
privs = {},
|
||||||
func = function(user, param)
|
func = function(user, param)
|
||||||
local org_id = modpol.get_org_id_by_name(param)
|
local org = modpol.orgs.get_org(param)
|
||||||
local success, result = modpol.add_member(org_id, user)
|
local success, result = org:add_member(user)
|
||||||
return true, result
|
return true, result
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user