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 CommandStar: Real-Time Chat, Online Players, and Server Status

Discussion in 'Multiplayer' started by Seriallos, Dec 15, 2013.

  1. TheOtherDrew

    TheOtherDrew Big Damn Hero

    Thank you very very much, I went total mindless mode here.
    I also realized how sensitive the parsing of that is.
    I tried spaces, tabs and whatnot. In the end I just downloaded a fresh copy of the config file.
  2. Seriallos

    Seriallos Space Penguin Leader

    Yeah, YAML is a little funny. It has some really nice features that can make it way nicer to use than JSON but those extra features can make it a bit tricker.

    I'm planning on coding up some better config validation so that the errors from commandstar are a bit easier to understand.

    I've also tweaked the default config file to provide slightly better instructions and examples which may help.
  3. malobre

    malobre Orbital Explorer

    I've made some modification for compatibility with http://starbound-servers.net/
    getPlayerList = (req, res, next) ->
      plist = []
      for i of playersOnline
        plist.push(nickname: playersOnline[i])
      resData =
        playercount: playersOnline.length
        playerlist: plist
      res.send resData
    server.get( '/server/playerList', getPlayerList )
    Enjoy ! :D
    I've made a pull request on GIthub
    Last edited: Dec 21, 2013
  4. Seriallos

    Seriallos Space Penguin Leader

    Cool! Just out of curiousity, is this an easier approach than using the playersOnline array in the /server/status endpoint?
  5. malobre

    malobre Orbital Explorer

    I don't if it's an easier approach but it work, that's all that matters to me :D
  6. Seriallos

    Seriallos Space Penguin Leader

    I don't see the pull request on GitHub - I do see your changes in your fork though! I think you need to initiate the pull request and then I can merge it into the main branch and folks will eventually get it when they update their install.
  7. malobre

    malobre Orbital Explorer

    I've juste forget to press the submit button on github x)
  8. Seriallos

    Seriallos Space Penguin Leader

    @FuzzyThor and anyone else interested, I've added experimental support for relaying in-game chat to IRC. it's in the master branch right now and requires setting up IRC configuration the config directory.

    I have it working on a personal IRC server without issue right now so test it out and let me know if it works!
  9. supernet2

    supernet2 Existential Complex

    I think UUID is generated based on users username. seems when i make the username supernet2 on multiple accounts UUIDs seem to be similary mapped out, work exploring but..... thats what i get from the meta file.
    Last edited: Dec 22, 2013
  10. Seriallos

    Seriallos Space Penguin Leader

    0.1.4 Released - IRC + (Some) Configurable Panels + Starbound-servers.net Support!

    Download from GitHub: https://github.com/seriallos/commandstar/releases/tag/v0.1.4

    Or just clone the master branch if you're into that kind of thing


    • Relay in-game chat to IRC. See config/default.yaml for details on configuring
    • Configuration flag to enable/disable active systems display
    • Configuration flag to enable/disable the API list in the footer
    • /server/players API endpoint (thanks https://github.com/malobre !)
      • Alias: /server/playerList
    • Detect crashes caused by segfaults
    • Player list is sorted by name
    • Reduced logging from server.coffee
    • Player names surrounded by <brackets> in chat log
    • Properly remove multiple color codes in player names and chat messages
    • Tweaks to default player list and system list (thanks malobre!)
    • No longer install testing dependencies by default
    NakashimaKun likes this.
  11. NakashimaKun

    NakashimaKun Pangalactic Porcupine

    Nice update
  12. shibdib

    shibdib Starship Captain

    Any way to make it so chat doesn't jump to a new line when you're scrolled up?
    malobre likes this.
  13. Seriallos

    Seriallos Space Penguin Leader

    Not at the moment. Right now I just scroll to the new chat line whenever one is received. I'll take a look at detecting if you're not scrolled to the bottom and not issuing the automatic scroll.
    supernet2 likes this.
  14. malobre

    malobre Orbital Explorer

    Pull request posted. Now the chat scroll down only if you were already at the bottom before the new message was posted :)
  15. Seriallos

    Seriallos Space Penguin Leader

    Merged in and cleaned up a bit! Thanks @malobre!

    Chat scroll should now work as expected.
    NakashimaKun likes this.
  16. Another suggestion since I discovered some players on my servers where generating a huge amount of Exception (log file size 100MB+)
    Basically in the array I'm storing the exception name, number times it happened, suspected players generating the error, the score (how much time a user is suspected of the exception)

    This gives pretty good results, on the demo link you can notice a user generated 8000 exception is few minutes, causing even more stability issues

                    else if(preg_match("/[^\s]+Exception:\s*No\s*such\s*object\s*named\s*\'[^']*\'/"$line$val) ||
    preg_match("/[^\s]+Exception:\s*No\s*such\s*item\s*\'[^']*\'/"$line$val) ||
                        if (!isset(
    $this->ex[$val[0]] = array();
                        if (!isset(
    $this->ex[$val[0]]['count'] = 0;
                        if (!isset(
    $this->ex[$val[0]]['players'] = array();
    $l implode(","$lines);
    //Warn: UniverseServer: Logged in account  as player Blossom
                        //Loading ship world received from client <315> <User: Blossom>
                        //Info: Client 'susan' <316> (100.XX.X.XXX:1729) connected
                        //if(preg_match("/.*\'(.*)\'.*\(.*\)(.*)/", $l, $val2)) {
                            //if ($this->ex[$val[0]][$val2[1]] == null)
                            //    $this->ex[$val[0]][$val2[1]] = 0;
                        //    $this->ex[$val[0]][$val2[1]]++;
    if(preg_match("/Loading\s*ship\s*world\s*received\s*from\s*client.*\<User:\s*([^>]*)\>/"$l$val2)) {
                            if (!isset(
    $this->ex[$val[0]]['players'][$val2[1]] = 0;
    preg_match("/Warn:\s*UniverseServer:\s*Logged\s*in\s*account.*as player\s*(.*)/"$l$val2)) {
                            if (!isset(
    $this->ex[$val[0]]['players'][$val2[1]] = 0;
            <div id="chat" style="overflow:auto; height:300px; margin-bottom:15px;">
                <table class="table table-hover">
                            <th style='font-size:10px;'>Suspect player/Score</th>
                        <? if(count($ex) > 0):?>
                        <? foreach($ex as $k => $v): ?>
                            <?="<tr><td style='font-size:12px;'>".strip_tags($k)."</td><td style='font-size:10px;'>".$v['count']."</td><td style='font-size:10px;'>".implode(", ", array_map(function ($k, $v) { return $k."/".$v; }, array_keys($v['players']), array_values($v['players'])))."</td></tr>"?>
                        <? endforeach;?>
                        <? endif;?>
  17. Axiomatic

    Axiomatic Star Wrangler

    Hey Seriallos,

    Please know that I am truly a linux newbie. But I was unable to make any of this work until this was done. Without having done this I was not able to run "npm install" successfully.

    $ sudo apt-get update
    # Install needed packages
    $ sudo apt-get install git-core curl build-essential openssl libssl-dev
    # Install node.js
    $ git clone https://github.com/joyent/node.git && cd node
    $ ./configure
    $ make
    $ sudo make install
    $ cd
    # Install npm
    $ curl http://npmjs.org/install.sh | sudo sh
    #Install CoffeeScript
    $ sudo npm install -g coffee-script
  18. Seriallos

    Seriallos Space Penguin Leader

    I'll keep an eye on this if I end up building out more admin tools. Right now I'm focusing on making the site as useful for the players as possible and as easy for admins to run. The other admin tools/wrappers are certainly going to have more features like this than mine will. And hopefully the next patch makes it unnecessary to track these many errors! :)
    supernet2 likes this.
  19. Seriallos

    Seriallos Space Penguin Leader

    What version of Linux are you using? Ubuntu, CentOS, or something else?

    At some point in the last week I added a little bit more info about installing NodeJS, basically pointing to some of the official docs: https://github.com/seriallos/commandstar#installation - was that available when you were trying to install or did I write it too late to help you?
  20. Mortalsinn

    Mortalsinn Zero Gravity Genie

    This new version works great! one small request - Starlight (Wrapper) has an admin chat channel feature where you put a # in front of what you're saying "#lets ban that noob" and this of course shows up on the web chat. Would it be a big deal to add a filter for this?

Share This Page