2020-08-18 11:25:28 +02:00
minetest.register_privilege ( " playerfactions_admin " , { description = " Allow the use of all playerfactions commands " , give_to_singleplayer = false } )
2019-09-09 04:11:55 +02:00
-- Load support for intllib.
local MP = minetest.get_modpath ( minetest.get_current_modname ( ) )
local S , NS = dofile ( MP .. " /intllib.lua " )
-- Data
2019-09-09 21:56:38 +02:00
factions = { }
2020-07-29 09:20:46 +02:00
-- This variable "version" can be used by other mods to check the compatibility of this mod
2020-07-28 22:50:31 +02:00
factions.version = 2
2019-09-09 04:11:55 +02:00
local facts = { }
local storage = minetest.get_mod_storage ( )
2019-09-09 23:59:09 +02:00
if storage : get_string ( " facts " ) ~= " " then
2019-09-09 04:11:55 +02:00
facts = minetest.deserialize ( storage : get_string ( " facts " ) )
end
2020-02-08 18:08:01 +01:00
-- Fix factions
for fname , fact in pairs ( facts ) do
if fact.members == nil then
fact.members = { }
end
end
2020-08-18 11:25:28 +02:00
settings = Settings ( MP .. " /settings.txt " )
factions.mode_unique_faction = settings : get_bool ( " mode_unique_faction " , true )
2020-08-18 13:55:55 +02:00
factions.max_members_list = tonumber ( settings : get ( " max_members_list " ) ) or 50
2020-07-28 22:47:50 +02:00
2019-09-09 04:11:55 +02:00
local function save_factions ( )
storage : set_string ( " facts " , minetest.serialize ( facts ) )
end
-- Data manipulation
2020-07-28 22:50:31 +02:00
function factions . get_facts ( )
2020-08-18 11:25:28 +02:00
return { table.unpack ( facts ) }
2020-07-28 22:50:31 +02:00
end
function factions . player_is_in_faction ( fname , player_name )
if not minetest.player_exists ( player_name ) or facts [ fname ] == nil then
return false
2020-08-18 11:25:28 +02:00
end
2020-07-28 22:50:31 +02:00
return facts [ fname ] . members [ player_name ]
end
2019-09-09 21:56:38 +02:00
function factions . get_player_faction ( name )
2020-07-28 22:47:50 +02:00
if not minetest.player_exists ( name ) then
return false
end
for fname , fact in pairs ( facts ) do
if fact.members [ name ] then
return fname
end
end
return nil
end
2020-07-28 22:29:38 +02:00
2020-07-28 22:47:50 +02:00
function factions . get_player_factions ( name )
if not minetest.player_exists ( name ) then
return false
end
local player_factions = { }
for fname , fact in pairs ( facts ) do
if fact.members [ name ] then
table.insert ( player_factions , fname )
2020-02-08 18:08:01 +01:00
end
2020-07-28 22:47:50 +02:00
end
return player_factions
end
2020-07-28 22:29:38 +02:00
2020-08-18 11:35:51 +02:00
function factions . get_administered_factions ( name )
2020-07-28 22:47:50 +02:00
local own_factions = { }
for fname , fact in pairs ( facts ) do
if minetest.get_player_privs ( name ) . playerfactions_admin or fact.owner == name then
table.insert ( own_factions , fname )
2019-09-09 04:11:55 +02:00
end
end
2020-07-28 22:47:50 +02:00
return own_factions
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . get_owner ( fname )
if facts [ fname ] == nil then
return false
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
return facts [ fname ] . owner
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . chown ( fname , owner )
if facts [ fname ] == nil then
return false
end
facts [ fname ] . owner = owner
save_factions ( )
return true
2019-09-10 00:20:58 +02:00
end
2019-09-09 21:56:38 +02:00
function factions . register_faction ( fname , founder , pw )
2020-07-28 22:47:50 +02:00
if facts [ fname ] ~= nil then
return false
end
2019-09-09 04:11:55 +02:00
facts [ fname ] = {
name = fname ,
owner = founder ,
2020-02-08 18:08:01 +01:00
password = pw ,
2020-07-28 22:47:50 +02:00
members = { [ founder ] = true }
2019-09-09 04:11:55 +02:00
}
save_factions ( )
2020-07-28 22:47:50 +02:00
return true
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . disband_faction ( fname )
if facts [ fname ] == nil then
return false
end
facts [ fname ] = nil
2019-09-09 04:11:55 +02:00
save_factions ( )
2020-07-28 22:47:50 +02:00
return true
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . get_password ( fname )
if facts [ fname ] == nil then
return false
end
return facts [ fname ] . password
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . set_password ( fname , password )
if facts [ fname ] == nil then
return false
end
facts [ fname ] . password = password
save_factions ( )
return true
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . join_faction ( fname , player )
if facts [ fname ] == nil or not minetest.player_exists ( player ) then
return false
end
facts [ fname ] . members [ player ] = true
save_factions ( )
return true
2019-09-09 04:11:55 +02:00
end
2020-07-28 22:47:50 +02:00
function factions . leave_faction ( fname , player_name )
if facts [ fname ] == nil or not minetest.player_exists ( player_name ) then
return false
2020-02-08 18:08:01 +01:00
end
2020-07-28 22:47:50 +02:00
facts [ fname ] . members [ player_name ] = nil
save_factions ( )
return true
2019-09-09 04:11:55 +02:00
end
-- Chat commands
local function handle_command ( name , param )
local params = { }
for p in string.gmatch ( param , " [^%s]+ " ) do
table.insert ( params , p )
end
if params == nil then
2019-09-18 22:52:14 +02:00
minetest.chat_send_player ( name , S ( " Unknown subcommand. Run '/help factions' for help " ) )
2019-09-09 04:11:55 +02:00
end
local action = params [ 1 ]
2020-08-18 11:25:28 +02:00
if action == " ses " then
minetest.chat_send_player ( name , type ( factions.max_members_list ) )
minetest.chat_send_player ( name , type ( factions.mode_unique_faction ) )
elseif action == " create " then
2019-09-09 04:11:55 +02:00
local faction_name = params [ 2 ]
local password = params [ 3 ]
2020-07-28 22:47:50 +02:00
if factions.mode_unique_faction and factions.get_player_faction ( name ) ~= nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are already in a faction " ) )
2020-07-28 22:47:50 +02:00
elseif faction_name == nil then
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " Missing faction name " ) )
elseif password == nil then
minetest.chat_send_player ( name , S ( " Missing password " ) )
2020-07-28 22:47:50 +02:00
elseif facts [ faction_name ] ~= nil then
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " That faction already exists " ) )
else
2019-09-09 21:56:38 +02:00
factions.register_faction ( faction_name , name , password )
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " Registered @1 " , faction_name ) )
return true
end
2019-09-10 00:20:58 +02:00
elseif action == " disband " then
2020-07-28 22:47:50 +02:00
local password = nil
local faction_name = nil
2020-08-18 11:35:51 +02:00
local own_factions = factions.get_administered_factions ( name )
2020-07-28 22:47:50 +02:00
local number_factions = # own_factions
if number_factions == 0 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of no faction " ) )
return false
2020-07-28 22:47:50 +02:00
elseif # params == 1 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Missing password " ) )
return false
2020-07-28 22:47:50 +02:00
elseif # params == 2 and number_factions == 1 then
password = params [ 2 ]
faction_name = own_factions [ 1 ]
elseif # params >= 3 then
2020-08-18 11:25:28 +02:00
faction_name = params [ 3 ]
password = params [ 2 ]
2020-07-28 22:47:50 +02:00
end
if password == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Missing password " ) )
2020-07-28 22:47:50 +02:00
elseif faction_name == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of many factions, you have to choose one of them : @1 " , table.concat ( own_factions , " , " ) ) )
2020-07-28 22:47:50 +02:00
elseif not facts [ faction_name ] then
minetest.chat_send_player ( name , S ( " This faction doesn't exists " ) )
2020-07-28 22:36:04 +02:00
elseif name ~= factions.get_owner ( faction_name ) and not minetest.get_player_privs ( name ) . playerfactions_admin then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " “Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege. " ) )
2019-09-09 21:56:38 +02:00
elseif password ~= factions.get_password ( faction_name ) then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: Wrong password " ) )
2019-09-09 05:30:31 +02:00
else
2020-07-28 22:47:50 +02:00
factions.disband_faction ( faction_name )
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " Disbanded @1 " , faction_name ) )
return true
end
elseif action == " list " then
local faction_list = { }
for k , f in pairs ( facts ) do
table.insert ( faction_list , k )
end
if # faction_list ~= 0 then
2020-07-28 22:47:50 +02:00
minetest.chat_send_player ( name , " Factions( " .. # faction_list .. " ): " .. table.concat ( faction_list , " , " ) )
2019-09-09 04:11:55 +02:00
else
minetest.chat_send_player ( name , S ( " There are no factions yet " ) )
end
return true
elseif action == " info " then
2020-07-28 22:47:50 +02:00
local faction_name = params [ 2 ]
if faction_name == nil then
faction_name = factions.get_player_faction ( name )
minetest.chat_send_player ( name , S ( " No faction were given, returning information about your oldest faction (e.g. the oldest created faction you are in) " ) )
elseif facts [ faction_name ] == nil then
minetest.chat_send_player ( name , S ( " This faction is not registered " ) )
else
local fmembers = " "
2020-08-18 11:25:28 +02:00
if table.getn ( facts [ faction_name ] . members ) > factions.max_members_list then
fmembers = S ( " The faction has more than @1 members, the members list can't be shown " , factions.max_members_list )
2020-07-29 12:57:36 +02:00
else
2020-07-29 09:28:33 +02:00
for play , _ in pairs ( facts [ faction_name ] . members ) do
if fmembers == " " then
fmembers = play
else
fmembers = fmembers .. " , " .. play
end
2020-07-28 22:47:50 +02:00
end
end
2020-07-29 09:20:46 +02:00
minetest.chat_send_player ( name , S ( " Name: @1 \n Owner: @2 \n Members: @3 " , faction_name , factions.get_owner ( faction_name ) , fmembers ) )
2020-07-28 22:47:50 +02:00
if factions.get_owner ( faction_name ) == name or minetest.get_player_privs ( name ) . playerfactions_admin then
minetest.chat_send_player ( name , S ( " Password: @1 " , factions.get_password ( faction_name ) ) )
end
2020-07-28 22:29:38 +02:00
end
2019-09-09 04:11:55 +02:00
elseif action == " join " then
local faction_name = params [ 2 ]
local password = params [ 3 ]
2020-07-28 22:47:50 +02:00
if factions.get_player_faction ( name ) ~= nil and factions.mode_unique_faction then
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " You are already in a faction " ) )
2020-07-28 22:47:50 +02:00
elseif facts [ faction_name ] == nil then
2019-09-09 04:11:55 +02:00
minetest.chat_send_player ( name , S ( " The faction @1 doesn't exist " , faction_name ) )
2019-09-09 21:56:38 +02:00
elseif factions.get_password ( faction_name ) ~= password then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: Wrong password. " ) )
2019-09-09 04:11:55 +02:00
else
2020-07-28 22:47:50 +02:00
if factions.join_faction ( faction_name , name ) then
minetest.chat_send_player ( name , S ( " Joined @1 " , faction_name ) )
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Error on joining " ) )
2020-07-28 22:47:50 +02:00
return false
end
2019-09-09 04:11:55 +02:00
end
elseif action == " leave " then
2020-07-28 22:47:50 +02:00
local player_factions = factions.get_player_factions ( name )
local number_factions = table.getn ( player_factions )
local faction_name = nil
if number_factions == 0 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are not in a faction " ) )
return false
elseif # params == 1 then
if number_factions == 1 then
faction_name = player_factions [ 1 ]
else
minetest.chat_send_player ( name , S ( " You are in many factions, you have to choose one of them : @1 " , table.concat ( player_factions , " , " ) ) )
return false
end
2020-07-28 22:47:50 +02:00
elseif # params >= 1 and facts [ params [ 2 ] ] ~= nil then
faction_name = params [ 2 ]
end
2019-09-09 04:11:55 +02:00
if faction_name == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , " The given faction doesn't exists " )
2019-09-09 21:56:38 +02:00
elseif factions.get_owner ( faction_name ) == name then
2020-07-28 22:47:50 +02:00
minetest.chat_send_player ( name , S ( " You cannot leave your own faction, change owner or disband it. " ) )
2019-09-09 04:11:55 +02:00
else
2020-07-28 22:47:50 +02:00
if factions.leave_faction ( faction_name , name ) then
minetest.chat_send_player ( name , S ( " Left @1 " , faction_name ) )
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Error on leaving faction " ) )
2020-07-28 22:47:50 +02:00
return false
end
2019-09-09 04:11:55 +02:00
end
elseif action == " kick " then
2020-07-28 22:47:50 +02:00
local target = nil
local faction_name = nil
2020-08-18 11:35:51 +02:00
local own_factions = factions.get_administered_factions ( name )
2020-07-28 22:47:50 +02:00
local number_factions = table.getn ( own_factions )
if number_factions == 0 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of no faction, you can't use this command " ) )
return false
2020-07-28 22:47:50 +02:00
elseif # params == 2 and number_factions == 1 then
target = params [ 2 ]
faction_name = own_factions [ 1 ]
elseif # params >= 3 then
2020-08-18 11:25:28 +02:00
faction_name = params [ 3 ]
target = params [ 2 ]
2020-07-28 22:47:50 +02:00
end
2019-09-09 04:11:55 +02:00
if faction_name == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of many factions, you have to choose one of them : @1 " , table.concat ( own_factions , " , " ) ) )
2019-09-09 04:11:55 +02:00
elseif target == nil then
minetest.chat_send_player ( name , S ( " Missing player name " ) )
2020-07-28 22:47:50 +02:00
elseif factions.get_owner ( faction_name ) ~= name and not minetest.get_player_privs ( name ) . playerfactions_admin then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege. " ) )
2020-07-28 22:47:50 +02:00
elseif not facts [ faction_name ] . members [ target ] then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " This player is not in the specified faction " ) )
elseif target == factions.get_owner ( faction_name ) then
minetest.chat_send_player ( name , S ( " You cannot kick the owner of a faction, use '/factions chown <player> [faction]' to change the ownership. " ) )
2019-09-09 04:11:55 +02:00
else
2020-07-28 22:47:50 +02:00
if factions.leave_faction ( faction_name , target ) then
minetest.chat_send_player ( name , S ( " Kicked @1 from faction " , target ) )
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Error kicking @1 from faction " , target ) )
2020-07-28 22:47:50 +02:00
return false
end
2019-09-09 04:11:55 +02:00
end
elseif action == " passwd " then
2020-07-28 22:47:50 +02:00
local password = nil
local faction_name = nil
2020-08-18 11:35:51 +02:00
local own_factions = factions.get_administered_factions ( name )
2020-07-28 22:47:50 +02:00
local number_factions = table.getn ( own_factions )
if # params == 1 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Missing password " ) )
return false
2020-07-28 22:47:50 +02:00
elseif number_factions == 0 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of no faction, you can't use this command " ) )
return false
2020-07-28 22:47:50 +02:00
elseif # params == 2 and number_factions == 1 then
password = params [ 2 ]
faction_name = own_factions [ 1 ]
elseif # params >= 3 then
2020-08-18 11:25:28 +02:00
faction_name = params [ 3 ]
password = params [ 2 ]
2020-07-28 22:47:50 +02:00
end
2019-09-09 04:11:55 +02:00
if faction_name == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of many factions, you have to choose one of them : @1 " , table.concat ( own_factions , " , " ) ) )
2019-09-09 04:11:55 +02:00
elseif password == nil then
minetest.chat_send_player ( name , S ( " Missing password " ) )
2020-07-28 22:36:04 +02:00
elseif factions.get_owner ( faction_name ) ~= name and not minetest.get_player_privs ( name ) . playerfactions_admin then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege. " ) )
2019-09-09 04:11:55 +02:00
else
2020-07-28 22:47:50 +02:00
if factions.set_password ( faction_name , password ) then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Password has been updated. " ) )
2020-07-28 22:47:50 +02:00
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Failed to change password. " ) )
2020-07-28 22:47:50 +02:00
return false
end
2019-09-09 04:11:55 +02:00
end
2019-09-09 05:30:31 +02:00
elseif action == " chown " then
2020-08-18 11:35:51 +02:00
local own_factions = factions.get_administered_factions ( name )
2020-07-28 22:47:50 +02:00
local number_factions = table.getn ( own_factions )
local faction_name = nil
local target = nil
local password = nil
if # params < 3 then
2020-07-29 09:20:46 +02:00
if params [ 2 ] ~= nil and minetest.player_exists ( params [ 2 ] ) then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , " Missing password " )
return false
else
minetest.chat_send_player ( name , " Missing player name " )
return false
2020-07-28 22:47:50 +02:00
end
elseif number_factions == 0 then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of no faction, you can't use this command " ) )
return false
2020-07-28 22:47:50 +02:00
elseif number_factions == 1 and # params == 3 then
faction_name = own_factions [ 1 ]
target = params [ 2 ]
password = params [ 3 ]
elseif # params >= 4 then
2020-08-18 11:25:28 +02:00
faction_name = params [ 4 ]
target = params [ 2 ]
password = params [ 3 ]
2020-07-28 22:47:50 +02:00
end
2019-09-09 05:30:31 +02:00
if faction_name == nil then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " You are the owner of many factions, you have to choose one of them : @1 " , table.concat ( own_factions , " , " ) ) )
2019-09-10 00:20:58 +02:00
elseif target == nil then
minetest.chat_send_player ( name , S ( " Missing player name " ) )
2019-09-09 05:30:31 +02:00
elseif password == nil then
2020-07-28 22:47:50 +02:00
minetest.chat_send_player ( name , S ( " Missing password " ) )
elseif name ~= factions.get_owner ( faction_name ) and not minetest.get_player_privs ( name ) . playerfactions_admin then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: You are not the owner of this faction, and don't have the playerfactions_admin privilege. " ) )
2020-07-28 22:47:50 +02:00
elseif not facts [ faction_name ] . members [ target ] then
minetest.chat_send_player ( name , S ( " @1 isn't in your faction " , target ) )
2019-09-09 21:56:38 +02:00
elseif password ~= factions.get_password ( faction_name ) then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Permission denied: Wrong password " ) )
2019-09-09 05:30:31 +02:00
else
2020-07-28 22:47:50 +02:00
if factions.chown ( faction_name , target ) then
minetest.chat_send_player ( name , S ( " Ownership has been transferred to @1 " , target ) )
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Failed to transfer ownership. " ) )
2020-07-28 22:47:50 +02:00
return false
end
2019-09-09 05:30:31 +02:00
end
2020-07-28 22:42:57 +02:00
elseif action == " invite " then
if not minetest.get_player_privs ( name ) . playerfactions_admin then
minetest.chat_send_player ( name , " Permission denied: You can't use this command, playerfactions_admin priv is needed. " )
else
local target = params [ 2 ]
local faction_name = params [ 3 ]
if facts [ faction_name ] == nil then
minetest.chat_send_player ( name , " The faction doesn't exist " )
elseif not minetest.player_exists ( target ) then
minetest.chat_send_player ( name , " The player doesn't exist " )
2020-07-28 22:47:50 +02:00
elseif factions.mode_unique_faction and factions.get_player_faction ( target ) ~= nil then
2020-07-28 22:42:57 +02:00
minetest.chat_send_player ( name , S ( " The player is already in the faction \" @1 \" " , factions.get_player_faction ( target ) ) )
else
if factions.join_faction ( faction_name , target ) then
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " @1 is now a member of the faction @2 " , target , faction_name ) )
2020-07-28 22:42:57 +02:00
return true
else
2020-08-18 11:25:28 +02:00
minetest.chat_send_player ( name , S ( " Error on adding @1 into @2. " , target , faction_name ) )
2020-07-28 22:42:57 +02:00
return true
end
end
end
2019-09-18 22:52:14 +02:00
else
minetest.chat_send_player ( name , S ( " Unknown subcommand. Run '/help factions' for help " ) )
2019-09-09 04:11:55 +02:00
end
return false
end
2019-09-09 05:30:31 +02:00
minetest.register_chatcommand ( " factions " , {
2019-09-09 05:53:15 +02:00
params = " create <faction> <password>: " .. S ( " Create a new faction " ) .. " \n "
2019-09-09 04:11:55 +02:00
.. " list: " .. S ( " List available factions " ) .. " \n "
.. " info <faction>: " .. S ( " See information on a faction " ) .. " \n "
2019-09-09 05:53:15 +02:00
.. " join <faction> <password>: " .. S ( " Join an existing faction " ) .. " \n "
2020-08-18 11:25:28 +02:00
.. " leave [faction]: " .. S ( " Leave your faction " ) .. " \n "
.. " kick <player> [faction]: " .. S ( " Kick someone from your faction or from the given faction " ) .. " \n "
.. " disband <password> [faction]: " .. S ( " Disband your faction or the given faction " ) .. " \n "
.. " passwd <password> [faction]: " .. S ( " Change your faction's password or the password of the given faction " ) .. " \n "
.. " chown <player> [faction]: " .. S ( " Transfer ownership of your faction " ) .. " \n "
2020-07-28 22:47:50 +02:00
.. " invite <player> <faction>: " .. S ( " Add player to a faction, you need factionsplayer_admin privs " ) .. " \n " ,
2020-07-28 22:29:38 +02:00
2019-09-09 04:11:55 +02:00
description = " " ,
privs = { } ,
func = handle_command
} )