TServerWeb

An online tshock server manager interface. Fully manage your server from the website, anywhere.

  1. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Thanks!

    Yes, I am working on that. It's been a bit of a challenge.. but it's coming along. :p
     
  2. sketaful

    sketaful Level 2

    Joined:
    Jul 18, 2012
    Messages:
    27
    I'm having some problems with the REST api. It seems I'm able to show my server as online and the number of players online, but not more that so. All I get is an error that the REST api is not responding as it should.
    I've put in the info for the superadmin account and I've made a key by going to <serveradress>:<port>/token/create/<login>/<password>.

    Is there something I've missed?
     
  3. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Not sure, if you want to PM/email me your server ID then I can take a look. Usually the issue is due to the port not being open, so the servers are not able to communicate. Make sure the game port AND API port are accessible from the internet.
     
  4. sketaful

    sketaful Level 2

    Joined:
    Jul 18, 2012
    Messages:
    27
    My router have the choice of selecting one computer to be "outside". So it should work. The server doesn't need any port forwarding this way, instead all ports are open directly towards the server unless I manually choose a port to go elsewhere. But I'll PM the adress. And when I get back home I'll double check the router as well, perhaps I've put the port to another computer. (I have to many computers :p)
     
  5. Scerion

    Scerion Level 4

    Joined:
    Sep 30, 2013
    Messages:
    55
    Greetings,
    It appears that *just* the tshock.restapi permission is enough to get this to work.
    I created a new group and gave it the tshock.restapi permission, this was its only permission.
    I placed a new user in that group, but upon setting that in the Tshock Config tab, it gave an Authentication Error (even after verifying the account/pw was correctly entered).
    I updated the groups parent to 'admin' and now all is working.
     
  6. Olink

    Olink Nyx Developer, Occasional TShock Developer
    Banned

    Joined:
    Jul 21, 2011
    Messages:
    1,397
    inb4 you have the new secure rest model enabled.
     
  7. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Is this what's going on? His server is connecting to the API, but as soon as I pass a variable in the query string it just dies? Very odd.
     
  8. Scerion

    Scerion Level 4

    Joined:
    Sep 30, 2013
    Messages:
    55
    Suggestion!
    So this was already in the plugin suggestions forum, but instead of a standalone I think you could easily configure it to show on Tserverweb...

    The world's current progress (i.e. what bosses have been killed, regular or hard mode....etc etc)

    I assume there's flags stating if certain bosses have been killed, invasions, etc. that could be picked up on?
     
  9. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Is there a way to do that in-game with tshock? (honest question)
     
  10. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    647

    Somewhat. You could use a plugin to pick up on the world's flags and maybe transfer them to you.

    Or, something possibly more up your alley, is to fake connect to the server by copying the connection process. Then when you have the world info from the server (along with all of the flags for bosses and what-not) you can disconnect. Check out Zidonuke's docs. Last time I checked the connection 'handshake' wasn't included, but it likely will be soon enough when he gets to it.
     
    • Like Like x 1
  11. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    This would require quite a bit more research.. I'll have to get back to you. :oops:
     
    • Like Like x 1
  12. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    I updated to accommodate for this already. :)
     
  13. jaydei

    jaydei Level 0

    Joined:
    Oct 6, 2013
    Messages:
    1
    hey i got an error (authentication error 2),yes my port are fowarded(both api and the server one,the api thing in the config file is at true,and the account has the good password and the good permission (i think so) anyone can help me ?
     
  14. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    Authentication Error 2 means when we tried to connect to the server and generate a token, it failed. This can be due to an invalid username and password, or the user you're trying to use does not have access to the REST API.
     
  15. Evinagro

    Evinagro Level 0

    Joined:
    Oct 5, 2013
    Messages:
    4
    Every time I restart my server, it resets the permissions(colors, groups, etc.)... Any fix?
     
  16. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    All of that is stored on the server, not at tserverweb.com, so that's an issue with your tShock setup. Sorry.
     
  17. 4rz0

    4rz0 Level 0

    Joined:
    Oct 7, 2013
    Messages:
    4
    This looks like something I want.
    Howhever, I don't yet see why it needs an account on the server.
    Can't the things that the tool needs be done trough this REST API?
     
  18. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    REST API requires authentication in order to execute anything on the server. :)
     
  19. DarkOS

    DarkOS tShock supporter and programming hack.

    Joined:
    Aug 17, 2011
    Messages:
    849
    ahh.. would that be why my signature is no longer showing the active players on the server? I have to have my php script authenticate with REST now?
     
  20. XGhozt

    Plugin Developer

    Joined:
    May 12, 2012
    Messages:
    171
    No, you can get the playerlist without an authorized token, but the REST endpoint recently changed. You have to request the player list specifically now and it is returned in an array, so you need to loop through each player to generate the list you had before.