[Mod] EmpyrionSpotGuard v2.6.1

Discussion in 'Empyrion API' started by Exacute, Apr 26, 2018.

  1. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Spotguard - Advanced server spot-manager

    Your core-component to advanced access-controll & loyalty/donation schemes.

    Basic
    Spotguard allows you
    - To have a whitelist. (Or an additional blacklist if you desire)
    Only users on the whitelist are allowed to connect to the server
    Manage users by their steamID and/or username. Optionally, set an expiration date, where their access will be revoked (or ban expire).

    - To manage VIP users and Reputation for users
    VIP: A status that can be given to an user, for instance donators, that will give them variable perks, depending on what you configure.
    Reputation: A unit that the user can gain/loose, based on online time. Can be used for purposes like loyalty programs (The more an user is online, the more 'ingame credit' they have)[NOT PART OF THIS MOD], as a 'good behaviour tool' (You can decrease the users reputation, if they do bad things for instance [NOT PART OF THIS MOD], and use it to determine when the user should no longer be allowed on the server), or as a valuta, the user can buy (Effectively actual gametime).

    The list is primarily intended for other mods, or third party tools, to use, to adjust the reputation/vip-status of the user. This mod is focused around using these parameters for access-control, and steadily increasing/decreasing the reputation, for every n-amount of minutes expired.

    - To set a maximum amount of normal spots, and additionally reserve some spots for VIP's

    - To set a custom MOTD for each of these, w. ingame feedback (if created through ingame commands)
    -Administrators
    -VIP-users
    -High-reputation users
    -Normal users

    - To determine what happens for each of the following three conditions
    1. When a 'normal user' connects, and there's no spots for them. What should happen?
    2. When a 'high-reputation user' connects, and there's no spots for them. What should happen?
    3. When a 'VIP user' connects, and there's no spots for them. What should happen?
    You are able to select between the following, for each of the above 3 cases individually:
    -Reject - Simply reject the person trying to connect
    -Kick random - Pick a user at random, and kick this person.
    -FiFo - First user that joined the server, is first user to be kicked (oldest user)
    -LiFo - Last user that joined the server, is first user to be kicked (newest user)
    -Lowest reputation - Kick the user with the lowest reputation
    (-que - Put the user in a real-time que, and connect when there's an open spot Planned feature. CURRENTLY NOT POSSIBLE TO IMPLEMENT)

    Note that Everyone online counts towards the 'TotalOpenSlots'. Admins and VIPs can connect if there are still 'slots open' (TotalMaxSlots-TotalOpenSlots = 'reserved slots'). Admins can always connect, will count towards players online, but will not be limited by these numbers.

    - To exclude some user-groups from being kicked
    You can define, for each of the following groups, if they should ever be a 'valid kick target', for the above conditions:
    -Administrators (People with special permissions, per the servers configuration)
    -People with higher than n reputation
    -Valid VIP

    - To automatically kick users, for being AFK for n-minutes
    You can define, for each of the following groups, if they should ever be kicked for being AFK:
    -Administrators (People with special permissions, per the servers configuration)
    -People with higher than n reputation
    -Valid VIP
    Note that 'being afk' is counted as not having moved and not having moved your camera, for n-minutes

    - To not allow users with less than n reputation to connect

    - To set the amount of reputation an user will get, when they first connect to the server

    - To determine if online users should loose or gain reputation, and how often this should occur
    You can for instance make them loose 1 reputation every hour, or gain 2 every 30 minutes.

    - To execute game-commands on users, when they join your server.
    You can for instance always give adminitrators 'gm invis' and 'itemmenu' when they join.
    You can specify the command(s), if any, for each of the following groups:
    -Administrators
    -VIPs
    -High-rep users
    -Normal users
    (note, the command(s) executed, is for the first group the user belongs to. If user is VIP for instance, user will ONLY have commands for VIP executed (etc). This is to prevent 'gaining gm, and loosing it again', as there's no way to determine if it is on/off for instance).
    You are able to specify multiple commands for each of the above groups.
    You are additionally able to specify TELNET commands, in addition to console commnads (custom 'say' for when someone logs on, or replenish something, etc.)

    You are also able to specify categories within each of the categories (Such as for 'rep' users, do some commands, if the user have more than 20 rep)

    - To set timers for the following:
    Timer: How often a task should happen. All of these can be disabled, or set to 'run every n-minute' individually
    -Kick AFK players (every n-minutes, a check will occur on all currently online player, for if they have moved. If not, they will be kicked). You are additionally able to configure, if their rep should change when being AFK-kicked, and to warn them with a custom message n-minutes before being kicked.
    -Check for changes on the black/whitelist. If an user is removed, or have expired from it, they will be kicked.
    -Check for changes in VIP status (And remove their VIP perks if so)
    -Check if players reputation have fallen too low, and kick them.

    Ingame commands
    All the following, are chat commands as it is currently not possible to make custom console commands.
    The commands are invoked with a !spotguard prefix. If you wish to change 'spotguard' to something else, that is possible, by changing 'NameSpace' in the config file.
    Note that no matter the namespace, you will always invoke it with a ! or / (ie. !spotguard or /spotguard , if the namespace is 'spotguard')
    Your Administrators (people with special permissions, as of the servers configuration), can run the following commands:

    -reload
    --config (reloads configuration file)
    --security (reloads white/blacklist file) (This happens automatically, when an user connects, or when you make ingame-changes to the list aswell)
    --specials (reloads VIP/reputation file) (This happens automatically, when an user connects, or when you make ingame-changes to the list aswell)

    -whitelist / blacklist / security
    --Add <steamid/name> <optional: expiration date> (Adds user to the white/blacklist. If specified, with an expiration date)
    --Edit <steamid/name> <expiration date> (Edit an user on the white/blacklist)
    --Get <steamid/name> (Get the current details about an user on the white/blacklist)
    --Remove <steamid/name> (Remove an user from the white/blacklist)

    -get
    --<steamid/name/entityid>
    (Tells you about the user: If they are online. Their current reputation. Their current VIP-level (You can optionally set it higher. This mod does only care if it is >0 or not, for the VIP-conditions). The current expiration date of their VIP-membership. Will also tell when the user was last online, when the user was first seen, and how long the user have played on your server (roughly).

    -set
    --<steamid/name/entityid>
    ---rep (Sets their current reputation)
    ---+rep (Adds to their current reputation)
    ---vip (Sets their current VIP level. 0= not vip)
    ---vipend (Sets the expiration date of their VIP membership. Removes all current VIP-expiration data, and replaces it with this date)

    -motd
    --<admin/vip/rep/normal>
    ---Value. Supports casing, and special tags, such as {PlayerName}

    Your users (Anyone online), can run the following commands:
    -rep
    This will show them their current reputation, aswell as give them a helpfull message, as to where they can get more / spend it. (You set this in the config file). You can also set an additional message, if they have more than n-reputation.

    -vip
    This will show them, wether or not they are currently VIP, and if so, when their VIP-status will expire.
    If not, this will show them a message, as to how they can become vip (You set this in the config file)

    -about
    This will show them, the mods actual name, author, and version.

    -info
    This will show them a message, that you can configure. It should be aimed towards helping the user, such as 'how their rep will change', etc.

    -time
    This will show them a message, containing the current date+time of the server (dd-MM-yyyy HH:mm). This can be helpful for the user, if they aren't located in the same timezone, and you have messages like 'Server will restart 5:30am'.

    -played
    This will show them a message, with stats such as when they started on the server, and how long they have played in minutes (relative to when you installed this mod!)

    -get
    --<steamid/name/entityid>
    (Tells you about the user: If they are online. Their current reputation. Their current VIP-level (You can optionally set it higher. This mod does only care if it is >0 or not, for the VIP-conditions). The current expiration date of their VIP-membership. Will also tell when the user was last online (if enabled), when the user was first seen, and how long the user have played on your server (roughly).
    Note that you can disable get on others, if you want.

    -lang
    --<number or string>
    If supplied without any argument, will return a list of all availible languages.
    If supplied with a string (either a number, matching one from the listed languages (when used without a string), or a language such as 'Dutch'), will set the users language preference to this, for SG and CC (and other mods using SGs files)

    -help
    Displays a help prompt to the user, that tries to explain the settings that the server is running with (SpotGuard wise), see https://i.imgur.com/gQMGzUA.png for an example on the helpmessage.

    These messages allows you to reference the other settings of your config file, if you so desire. You can use \n inline, in order to split the message into several 'server:' messages, rather than just one.

    Note that you can reference other configoptions/special commands, in a command (for instance, in {RepSpecial}, you can reference {PlayerRep}). To avoid infinite-loops, it will only run through this TWICE in total.


    Note, that there are many alternatives to the commands listed above. For instance 'vip' and 'vipinfo' works for the same. If you have suggestions for something that does not work ingame, please do submit a request for it. The aim of these 'alternative names' are to make it as convenient and intuitive to type commands, as possible.


    If you wish to see a full list of configuration options, refer to this page


    Standards
    This mod uses the following file-standards:
    (If several mods are using the same standard, you are able to configure the paths, so that they can share the same file)
    https://empyrion.gamepedia.com/GameAPI_standards_filestd_specialslist
    https://empyrion.gamepedia.com/GameAPI_standards_filestd_whitelist


    Download
    This mod is released as-is.
    You will be able to access newer versions of this mod, if there should come later updates to it.

    In order to download it, please use the following link
    https://www.paypal.com/donate?hosted_button_id=SX2E2YZCWG8WN

    Or simple scan the QR Code
    SpotGuard QR Code.png
    The amount will go to further development of this, and other tools/mods.
    Please save the link, from the page you are redirected to upon successfull transaction.
    The link is always to the latest version.


    Installation
    As with any other mod, installation is simple
    -Download the mod

    -Create a folder named 'Mods' in <yourserverpath>/Content
    -Extract the downloaded files into this folder, so that you have <yourserverpath>/Content/Mods/SpotGuard
    --The folder 'SpotGuard' should contain at the very least: "SpotGuard.dll", "config.yaml".
    --The files "security.yaml" and "specialslist.yaml", "MOTD.yaml" can be moved to another folder, and/or renamed, given you properly reference them in the config.yaml file. (If they exist in a mod folder called 'VIPcommands' for instance, you may reference them as '../VIPcommands/specialslist.yaml' (etc)
    -Configure the configuration file as you desire. Read the inline comments, for further help on this.

    -Add people to the securitylist, if you have opted for a 'whitelist'. If blacklist, you can leave it blank, or fill users you wish to exclude onto it.
    -Optionally add people to the specialslist. When they first connect, they will be added to it automatically. If they already exist on the list, the data on the list will be used. (It is on this list, that you can set the reputation, and VIP-level, and VIP-expiration(s) of the user.
    -Optionally edit the MOTD messages in the MOTD file.
    -Launch the server as normal.
    You can always re-configure things and/or change the files, while the game is running. Just use the ingame-commands specified to reload the list(s).
    After installation, you just launch the server as normal. This is a one-time process, not counting changes you decide to make.

    License
    You are not allowed to edit this mod.
    You are not allowed to redistribute this mod, or any modified version of it.
    You are not allowed to share the download link to this mod.
    You are allowed, and encouraged, to edit the supplied .yaml files, to tailor it to your needs.
    You are allowed, and encouraged, to share the .yaml files with others, to make it easier to get started.
    You are allowed to sell services from this mod (VIP-status, reputation status, being whitelisted)

    Please always keep in mind, the current 'pay to win' stance from Eleon!
    This tool is offering you several ways you can provide incentatives for your users, to donate, vote, behave, etc. It does not hold your hand, as to not break the current rules put in place. Be sure to follow them, for your own sake.

    (Rules can be found at: http://empyriongame.com/server-monetisation-rules/)

    Acknowledgements
    The Craftaholics server, and especially @Ephoie, for beta-testing the mod, and provide feedback for new features.
    The awesome people initially writing the wiki on the Game's API. Gave a good start to the mod, and a reason, aswell as place, to share the knowledge I gained while writing it.
    Translations:
    Danish - Androggles
    Dutch - Taelyn
     
    #1
    Last edited by a moderator: Nov 2, 2020
  2. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Help - How do I:
    Having a whitelist means, that only players on this list can connect to your server.
    It is the opposite of a blacklist (Where players on this list CAN NOT connect).

    Related file: "security.yaml"
    Related config file setting(s):
    -BlackOrWhite (set to 1 if you want a whitelist. Leave as 0, if you want a blacklist)
    -BWListCheck (in minutes, how often do you want the list to be checked (will kick online users, that are expired/removed/added as needed)
    Related commands:
    -!spotguard whitelist
    -!spotguard blacklist
    -!spotguard security
    --<> add|get|remove|edit
    Add=> Add <steamid/name> <optional:expiration date> : Add player to the whitelist. Optionally set expiration date (dd-MM-yyyy HH:mm) (no date => never expires)
    Edit => Edit <steamid/name> <expiration date (dd-MM-yyyy HH:mm) (no date => never expires) : Edit player on the whitelist
    Get => Get <steamid/name> : Displays information about a player (expiration, and if on list)
    Remove => Remove <steamid/name> : Removes a player from the list.
    NOTE! if the player you are looking for got spaces in their name, and you use name as param, BE SURE to encase it in '' or "". (ie. if user is called 'exa cute', make sure the <steamid/name> is 'exa cute' (with the ' !))

    You can also manually add the user in the security.yaml:
    Code:
    Players:
    - PlayerID: 79869898998989898
      PlayerName: xe
      Expiration: 14-04-2018 23:15
    - PlayerID: 0
      PlayerName: Exacute
    In the first example, adds a player with steamID "79869898998989898" And/or name "xe" to the list, with expiration 14th of april 2018, 23:15 (11:15PM)
    Expiration can be left out, or "0", if you want it to never expire.
    In the second example, a player with an unknown steamID, and the name "Exacute" is on the list. This user will never expire.

    Once an user logs on, it will fill in the associated name/steamid if it was wrong, or missing.

    Being VIP may grant them some perks, depending on your config file, same goes for reputation. You can ingame do this via the commands as described in the main thread, or you can edit them manually.

    Related file: "specialslist.yaml"
    Related commands:
    -!spotguard set
    --<> Steamid/name/entityid
    ---<> rep/vip/vipend/rep+
    rep: Sets the reputation to this number, no matter their previous
    rep+: Alters their reputation relative to this number (if they had 5, and you type 2, it will give them 7 total. If you type -2, it will give them 3 total)
    vip: The rank of their VIP (usually 1), 0 if they should not be considered VIP
    vipend: The end date of their VIP. If given, will make it end on this date. If they had multiple endings, will remove all, and replace with this date. Format dd-mm-yyyy hh:mm
    NOTE! if the player you are looking for got spaces in their name, and you use name as param, BE SURE to encase it in '' or "". (ie. if user is called 'exa cute', make sure the <steamid/name> is 'exa cute' (with the ' !))

    You can also manually add the user in the specialslist.yaml:
    Code:
    Players:
    - PlayerID: 79869898998989898
      PlayerName: xe
      VIPDuration:
      - End: 14-04-2018 23:15
      VIP: 1
      rep: 30
    - PlayerID: 79869898998989898
      PlayerName: Exacute
      VIPDuration: #never ending
      VIP: 0 #not VIP
      rep: 25
    
    #(Note, that the files format in total are:)
    # - PlayerID: <Int, SteamID>
    #   PlayerName: <String, IngameName>
    #   (If ID is 0, it will attempt playername instead)
    #   VIP: <Int> (Anything >0 will be 'yes' for SpotGuard)
    #   VIPDuration:
    #   - End: <DateTime (dd-MM-yyyy HH:mm (14-04-2018 11:15 would be 14 of april 2018, 11:15 (24hrs)), timestamp>. If not specified, or 0, will 'never expire'
    #   rep: <Int>
    #   LastOnline: dd-MM-yyyy HH:mm (When the user last logged onto the server)
    #   FirstOnline: dd-MM-yyyy HH:mm (When the user first logged onto the server)
    #   TotalPlayed: <int> (How many minutes the user have (roughly) played on the server in total)
    
    
    
    In the first example, adds a player with steamID "79869898998989898" And/or name "xe" to the list, with expiration 14th of april 2018, 23:15 (11:15PM), and VIP rank 1, and 30 reputation.
    Expiration can be left out, if you want it to never expire, or contain several entries.
    In the second example, a player with an unknown steamID, and the name "Exacute" is on the list. This user will never expire, if they had VIP, but they do not.

    This mod allows for relative-path use.
    This means, that you can, relative to where the mod is located (it's .dll file is placed), share a file, or several, with another mod.

    This allows you to have a central file, for your whitelist and/or specials list (VIP + reputation)

    Related config setting(s):
    SpecialsFile (Location of specials.yaml)
    SecFile (Location of security.yaml)

    You specify the paths relative to the current, by using ../

    For instance: if this mod is located at:
    D:\APPS\steamapps\common\Empyrion - Dedicated Server\Content\Mods\SpotGuard
    you would just type "security.yaml", if that file is located in the folder 'spotguard'.
    If the file was located in 'mods', you would type "../security.yaml"
    If the file was located in 'Content', you would type "../../security.yaml"
    If another mod, called 'PurchaseWithRep' exist, and you have the 'specials.yaml' file located in that mods folder instead, you could access it with "../PurchaseWithRep/specials.yaml"

    Note that you for all the strings, can refer to the config files setting, by using {settingname}. For instance, if you want to display what the mods namespace is, you would use {NameSpace}. Be aware that it IS CASE SENSITIVE, ie. {namespace} would not resolve to anything.
    Related config setting(s):
    NameSpace (What is specified here, is what the user types. For instance, if you have 'spotguard' here, the user would type !spotguard, or /spotguard, to execute commands.
    If you have 'perks', user would type !perks or /perks, to execute commands, etc.)
    CustomName (What is specified here, is what the LOG FILE will show, aswell as what will be written ingame. If name is 'spotguard' it would write "SERVER: Spotguard: availible commands: blahblah".
    If name is 'perk' it would write "SERVER: perk: Availible commands: blahblah", etc.)

    ModHelpMessage (When the user type !namespace help, this message will be shown to the user. Message should aim to be helpful)
    VIPInfo (When the user type !namespace vip, this message will be shown, if the user is not currently VIP. Otherwise, their VIP-status will be displayed)
    RepInfo (When the user type !namespace rep, this message will be shown)

    RepTrigger (number, how much reputation must the user have, to trigger below message, when writing !namespace rep)
    RepInfoSpecial (If the user have MORE THAN "RepTrigger", this message will also be sent, in addition to RepInfo)

    AFKKickWarnMessage (If AFKKick >0, and AFKKickWarn>0, this message will be shown AFKKickWarn minutes, before the user will be AFK kicked)

    You are also able to customize these tags: {AdminRank}, {AdminRank:s} (should only be used, in the 'ExecuteTelnetCommand' under 'ExecuteConsoleCommandOnAdminJoin'. Might not work as intended otherwise.)
    You are able to specify, for each rank, what each should resolve to.
    You can use these to write something more colorfull than 'Administrator joined the server', to 'Server god joined' (etc)

    You are additionally able to customize: {VipSpecial}, {VipSpecial:s}
    These will resolve to the highest one availible (ie. if you have one for 1,2 and 3, and user is 2, it will use the one for 2) (if you have one for 1,4,6, and user is 2, it will become 1. If user is 5, 4, etc)

    You are also able to customize: {RepSpecial}, {RepSpecial:s}
    These will resolve to the highest one availible (ie. if you have one for 1,2 and 3, and user is 2, it will use the one for 2) (if you have one for 1,4,6, and user is 2, it will become 1. If user is 5, 4, etc)
    (Essentially the same behaviour as for VIP, but instead of VIP level, reputation amount)

    If you want to disallow users from seeing data about other users entirely, use:
    PoolDataOnOther: false
    (This will also disallow getting the data from below)

    If you want to disallow users from seeing when someone was last online, use:
    PoolLastOnline: false

    If you want to Color the messages, so it isn't just the 'same old red'.
    You can use the config setting
    CustomName

    [​IMG]
    If you want the ingame-responses to be named 'Perkyperk', and want to accomplish:
    Example 1:
    Code:
    CustomName: "[FF8C3C]PerkyPerk"
    Example 2:
    Code:
    CustomName: "[FF8C3C]PerkyPerk[-][FFFFFF]"
    This color also applies to the *name* part, when the user gets kicked.
    [​IMG]

    (Change what is inside the [], to a valid hex-color, to change what is shown (FF8C3C is an orange, FFFFFF is a white))

    Note, that 'afk' means not moved their camera (via cursor ingame), or moved their character.

    Related config setting(s):
    AFKKick (In minutes, how long can the user be AFK? If this number is 5, it will check every 5 minutes, if the user is afk)
    AFKKickRepChange (If the user is kicked for being AFK, you can affect their reputation. You can set this number to a positive or negative number, to give, or remove, reputation when the user is being kicked for being afk. Leave at 0 for no change.)
    AFKKickWarn (If you want, you can give the user a warning (red box, like when taking dronebases down. Also comes with a warning sound), telling the user that they are about to be kicked. This number is 'how many minutes, before the user is kicked, should the user be warned?' This number MUST BE SMALLER THAN AFKKick, but greater than 0, if you want it displayed. Set to '0', for 'never warn the user')
    AFKKickWarnMessage (If you want, you can specify a custom message, like : You will be kicked in {AFKKickWarn} minutes, for being AFK.)

    Additionally, you can exclude some categories, from being AFK-kicked entirely:
    NeverAFKKickRep (If the users have ABOVE the specified number, they will never be kicked. if -1, rep doesn't matter)
    NeverAFKKickVip (If true, VIP users will never be kicked)
    NeverAFKKickAdmin (If true, administrators will never be kicked)


    Related config setting(s):
    RepOnlineTime (In minutes, how often do you want the user to gain rep?)
    RepChange (positive or negative number. How much reputation do you want to give the user, every RepOnlineTime minute)

    Related commands:
    Note to use entityid, user must be online

    -!spotguard set <entityid/steamid/name>
    --vip (set vip-level. 0 is 'not vip'. In this mod 'you are vip, if your vip is greater than 0)
    --rep (set reputation to a number. Can be negative)
    --rep+ (Add reputation to the users current. Can be negative (for instance rep+ 10, adds 10 rep, rep+ -10 takes 10 rep)
    --vipend (set expiration of vip to this date. If 0, will never expire. dd-MM-yyyy HH:mm
    -!spotguard get <entityid/steamid/name> (Get the current reputation of the user)
    NOTE! if the player you are looking for got spaces in their name, and you use name as param, BE SURE to encase it in '' or "". (ie. if user is called 'exa cute', make sure the <steamid/name> is 'exa cute' (with the ' !))

    Related file(s):
    Additionally, you can edit the file 'specials.yaml'
    When an user first joins the server, an entry for the user will be added.
    You can also add/edit these entries manually.
    Code:
    Players:
    - PlayerID: 98089877126387
      PlayerName: Exacute
      VIP: 2
      rep: 18.1002883620278
      VIPDuration:
    
    Code:
    Players:
    - PlayerID: 0
      PlayerName: Exacute
      VIP: 1
      rep: 18
      VIPDuration:
      - End: 11-12-2018 11:45
      - End: 13-11-2019 13:44
    
    In the first example, it would relate to the player 'Exacute' and/or steamid 98089877126387
    Here, the player is VIP rank 2
    Have 18.1<> reputation. (can be double, or int)
    With an unlimited VIP duration

    In the second example, it would relate to the player 'Exacute' (unknown steamid)
    Here, the player is VIP rank 1
    Have 18 reputation
    And have two expiration dates.
    Both count. But let's say the current date is 12-12-2018, the first would be expired.
    The user will be valid VIP because the second is still valid.
    Note, that using the ingame command to set VIP-end-date, will clear the list, and only leave what you entered there.

    Related config setting(s):
    RepInitial (When the user joins, and gets added to the 'specials.yaml' list (ie. DOESNT ALREADY EXIST ON IT), how much reputation should they start with. Can be a positive or negative number (or 0))

    Related config setting(s):
    DisallowLessThanRep (If the user have BELOW this number in reputation, they will not be allowed onto the server (if user have 2 rep, and DisallowLessThanRep is 1, the user is fine. If the user have 0 rep, and DisallowLessThanRep is 1, they will not be allowed to join)
    KickTooLowRep (In minutes, how often do you want to check, if users have too low reputation? (after they have joined, this will run every n-minutes, to check if they have lost too much rep, and must be kicked))
    VIPNeedRep (If the user is valid VIP: should the user need to care about their reputation? If True, will follow the rules from above. If false, will never be kicked from too low reputation)

    Related: If an user looses VIP-status (<0 VIP, or expired), make the user loose VIP-priveledges
    VIPListCheck (In minutes, how often do you want to check, if an user is no longer valid VIP)

    Note, that when an administrator joins, this user will count towards the cap, but will be allowed no matter the below numbers.

    Related config setting(s)
    TotalMaxSlots (How many slots are availible IN TOTAL. Should be greater than TotalOpenSlots,but less how many slots you can ACTUALLY SUPPORT WITH YOUR SERVER HARDWARE (for instance, if you have 2 active administrators, and you can support 25 players per-hardware, this number is recommended to be 23)

    TotalOpenSlots (How many slots are open to non-administrators, non-VIP users? Should be less than TotalMaxSlots. The difference is 'how many slots that are reserved for VIP/administrators')

    Options:
    #0: Reject (The user that attempted to connect is rejected)
    #1: Kick Random (Picks an user at random to kick, to make room)
    #2: FiFo: First in, first out (User that have been online the longest will be kicked)
    #3: LiFo: Last in, first out (User that is the most recently connected will be kicked)
    #4: Lowest Reputation (The user with the lowest reputation will be kicked)
    #5: Que (NOT IMPLEMENTED! Will currently REJECT the user)
    #* Note that all these options will respect the 'never kick' options.

    Related config setting(s):
    ExceedSlotsVIP (When a VIP user joins, which of the above things should happen?)
    ExceedSlotsNormal (When a normal user joins, which of the above things should happen?)
    ExceedSlotsRep (When an user, with above 'ExceedSlotsRepAmount' in reputation joins, which of the above things should happen?)
    ExceedSlotsRepAmount (How much reputation does the user need, in order to qualify for 'ExceedSlotsRep'. Positive or negative number)

    Additionally, you can set some user groups to NEVER BE KICKED from any of the above settings.
    NeverKickRep (If the user have above this number in reputation, they will not be a 'valid kick target')
    NeverKickVip (If true, VIP users will never be a 'valid kick target')
    NeverKickAdmin (If true, Administrators will never be a 'valid kick target')

    If you want, you can specify one or several commands to run, when an user of a group joins the server.
    Note that it is only the first category the user matches of which commands will be run (ie. if an user both qualify for VIP and normal, only VIP one will be executed on the uuser)

    Related config setting(s):
    (All of these are lists)
    ExecuteConsoleCommandOnAdminJoin (When an administrator join, what should happen)
    ExecuteConsoleCommandOnVIPJoin (When a VIP joins, what should happen)
    ExecuteConsoleCommandOnRepJoin (When an user with MORE THAN the number set in 'ExceedSlotsRepAmount' reputation, what should happen)
    ExecuteConsoleCommandOnJoin (When a normal user joins, what should happen)

    Example:
    Code:
    ExecuteConsoleCommandOnAdminJoin:
    ##- ExecuteCommand: String, command to be executed
    - ExecuteCommand: gm invis
    - ExecuteCommand: itemmenu
    #List<String>, execute a custom command on a VIP joining (for instance itemmenu)
    ExecuteConsoleCommandOnVIPJoin:
    - ExecuteCommand: gm
    #List<String>, execute a custom command on an user with rep > ExceedSlotsRepAmount joining (for instance itemmenu)
    ExecuteConsoleCommandOnRepJoin:
    ##- ExecuteCommand: String, command to be executed
    - ExecuteCommand:
    #List<String>, execute a custom command on any user joining (for instance itemmenu)
    ExecuteConsoleCommandOnJoin: 
    If an Administrator joins, 'gm invis' and 'itemmenu' will be executed on the user.
    If a VIP joins, 'gm' will be executed on the user.
    If a high-rep user joins, nothing will be executed.
    If a normal user joins, nothing will be executed.

    If you feel confident, you can additionally use TELNET commands, when a player joins:
    Like using - ExecuteCommand: gm above, you do this by
    - ExecuteTelnetCommand: telnetcmd

    For instance
    Code:
    ExecuteConsoleCommandOnAdminJoin:
    - ExecuteTelnetCommand: SAY 'Hello world {PlayerName} joined {PlayerID}'
    
    Would make a server 'SAY' that the player with said name, and said ID just joined.

    For telnet commands: https://empyrion.gamepedia.com/Telnet_Commands
    For console (normal) commands: https://empyrion.gamepedia.com/Console_Commands


    You can additionally, within 'admin', 'vip', 'high-rep' specify the following:
    ExactRank
    AboveRank

    Exact ONLY triggers, if the user have exactly that.
    Above triggers, if the user have exactly that OR ABOVE.

    Code:
    - ExecuteTelnetCommand: '{PlayerName} joined the server. He's a tier 2 VIP'
      ExactRank: 2
    would execute, when a tier 2 VIP joins the server.

    Code:
    - ExecuteTelnetCommand: '{PlayerName} joined the server. He's a tier 2 VIP or above'
      AboveRank: 2
    Would execute when someone, tier 2 or above, VIP joins the server.

    If you wish, you can limit who can use the ingame commands (or make anyone able to use them. NOT RECOMMENDED!!)
    Related config setting(s)
    AdminRank

    The number you specify here, is the min-level of permission the user must have on the server, to be able to execute mod-commands.
    (can be 3, 6 or 9 - GM, moderator, or administrator).
    (This number an above)

    Related MOTD setting(s)
    IMPORTANT: Note that these settings are in the file MOTD.yaml

    AdminMOTD (Message for admins)
    VIPMOTD (Message for VIPs (any lvl))
    RepMOTD (Message for high-rep users (above ExceedSlotsRepAmount reputation))
    MOTD (Message for normal users)

    Note that any or all of these can be NA
    If one is NA, it will attempt to display the next (ie. if admin logs on, and AdminMOTD is 'NA', but VIPMOTD is something, it will display that one. Etc.)

    You can use the special tags in this, such as {PlayerName}, references to the config file, etc.

    Related commands:
    -!spotguard motd
    --<> admin|vip|rep|norm
    ---<> value
    If you do not specify the value, it will display the current MOTD for that setting.
    If you specify a value, it will save it to the MOTD file AND display the new one to the relevant user(s).
    NOTE! If you want it to display nothing, use NA or leave it blank (add a space, after. '!spotguard motd admin '

    If you are using several mods, some might be using
    (/.!) vip/rep/motd/played/get

    You are able to individually disable each of these, from the settings:
    Related config setting(s)
    EnableShorthandRep
    EnableShorthandVip
    EnableShorthandMOTD
    EnableShorthandGet
    EnableShorthandPlayed

    (true = enabled, false = disabled)

    You can use all non-lists as references, when writing your strings.
    For instance, if you want to display the config setting "NameSpace", you would write "{NameSpace}"
    Example:
    Code:
    RepInfo: You will earn {RepChange} reputation every {RepOnlineTime} minutes. If your rep falls below {DisallowLessThanRep}, you will be kicked.
    Would reference config options: RepChange, RepOnlineTime, DisallowLessThanRep.

    You can additionally use these 'special' tags:
    {PlayerName} : Resolves to the current players name
    {PlayerID} : Resolves to the current players steamID
    {RepSpecial}, {RepSpecial:s} : Resolves to the appropriate reputation-entry, under config setting 'CustomREPNames'
    {VipSpecial}, {VipSpecial:s} : Resolves to the appropriate vip-level-entry, under config setting 'CustomVIPNames'
    {PlayerRepLastUpdated} : Resolves to when the last time the players reputation was saved. Format dd-MM-yyyy HH:mm (time)
    {PlayerCon} : Resolves to when the time the player connected to the server. Format dd-MM-yyyy HH:mm (time)
    {PlayerEntity} : Resolves to the players entity ID
    {PlayerClient} : Resolves to the players client ID
    {PlayerVIP} : Resolves to the current level (number), of VIP the user have.
    {AdminRank}, {AdminRank:s} : Resolves to the appropriate admin-entry, under config settings 'AdminRankN', 'AdminRankNs' (N being 3,6 or 9)
    {Played} : Resolves to the current playtime of the user (in minutes)

    This mod includes an API:
    If you want to use the API, you need to configure it first:
    Code:
    AllowServer: true #Boolean, should there be a 'server' running from this mod, listening for external sources
    ServerPort: 8089 #int, which port should the server run on? Remember to portforward this, if you want to be able to use it from a domain or similar.
    ServerAPIkey: somerandomstring #string, if set, will require this in order to execute commands via the server. IF YOU RUN A SERVER YOU SHOULD CHANGE THIS!
    ServerSaveLogfileDir: server #string, which directory do you want this saved to? If you don't want it used, use NA
    MasterAPIkey: somerandomstring #string, if you are using multiple that are running on the same port, this should be used, and specified to whichever is started first of the mods' API-key
    
    Give the mod a port to run on. It may run on the same port as CommandCrate if you desire.
    Default: 8089
    Give the mod an APIkey.. Either unique, or same as commandcrate, depending on what you want.
    It is highly recommended to CHANGE THE KEY, if you are using the API

    If you do not want to use the api, set
    AllowServer: false

    There is currently the following two calls to the API, for SpotGuard:
    Parameters:
    - Query: "list"
    Date: "dd-MM-yyyy HH:mm" (optional)
    Steam: "" Steamid (optional, either this or name)
    Name: "" Username (optional, either this or steam)
    Command: "" (Add/Edit/Remove) : Add, edit, or remove player from/to/on the list
    Will add/edit/remove a user by steamid and/or username to/from/on the whitelist/blacklist, with an optional expiration date.
    - Query: "status"
    Steam: "" Steamid (optional, either this or name)
    Name: "" Username (optional, either this or steam)
    Command: "" (Set/Get/Add)
    Value: "" The value you want it interacted with (required if not using GET in command)
    Stat: "" The stat in question (VIP/rep/vipend)
    Date: "dd-MM-yyyy HH:mm" (optional, only needed if stat is 'vipend')
    Will set, or addto, or get, a <stat> (vip/rep), and change/output it, based on steamid/name
    Example:
    http://localhost:8089/ModAPI/?a=somerandomstring&q=status&name=exacute&command=get&stat=vip
    Will display the VIP value for player 'exacute'
    http://localhost:8089/ModAPI/?a=somerandomstring&q=status&name=exacute&c=set&value=212&stat=rep
    Will set the REP value for player 'exacute' to 212
    etc.
    Parameter 'a' needs to be the API key from the config file for 'SpotGuard' (default: 'somerandomstring' -- You should REALLY change this).
    :8089 is the port specified in the config file.

    Note, that 'a' is the APIKey, you specified in the config file. If it doesn't match what the config file contains, it will be ignored.
    NOTE THAT IT MUST BE SENT AS A Get.

    If you want to use the API from outside your device, please remember to PORTFORWARD the port you used in the config file.

    As things can happen, where the server doesn't start, or stop properly, there's a chance that the lastused.yaml, and/or permadata.yaml file gets corrupted. This should not happen normally, but with everything else, if you interrupt something while it is reading to a file, the results can be less-than-desirable.
    Therefore, SpotGuard features a builtin backup for these files, where it by default will save them every server start & server stop. You should normally not have to make use of these backups, but they are provided, in case you need them.
    You can disable this in the config file, if you don't want it.
     
    #2
    Last edited: Jul 22, 2018
    Kassonnade and Ephoie like this.
  3. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Related mods:
    If you are working on a mod using the same file(s), please let me know.
    CommandCrate - Advanced commands

    Changelog:
    v1.35
    *Updated to be a10 compatible
    *Fixed issue with SG/CC bridge making a corrupted internal server-log

    v1.34
    *Fixed a few issues, where having debug enabled would cause issues.

    v1.33
    *Added new config tag 'EnableShorthandLang'. Default is 'true'.
    *Added new config tag 'DefaultLanguage'. Default is 'English'.
    *Added new tag to specfile, 'Language'. Default is 'NA' (Pick 'DefaultLanguage' over this, ie. none set for user). This is used to set the used language by the user, and will override any game-setting (whenever that will become possible).
    *Added new command '!lang'. If used without parameters, will list availible languages. If used with, will set the 'Language' for specfile to this, and use it for CC and SG localization.
    *Added new lang entry 'AvailibleLanguages', 'LanguagesSet', 'LanguagesNotFound'.
    Note limitiation with the language tag: SpotGuard MUST contain the language in the Localization.csv as a key, in order to be valid.
    *Added translation for 'Dutch', thanks to Taelyn!
    *Added translation for 'Danish', thanks to Androggles!

    v1.32
    *Fixed issue if Specialslist had no entries

    v1.31
    *Fixed API to actually be port-forwardable, rather than only locally. (Also both IP+localhost+127.0.0.1 should work locally)

    v1.3
    *Fixed wrong loca string for : ".vip" and Error message for user already on security list.
    *Added new config flag, "ServerWebAddress". It is added to be easily referred with {ServerWebAddress} (By default, this will resolve to 'Server Address Not Specified'). It is by default used in config setting 'VIPInfo'.
    *Tweaked behaviour: When loading a localization string, it will now resolve all {} references, that it can. You should try to use non-user-specific flags, as it will not always resolve to an user, if you edit the localization.csv file yourself.
    *Added basic logic engine .. Supports basic logic: format {<>:<>:<>:<>:<>} <>1: first param <>2: second param <>3: What to compare first and second param with? (= or => or =< or < or > or !=) <>4: What happens if <1> logic<3> <2> is true <>5: What happens if <1> logic<3> <2> is false For instance {{0}:2:=:{0} was 2!:{0} was not 2} If {0} resolves to 2 (2==2), it will tell you it was 2, otherwise that is wasnt You may additionally use | is <>1 and <>2 For instance {{0}:1|2:=:var was 1 or 2:"var was not 1 or 2 :<"}
    *Added EXPERIMENTAL! FillVIPBeforeNormal tag. If set to true, will fill VIP's into the VIP slots, before into the normal slots. Not recommended, but requested. KEEP AN EYE OUT IF USING THIS!
    *Added ghosts (graceperiod reservations) to the API output for online players. No additional params needed.
    *Added 'help' command, so that users can see what settings SpotGuard are running with. (!<namespace> help)

    v1.27
    *Changed langstring KickAllSlotsFilled, to chisel out in stone how many of these are reserved slots..

    v1.265
    *Minor! bugfix: If you havn't added the new config.yaml flags since 1.0, some bugs would occur.
    You should *REALLY* add them to your config file, if you havn't, but this version makes it handle those missing flags.

    v1.26
    *Slightly tweaked the AFKKicker code, to be even more lenient with not kicking user the first iteration (Should completely prevent being kicked in the first period the timer is running, to give the player a 'join-breather'). Added debug output for each AFKcheck aswell. If you have been experiencing 'premature AFKKick's, please turn on debug, and send me the logfile, if you are still experiencing it, after this update!

    v1.25
    *Changed langstrings KickSpotsfilledVIP, KickSpotsfilledNormal, KickAllSlotsFilled, to include data on how many spots are open for their tier, and how many of these are currently 'graceperiod'-locked, and when the next of these will open up.
    Please provide feedback if this works as intended. I was unable to test it.

    v1.24
    *Fixed a few language keys missing closing " in localization.csv file
    *Improved importing of Localization.csv file, to handle some edge-cases (Few strings were not imported properly).

    v1.23
    *Fixed wrong language key:
    KickSpotsfilled should've been KickSpotsfilledNormal
    (It's only a change in localization.csv)

    v1.22
    *Fixed bug: Sometimes languages would not resolve if a user was *somehow* not recognized by the mod.
    *Fixed bug: Sometimes kick-events would fail, because the user was *somehow* not recognized by the mod.

    v1.21
    *Fixed bug: If admin rejoins within the graceperiod, admin priveledges would not be given
    *Removed language debug output (Left in by accident)

    v1.2
    *Fixed issue introduced in v1.1, with not all ingame commands executing properly.
    (Namely trying to use dates didn't work as expected)

    *Added new config flag
    BackupFilesAt: Backup #Specify folder you wish to keep backups at. Specify 'NA' if you don't want to keep backups. Otherwise it will backup the following files: "specialslist.yaml", "secuirty.yaml" to this directory every time you START and STOP the server.
    (The purpose of the backup files is giving you a fallback, if you mess up your files somehow. For instance if you forcefully stop the server process, while a mod is writing to either of these files)

    *API server didn't shut down properly on server shutdown. Fixed.

    *Added CSV importer [getLocalization("KickLowRep","derpx")]

    *Added new file Localization.csv : This contains all the current expressions used by the mod.
    Currently, it only (really) supports English, as there is no way to determine a clients language as of now.

    *Added localization (first iteration) to the mod.
    -If you see one I've missed, please let me know!
    -If you feel like there is better ways of putting some of the messages / spelling errors, please feel free to suggest a change! :)
    -If you want to add an additional language, please do contribute! :D (Keep in mind however, that English is only supported atm, as API doesn't support getting the language setting of the client (as of A8.1))

    v1.15
    *Added new config param:
    GracePeriod: 2 #After an user disconnects, how long should they keep their spot (in minutes). (If they try to relog within this time, they will be allowed online. Note, that they will count as an 'used spot', untill the time have passed).
    Users disconnecting (forcefully, or otherwise), will (by default) have 2 minutes to log back on.
    If user was kicked by SpotGuard, the user will not have the graceperiod.

    v1.1
    *Added API share server, to be compatible with CommandCrate.
    Parameters:
    - Query: "list"
    Date: "dd-MM-yyyy HH:mm" (optional)
    Steam: "" Steamid (optional, either this or name)
    Name: "" Username (optional, either this or steam)
    Command: "" (Add/Edit/Remove) : Add, edit, or remove player from/to/on the list
    Will add/edit/remove a user by steamid and/or username to/from/on the whitelist/blacklist, with an optional expiration date.
    - Query: "status"
    Steam: "" Steamid (optional, either this or name)
    Name: "" Username (optional, either this or steam)
    Command: "" (Set/Get/Add)
    Value: "" The value you want it interacted with (required if not using GET in command)
    Stat: "" The stat in question (VIP/rep/vipend)
    Date: "dd-MM-yyyy HH:mm" (optional, only needed if stat is 'vipend')
    Will set, or addto, or get, a <stat> (vip/rep), and change/output it, based on steamid/name
    Example:
    http://localhost:8089/ModAPI/?a=somerandomstring&q=status&name=exacute&command=get&stat=vip
    Will display the VIP value for player 'exacute'
    http://localhost:8089/ModAPI/?a=somerandomstring&q=status&name=exacute&c=set&value=212&stat=rep
    Will set the REP value for player 'exacute' to 212
    etc.
    Parameter 'a' needs to be the API key from the config file for 'SpotGuard' (default: 'somerandomstring' -- You should REALLY change this).
    :8089 is the port specified in the config file.

    *Added new config params to 'config.yaml':
    ###=== Api section. If you want to disable the API, please set 'AllowServer' to 'false'. Otherwise please consider specifying a custom API key!!=====###
    AllowServer: true #Boolean, should there be a 'server' running from this mod, listening for external sources
    ServerPort: 8089 #int, which port should the server run on? Remember to portforward this, if you want to be able to use it from a domain or similar.
    ServerAPIkey: somerandomstring #string, if set, will require this in order to execute commands via the server. IF YOU RUN A SERVER YOU SHOULD CHANGE THIS!
    ServerSaveLogfileDir: server #string, which directory do you want this saved to? If you don't want it used, use NA
    MasterAPIkey: somerandomstring #string, if you are using multiple that are running on the same port, this should be used, and specified to whichever is started first of the mods' API-key

    DelayKick: 2 # If you want, you can delay a kick from happening (if an user is kicked to make room for another, they will have this many minutes to land their ship / get to a safe spot / logout themself) (default: 2 minutes)

    *Added DelayKick
    If you want, you can delay a kick-event (if the player is kicked for another player). The kick will happen regardless, but it will give them a chance to land their vessel / etc.
    Default: 'wait 2 minutes before kicking'

    *Allowing for 's! ' syntax, in addition to '/', '.', '!'
    This will allow for command-execution that does not appear in chat.

    *Requesting REP or VIP status will now reload the specials list, to be compatible with API calls, and other mods doing changes to it.

    *Fixed chatmessage handling, to support statements with spaces (for instance, if you have a player named 'exa cute', encase it in either "" or '', in your command (!spotguard get 'exa cute'))

    *Added {Played} : Resolves to the playtime of the user in minutes (number)

    *Added watchdog : Every minute, it will check every player online. If they for some reason didn't have their 'join check' done, it will execute it then.
    This is to solve an occasional bug with some players randomly not triggering the 'player connected event'.

    *Added additional check to make sure the initial join-check is only ever performed once for a player, when logging on. No issues reported regarding this, but a safeguard against bugs.

    *Added check to AFKKick, if the player have been online atleast the AFKkick duration.

    *Fixed messages from 'kicked player for being afk' not displaying properly.
     
    #3
    Last edited: May 15, 2019
    Ephoie likes this.
  4. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Please note, that there is two files in the download. One for A7.6.1, one for A8.0.
    Please use the appropriate.
     
    #4
    Last edited: Jun 19, 2018
    Ephoie likes this.
  5. Xango2000

    Xango2000 Captain

    Joined:
    Jun 15, 2016
    Messages:
    385
    Likes Received:
    202
    Wow, very impressive. You must be a pro. I'll add this to my guide.
     
    #5
    Ephoie and Exacute like this.
  6. SilvRav

    SilvRav Moderator

    • Moderator
    Joined:
    Jan 13, 2017
    Messages:
    539
    Likes Received:
    882
    thumbs up!
     
    #6
    Ephoie and Exacute like this.
  7. Ephoie

    Ephoie Captain

    Joined:
    Jan 27, 2018
    Messages:
    329
    Likes Received:
    515
    Nice Job, @Exacute
    My new fave mod!
     
    #7
    Exacute likes this.
  8. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Man... This is awesome... I have so many Ideas
     
    #8
  9. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Possible Addition?

    Once Daily commands run on player login (Or commands with a cooldown timer, maybe PVP detection?).
    Like for instance:

    - ExecuteCommand: sectors reveal
    CoolDown: 720
    ExecuteInPVP: False
     
    #9
  10. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    This will not be part of SpotGuard.
    My addon mod, that is still WIP, will execute a lot of command related things.

    With 'execteinpvp' do you mean, that it wouldn't be executed, if the player is on a pvp tagged playfield?

    Currently, there is no good ways to get data such as if the player have revealed a playfield or not. Hopefully down the line, we are able to also hook on the PDA hooks. But for now, that would not be possible, without a huge overhead.
     
    #10
    Ephoie likes this.
  11. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    I was suggesting it for "VIP" members based on data done in other similar games in the past. A very popular option has always been "Daily" rewards on login that are automated and configurable. Just a thought :)

    ExecuteInPVP: False - It would be nice if mods knew whether or not a player was in pvp or at least what playfield they were in so we could deny the use of "Something" by playfield name or pvp all together. Things like "Backpack" and lets say running the map command on a player would be crappy to allow in pvp space for the sake of pvp.

    You are planning plugins for spotguard?
     
    #11
  12. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Yes, atleast one, CommandCrate, is in the works. It's fairly far in the process, and I've been teasing it a little in the server discord ;)

    It will allow (some) hooks, aswell as a lot of different functionality, such as logic, math, variables, and more, that works together to create a .. sorta scripting.. approach to commands; It builds upon the concepts of SpotGuard, such as the reputation system, the logging of ingame-time, and the VIP status, and can be used to tailor the commands based on this.
    (For instance, you can have one command recharge quicker, if the user have a high reputation score, or only allow admins to use some commands, etc.. It's rather extensive, and you can for the most part mix and match the different things into what you want)

    The base concept is 'a command', that takes paremeters, that you define.

    I will likely have a playfield interface, so you can lookup data based on a playfields name.. This could likely tell you if the playfield is for pvp aswell.
    It will not be able to deny the player from using other mods commands however, as that is simply not how the game works atm ;)
    I wouldn't have any ideas to determine if a player 'is in pvp combat', so the playfield tag is likely the best you're gonna get with it ;)

    This would def. be possible with CommandCrate. You can award items, and schedule it to try when the user logs on, and have a cooldown, that resets every so often, depending on how you want it to work.

    It's still a bit off tho, but prob. worth the wait ;)
     
    #12
    Ephoie likes this.
  13. Ephoie

    Ephoie Captain

    Joined:
    Jan 27, 2018
    Messages:
    329
    Likes Received:
    515
    Command Crate is probably the most versatile mod out there! You can make your own mod with it, essentially, using the given Mod format.
    That is quite the peice of work, @Exacute
     
    #13
  14. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    (Ephoie is the primary tester of the mod, so he've had some experience with it this far ;) )
    It's not quite as versatile as writing your own mod - It certainly have some limitations in comparesment, such as not implementing everything the API is capable of; But you can accomplish a lot with it ;) (And somewhat more convenient writing a bit of YAML rather than a fullblown script)
     
    #14
  15. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Example of how this command looks in game? vipend (Sets the expiration date of their VIP membership. Removes all current VIP-expiration data, and replaces it with this date). I didnt see an example of how the date code is supposed to be formatted.

    Edit* Found an example in the specials file. TY anyways.

    Probably should be added to the documentation (My apologies If I didnt see it).

    Also. How does - ExecuteTelnetCommand: '{AdminRank:s} {PlayerName} joined the server.' actually work. I do not see these messages in game.
     
    #15
    Last edited: Jun 5, 2018
  16. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    It was so much the same as how the whitelist work, that I didn't add a help entry for it. Added it now, as clearly atleast one would've benefitted from it ;)

    As the name suggest, what you type there is a TELNET message.
    There is no telnet message with that syntax.
    The proper should be
    - ExecuteTelnetCommand: say '{PlayerName} is your godly administrator.'
    (For a full list of telnet commands: https://empyrion.gamepedia.com/Telnet_Commands )

    (Yes, I do realise that the default is wrong. It will be fixed with next update - You can however use it as any telnet command, with the above flexibility, rather than 'just' a say command, if you so desire ;) )
     
    #16
    Last edited: Jun 5, 2018
  17. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    Speaking of the next update:
    It is planned, to make the next update include an API, that you can send HTTP requests to, and have it update the white/blacklist and/or specialslist.
    So if you are having any system that supports that, it might make your life easier down the line ;)
     
    #17
  18. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    See I thought there was supposed to be a say command in there but i wasnt sure how exactly your mod works lol.
     
    #18
    Last edited: Jun 5, 2018
    Exacute likes this.
  19. Keith Hovey

    Keith Hovey Captain

    Joined:
    May 11, 2016
    Messages:
    221
    Likes Received:
    74
    Any way we could do a 5 minute or 2 minute or some kind of kick timer before it kicks a player for someone else??
     
    #19
  20. Exacute

    Exacute Rear Admiral

    Joined:
    Feb 17, 2017
    Messages:
    456
    Likes Received:
    307
    You are able to configure an AFK interval.. But when it comes to another player, I don't see how this is reasonable:
    Keep in mind, that this is totally doable, but you have to convince me why it's a good idea first ;)
    As is, the kick means that the limit is always kept.. If you would allow this, you would push the limit artificially, which doesn't make sense, and prob. leads to some undesired behaviour..
    I can't really see any benefit to doing a 'kick timer', rather than just throwing them off, if they are to be thrown off.
    Why do you want it?
     
    #20

Share This Page