1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion StarryPy - A plugin driven server wrapper written in Python.

Discussion in 'Multiplayer' started by Carrots Are Mediocre, Jan 29, 2014.

  1. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Github link

    I've just released the first version of StarryPy, a Furious Koala compatible server wrapper. It adds plenty of admin commands and convenience functions. The documentation on github goes in-depth about the commands and features available, but here's part of the plugin section for a quick glance:
    With the built-in plugins (which are removable):

    • User management. Kicking, banning, whois, player listing. Multiple user levels.
    • Message of the day
    • Build protection by user level.
    • Warping.
    • Give item.
    • Starter items for new players.
    • Join/quit announcements.
    • Projectile blacklists.
    • Planet protection.
    • And much more.
    ---
    Commands
    General Commands:
    help - Prints help messages for plugin commands. Syntax: /help [command]
    shutdown - Shutdown the server in n seconds. Syntax: /shutdown [n amount of seconds] (n>0)

    Useful Commands:
    give_item - Gives an item to a player. Syntax: /give_item [target player] [item name] [opt: amount of item]

    Here's a (mostly) comprehensive list of items.

    MOTD Commands:
    set_motd - Sets the message of the day to a new value. Syntax: /set_motd [new motd]
    motd - Displays the message of the day. Syntax: /motd

    General Player Commands:
    who - Displays the amount and names of online players. Syntax: /who
    whois - Displays info about specified player. Syntax: /whois [playername]
    planet - Displays the amount and names of players on your planet. Syntax: /planet

    Admin Player Commands:
    promote - Promotes/demotes a user to a specified rank. Syntax: /promote [username] [rank] (where rank is either: guest, registered, moderator, or admin)
    list_players - Lists the names and UUID values for each online player. Syntax: /list_players
    delete_player - unknown

    Ban/Kick/Mute Commands:
    ban - Bans an IP. Syntax: /ban [IP address]
    kick - Kicks a player from the server. Syntax: /kick [username] [reason]
    mute - Mutes a player (disallows them from typing in chat). Syntax: /mute [player name]
    unmute - Allows a muted player to type in chat again. Syntax: /unmute [player name]

    Warp Commands:
    warp - Warps another player to your ship or you to another players ship. Syntax: /warp [player name] OR /warp [player 1] [player 2]
    spawn - Warps you to spawn. Syntax: /spawn
    move_ship - Move your ship to another player or specific coordinates. Syntax: /move_ship [player name] OR /move_ship [from player] [to player]

    Anti-Grief Commands:
    protect - Protects the current planet that you are on, only registered rank users can build on protected planets. Syntax: /protect
    unprotect - Removes protection from the protected planet that you are on. Syntax: /unprotect

    Plugin Related Commands:
    list_plugins - Lists all available plugins on your server, enabled and disabled. Syntax: /list_plugins
    enable_plugin - Enables the given plugin. Syntax: /enable_plugin [plugin name]
    disable_plugin - Disables the given plugin. Syntax: /disable_plugin [plugin name]

    Scary Commands:
    passthrough (you don't want to change this value, ordinarily) - Sets the server to passthrough mode *Irreversible without restart*. Syntax: /passthrough

    ---
    Version 1.2.3

    Mostly bugfixes. It is recommended to upgrade.

    Fixes:
    * Colored names
    * Double quit messages
    * Announcements on failed joins
    * Several errors messages that were inappropriately printed to console
    * Projectile blacklist messages are now relegated to trace logging
    * Added trace logging, which should make it easier to diagnose issues

    Release link for those not using git: https://github.com/CarrotsAreMediocre/StarryPy/releases/tag/v1.2.3

    Please let me know if you have any problems with this release, particularly if they regard any of the previous issues. Once again, I hope this will fix the server full message. I've run several hundred forged connection tests against it, but my experiences may not translate to yours.
    ---
    StarryPy 1.2.1 released

    Upgrading:
    Please note that this version has a changed configuration file format. It is strongly recommended that you discard your old configuration file entirely and allow python to generate a new one. You may then replace the values in their proper place. If you don't follow this procedure, no support will be offered fixing up your newly broken configuration file. Back it up and start again. It's worth it. Your player.db file should be fine.

    There are a few new options in this version, one which is particularly important to set:
    starbound_path: Set this to the folder where your starbound.config is. For the moment it is only used for validation and the new /spawn command, but in the future it will also be used for the process monitor.

    In addition, all plugins now get their own section. You can change whether they will be activated or not. Due to the nature of this change, the MOTD now goes in a 'motd' key in the motd_plugin dictionary. Once again, if you allowed the configuration file to generate it won't be a problem.

    New Features/Fixes
    * /list_players and /delete_player command for admins. /list_players accepts wildcards for search. For example: /list_players Carrots*, and /delete_player Carrots Are Mediocre
    * /spawn command, if you have the starbound configuartion manager plugin active (active by default)
    * Much improved plugin manager. There is now no actual distinction between core plugins and plugins; plugins may depend on any other plugin and have them be automatically injected.
    * Better unicode support on the MOTD.
    * Untested UDP forwarder for steam statistics.
    * Ship protection has been fixed while in orbit of a planet that is protected.
    * Improved configuration file handling/saving.
    * Friendlier error messages all around.
    * Experimental trace debug mode, disabled by default.

    ---
    Version 1.2.0 released.
    Partial changelist:
    * Improved connection handling; no more dangling clients.
    * Projectile blacklist, configurable.
    * Connection reaper, automatically disconnects clients that have been inactive for a certain amount of time (default: 10 seconds)
    * Help command now only shows commands the player has access to.
    * Correct IP addresses are now attached to all users.
    * Configurable logging
    * Configurable regex on join for player names. By default it will remove color codes and leading/trailing spaces.
    * Improved log file handling
    * Improved configuration file handling; should make future transitions easier.
    * Improved documentation regarding installation.
    * Config flag for disabling the startup port check.
    * Chat logger
    * Improvements to the ORM base class.
    * UTF-8 compatibility for MOTD.
    * Less restrictive licensing terms regarding plugins. We will now accept BSD and MIT licensed plugins in PRs assuming they include their own license file. Sorry, but no GPL.
    * Simplified warping commands; coordinates are removed for now as they're redundant and difficult to use.

    I recommend all users upgrade as this fixes a lot of issues. Our configuration parser should now adopt sane default values for all unset variable, but it may conflict with previously set MOTDs. If that is the case, please delete that line in your config.json and replace it after running it once.

    Please read the new readme if you're having any woes.

    ----

    I have removed the copied readme file from this forum post to encourage all users to read it on github with proper formatting.
     
    Last edited: Feb 3, 2014
    IVogel, DanilaFe, sansy and 22 others like this.
  2. Maffi

    Maffi Astral Cartographer

    I, for one, approve this software! :rofl:
     
    Michelle911 likes this.
  3. Zelakto

    Zelakto Void-Bound Voyager

    Wow, thanks! I cannot wait to use it! <3
     
  4. RxStrength

    RxStrength Void-Bound Voyager

    Wow this is amazing and I'm gonna have to try it out on my dedicated linux box now!
     
  5. Zelakto

    Zelakto Void-Bound Voyager

    Crap, well, if I have to install linux to do this, im doing it. Whats a recommended version? Ubuntu?
     
  6. Maffi

    Maffi Astral Cartographer

    Any should do. We ran it under multiple Linux distros, MacOS, FreeBSD and Windows.
     
  7. StilleVande

    StilleVande Big Damn Hero

    Running Debian 7 64bit.

    I'll give this a shot, see how it acts. :)
     
  8. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Let me know if you have any problems. I've tested on debian a bit and noticed no problems, but YMMV. Just make sure python-dev is installed before trying to install the requirements with pip.
     
  9. Zelakto

    Zelakto Void-Bound Voyager

    And windows? How?
     
  10. Maffi

    Maffi Astral Cartographer

  11. Zelakto

    Zelakto Void-Bound Voyager

  12. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

  13. Zelakto

    Zelakto Void-Bound Voyager

    Still cant figure it out, can you like teamviewer or skype or something? Sorry.
     
  14. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Sure, I sent you a message. Hopefully I can help you out.
     
  15. Stadl0r

    Stadl0r Contact!

    This looks very promising! Perhaps though you could update the readme with a section on how to start & stop the server? Im running on CentOS, but relatively new to running python scripts via the terminal.
     
  16. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Alrighty, we got Zelkato up and running on windows. I'll try to put together a more comprehensive windows installation document.

    Sure, I'll get around to that in a little while. Short version for now though:
    Code:
    python server.py
    to run it, and press Ctrl+C to stop it.
     
  17. kyoto

    kyoto Orbital Explorer

    This wrapper fills my server to 24/24 when 1/24 and I can't join to server. When I stop it, I can join to server again.
    Sorry for my English.
     
  18. Carrots Are Mediocre

    Carrots Are Mediocre Zero Gravity Genie

    Kyoto, there should be a debug.log file in your StarryPy directory. Would you mind posting it and your config/config.json? It will have your user UUID and IP in it, so you might want to remove those first. You can private message me if you like.
     
  19. kyoto

    kyoto Orbital Explorer

    Code:
    2014-01-29 16:43:09,767 - starrypy - INFO - Created StarryPyServerProtocol with UUID XXX
    2014-01-29 16:43:09,767 - starrypy - DEBUG - Connection made in StarryPyServerProtocol with UUID XXX
    2014-01-29 16:43:09,769 - starrypy - DEBUG - Client protocol instantiated.
    2014-01-29 16:43:10,495 - starrypy.player_manager.manager - INFO - Adding new player with name: MrDreamer93
    2014-01-29 16:43:12,473 - starrypy.plugin.player_manager - INFO - Player MrDreamer93 (UUID: XXX, IP: XXX) logged in
    2014-01-29 16:43:12,473 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; joined.
    2014-01-29 16:43:12,474 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; joined.
    2014-01-29 16:43:12,475 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; joined.
    2014-01-29 16:43:12,475 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; joined.
    2014-01-29 16:43:12,476 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; joined.
    2014-01-29 16:43:12,847 - starrypy.utility_functions - DEBUG - Giving item coalore (count: 200
    ) to MrDreamer93
    2014-01-29 16:43:12,848 - starrypy.utility_functions - DEBUG - Giving item alienburger (count: 5) to MrDreamer93
    2014-01-29 16:43:12,849 - starrypy - DEBUG - Sent chat message with text: Test
    
    2014-01-29 16:43:12,849 - starrypy - DEBUG - Sent chat message with text: Test
    2014-01-29 16:43:12,850 - starrypy - DEBUG - Sent chat message with text:
    2014-01-29 16:43:12,850 - starrypy.plugin.new_player_greeter_plugin - INFO - Gave starter items to MrDreamer93.
    2014-01-29 16:43:12,851 - starrypy - DEBUG - Sent chat message with text: Message of the Day:
    Test
    
    2014-01-29 16:43:12,851 - starrypy - DEBUG - Sent chat message with text: Message of the Day:
    2014-01-29 16:43:12,851 - starrypy - DEBUG - Sent chat message with text: Test
    2014-01-29 16:43:12,852 - starrypy - DEBUG - Sent chat message with text:
    2014-01-29 16:43:12,888 - starrypy.plugin.player_manager - INFO - Player MrDreamer93 is now on a ship.
    2014-01-29 16:43:20,664 - starrypy.plugin.player_manager - INFO - Player disconnected: MrDreamer93
    2014-01-29 16:43:20,665 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; left.
    2014-01-29 16:43:20,666 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; left.
    2014-01-29 16:43:20,667 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; left.
    2014-01-29 16:43:20,668 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; left.
    2014-01-29 16:43:20,669 - starrypy - DEBUG - Sent chat message with text: ^#F7EB43;MrDreamer93^#F7EB43; left.
    And config.json

    Code:
    {
        "server_hostname": "localhost",
        "debug_file": "debug.log",
        "core_plugin_path": "./core_plugins",
        "colors": {
            "guest": "^#F7EB43;",
            "default": "^#F7EB43;",
            "registered": "^#A0F743;",
            "moderator": "^#4385F7;",
            "admin": "^#C443F7;",
            "owner": "^#F7434C;"
        },
        "owner_uuid": "XXX",
        "player_db": "config/player.db",
        "server_port": XXX,
        "plugin_path": "./plugins",
        "command_prefix": "/"
    }
    
     
  20. Zelakto

    Zelakto Void-Bound Voyager

    Hey Carrots, you can't do /pvp, it says its not a command. :(
     

Share This Page