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. Brockway

    Brockway Pangalactic Porcupine

    /whois for a player
    /whoiam for yourself

    Cheers.
     
  2. teihoo

    teihoo Ketchup Robot

    Haha true!!! I'm such a noob -.-
     
  3. FuzzyThor

    FuzzyThor Existential Complex

    @teihoo I am not sure if this was covered but what is the defualt level a player had to be in order to claim a planet?

    Edit: I found out. Is there a way to add another user level to this say VIP to use more then the guest can
     
    Last edited: Mar 29, 2014
  4. teihoo

    teihoo Ketchup Robot

    Currently all claim commands are set for everyone (GUEST and above): @permissions(UserLevels.GUEST)
    If you want to change it to registered, just change all those into: @permissions(UserLevels.REGISTERED)
     
  5. FuzzyThor

    FuzzyThor Existential Complex

    Well what I want is for guests to beable to claim 1 or 2 and if higher or above they can claim 5 or more.
    so could I add a line like
    Code:
    if
    @permissions(UserLevels.GUEST)
    then
    self.max_claims = 2
    else
    self.max_claims = 5
    Or

    Add something like

    Code:
    self.max_claims_guests = 2
    then for guests change
    Code:
    if int(my_storage['claims']) >= self.max_claims:
                my_storage['claims'] = self.max_claims
    to
    Code:
    if int(my_storage['claims']) >= self.max_claims_guests:
                my_storage['claims'] = self.max_claims_guests
    Then I would need to make additional sections for Registered users
     
    Last edited: Mar 29, 2014
  6. teihoo

    teihoo Ketchup Robot

    Yeah that might be a good idea to have 2 values for max_claims. I'll see how I can make it as simple as possible.
     
  7. FuzzyThor

    FuzzyThor Existential Complex

    Ok cool. I should get into coding so I can contribute. For the most part I can do anything that I set my mind to
     
    teihoo likes this.
  8. Fatmice

    Fatmice Subatomic Cosmonaut

    Hm, has this project been abandoned?
     
  9. SweFox

    SweFox Guest

    Carrot has been gone for a very long time but Teihoo took over development so you shall not worry, there's a working version :).
     
    teihoo likes this.
  10. teihoo

    teihoo Ketchup Robot

    Think you should simplify it, just add additional max_claims_guest parameter to config (hard set it to 1 or 2 if its not defined), then add an if that will do something like this: if self.protocol.player.access_level < UserLevels.REGISTERED (this will trigger when player is a guest).

    If user is not guest, then just do everything like its already done. Think that will be the easiest way.
     
  11. teihoo

    teihoo Ketchup Robot

    Not completely. Original author is missing, but a few ppl are still struggling to keep this one alive. Beta here: https://github.com/teihoo/StarryPy_Teihoo
     
  12. teihoo

    teihoo Ketchup Robot

  13. How is the performance on big servers on 1.4x then?
    Oddness. :eek:
     
  14. teihoo

    teihoo Ketchup Robot

    I really cant say. How many ppl can you run on a plain starbound server?
     
  15. 50 o_O
    I may try but if it lags madly, there is no other proxy, i shall cry.
     
  16. teihoo

    teihoo Ketchup Robot

    You can try, but it will use some resources though, on my end (with few players) usually the lag comes from starbound server before lagging out on starry py. I never rly tinkered with the core, except reverting that deffered function call back delay to what it was before enraged fix in development branch. Anyway biggest stress is obviously protection check.

    Edit: There were some talks on IRC, maybe we should do a re-write from scratch and just go with C. That would be the perfect solution then. But not an easy task.
     
  17. Wingfighter

    Wingfighter Guest

    I made a simple title function, it's on my github (https://github.com/iChris-cl/StarryPy_Teihoo_plus) in case you want it, commits might be a little bit confusing though (edited it online, ever file changed is a commit, then every dumb mistake again)
     
    teihoo likes this.
  18. teihoo

    teihoo Ketchup Robot

    That's very nice thank you :) Now I have an idea you can play with. Actually title_reset is redundant if you just make /title (player name) without any title specified, it will reset it - one command less.

    Also with subfunctions - that are not called by player commands like /title you do not need to specify rank before it, since its called as a subfunction of something that already has set permission - like
    @permissions(UserLevels.MODERATOR)
    def unban_by_name(self, data):

    Actually @permissions(UserLevels.MODERATOR) is already defined for /unban command which calls unban_by_name if it needs to, not by a player directly.

    Other than that, you made some changes with permissions and added donator group (which I'm not too kin to put in main branch, but could make a branch for it thought). Or maybe its something that should be put in (more ranks?).
     
  19. Wingfighter

    Wingfighter Guest

    Oh, well, about the functions, I just put blindly the permissions in front of the functions, was lazy. Also, for the title, I used a new column in the sqlite, which probably requires a player.db wipe when switching to this version. I might try adding it into plugin_storage
     
  20. teihoo

    teihoo Ketchup Robot

    There's already a function for migrating DB if you put it there, traxo made it for my original names addition, you can simply modify it to check for your title column. https://github.com/teihoo/StarryPy_Teihoo/commit/9b5138764ca616fb75fdb09453adad48b00c7bff
     

Share This Page