Doomsiders and Titansmashers Starmade Daemon (DTSD)

    Joined
    Mar 4, 2015
    Messages
    14
    Reaction score
    1
    I believe this is contained in autovoteretrieval(). You can check that function to see what is going on. If the source website has changed then the url may be malformed or the method of collection may be incorrect.

    I am in the process of re-writing the Deamon into a new script system but I won't be done for a bit still. At this point I am no longer supporting the DTSD but I will help with scripting if you have a specific question.
    At line 2200 on the DTSD githumb you have: SERVERKEY="00000000000000000000" #Server key found at starmade-servers.com (used for voting rewards) > which i have removed all the zeros and added my key.

    the at line 1960 in the autovoteretrieval(){ function you have the following key url:
    KEYURL="http://starmade-servers.com/api/?ob...oters&key=$SERVERKEY&month=current&format=xml"

    now that still corresponds properly with the API documentation however no players ever show that they have votes:(. i also made note of the following call to pull votes independent of voters which it appears your URL only pulls voters.

    This is the API call to get all votes
    https://starmade-servers.com/api/?object=servers&element=votes&key={ServerKey}&format={Format}.

    your code reflect after keyurl
    [while]
    [do] if [ "$(ls -A $PLAYERFILE)" ]
    [then] ALLVOTES=$(wget -q -O - $KEYURL)
    for PLAYER in $PLAYERFILE/*
    [do]

    PLAYER=$(echo $PLAYER | rev | cut -d"/" -f1 | rev )
    TOTALVOTES=$(echo $ALLVOTES | tr " " "\n" | grep -A1 ">$PLAYER<" | tr "\n" " " | cut -d">" -f4 | cut -d"<" -f1)
    VOTINGPOINTS=$(grep "VotingPoints=" $PLAYERFILE/$PLAYER | cut -d= -f2 | tr -d " " )

    ect.

    i understand what the bash is trying to do but how dose it know exactly how many votes have been placed by a player if no call to the starmade-servers.com API is listed other then asking whom the voters are.

    Im feeling i should be changing ALLVOTES=$(wget -q -O - $KEYURL)

    to ALLVOTES=$(wget -q -O - "https://starmade-servers.com/api/?object=servers&element=votes&key=$SERVERKEY&format=xml"

    am i correct?
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    At line 2200 on the DTSD githumb you have: SERVERKEY="00000000000000000000" #Server key found at starmade-servers.com (used for voting rewards) > which i have removed all the zeros and added my key.

    the at line 1960 in the autovoteretrieval(){ function you have the following key url:
    KEYURL="http://starmade-servers.com/api/?ob...oters&key=$SERVERKEY&month=current&format=xml"

    now that still corresponds properly with the API documentation however no players ever show that they have votes:(. i also made note of the following call to pull votes independent of voters which it appears your URL only pulls voters.

    This is the API call to get all votes
    https://starmade-servers.com/api/?object=servers&element=votes&key={ServerKey}&format={Format}.

    your code reflect after keyurl
    [while]
    [do] if [ "$(ls -A $PLAYERFILE)" ]
    [then] ALLVOTES=$(wget -q -O - $KEYURL)
    for PLAYER in $PLAYERFILE/*
    [do]

    PLAYER=$(echo $PLAYER | rev | cut -d"/" -f1 | rev )
    TOTALVOTES=$(echo $ALLVOTES | tr " " "\n" | grep -A1 ">$PLAYER<" | tr "\n" " " | cut -d">" -f4 | cut -d"<" -f1)
    VOTINGPOINTS=$(grep "VotingPoints=" $PLAYERFILE/$PLAYER | cut -d= -f2 | tr -d " " )

    ect.

    i understand what the bash is trying to do but how dose it know exactly how many votes have been placed by a player if no call to the starmade-servers.com API is listed other then asking whom the voters are.

    Im feeling i should be changing ALLVOTES=$(wget -q -O - $KEYURL)

    to ALLVOTES=$(wget -q -O - "https://starmade-servers.com/api/?object=servers&element=votes&key=$SERVERKEY&format=xml"

    am i correct?
    Well it looks like the line 2200 that is just a file the Daemon creates. It is the configuration file so you would just need to open it and edit this setting there. Changing the code in this way would make it default when it creates the configuration file which I don't think is the behavior you are going for.

    At line 1960 the $SERVERKEY is being loaded by sourcing the configuration file. This is used as part of the URL in order to access the correct votes for the correct server. My best guess is you did not edit the configuration file and change the "00000" key to the correct one for your server. Let me know if this works for you.
     

    ToasterBorst

    Formerly known as Weishaupt
    Joined
    Sep 12, 2013
    Messages
    164
    Reaction score
    172
    • Legacy Citizen 2
    • Wired for Logic
    Looks like today's update broke all chat functions? Anyone on a quick-fix?
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    I have not had the chance to update the new version of server yet, but I would imagine unless it is hidden from the log that we should be able to get public chat to work. Lemme jump on and take a look.
     

    ToasterBorst

    Formerly known as Weishaupt
    Joined
    Sep 12, 2013
    Messages
    164
    Reaction score
    172
    • Legacy Citizen 2
    • Wired for Logic
    I have not had the chance to update the new version of server yet, but I would imagine unless it is hidden from the log that we should be able to get public chat to work. Lemme jump on and take a look.
    Badassery in quick response appreciated! I'm tech-savy, but just getting it working was an accomplishment for me! :)
    Had high hopes it might be a quick chat adaptation.
     
    Joined
    Mar 4, 2015
    Messages
    14
    Reaction score
    1
    great return on the update been having a small issue though. we renamed the old sh and put theis new one in. now all commands are giving an errors one is unrecognized command and the other is invalid parameters please use !command <amount>.. seems like my chat isnt pulling the ! properly?
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    Yes, Schema has changed the chat string a couple of different times now. The current one is

    [CHANNELROUTER] RECEIVED MESSAGE ON Server(0): [CHAT][sender=Doomsider][receiverType=CHANNEL][receiver=all][message=hey]

    Here is a simple example of how you could extract all the needed variables

    MYCHATSTRING="[CHANNELROUTER] RECEIVED MESSAGE ON Server(0): [CHAT][sender=Doomsider][receiverType=CHANNEL][receiver=all][message=hey]"
    CUTSTRING=${MYCHATSTRING#*=}
    # Remove everything after first ] to get just the name of the sender
    SENDERNAME=${CUTSTRING%%]*}
    # Removes at the second =
    CUTSTRING=${CUTSTRING#*=}
    # Remove everything after ] to get receivertype
    RECEIVERTYPE=${CUTSTRING%%]*}
    # Removes at the third =
    CUTSTRING=${CUTSTRING#*=}
    # Remove everything after ] to get receiver
    RECEIVERNAME=${CUTSTRING%%]*}
    # Removes at the fourth =
    CUTSTRING=${CUTSTRING#*=}
    # Remove everything after ] to get message
    MESSAGESTRING=${CUTSTRING%%]*}
    echo "This was the message $MESSAGESTRING"
    echo "This was sender $SENDERNAME"
    echo "This was receiver $RECEIVERNAME"
    echo "This was receivertype $RECEIVERTYPE"
     
    Joined
    Mar 4, 2015
    Messages
    14
    Reaction score
    1
    thank you for your quick response i totally fubared getting that code in there so i think ill wait for an update from you so as not to corrupt my server. do you have someplace i could donate to ya for this awesome work you have been putting in
     

    Doomsider

    Server scriptologist
    Joined
    Jan 21, 2013
    Messages
    215
    Reaction score
    43
    You have caught me in an awkward spot right now. I do appreciate the thanks and offers of support but I will no longer be maintaining DTSD. I have moved that energy and effort into developing Shadow which is the spiritual successor of DTSD. It is not quite done yet, but I am thinking in a week or two it will be ready for servers.

    https://github.com/doomsider/shadow
     
    Joined
    Mar 4, 2015
    Messages
    14
    Reaction score
    1
    well i have been following and keeping up i do look forward to the new deamon when it is ready!
     
    Joined
    Dec 6, 2014
    Messages
    11
    Reaction score
    1
    Yea, keep us informed! I Love DTSD and can't wait for any successors! Spiritual, physical or otherwise!