Automated Server Messages while playing, howto? [Linux]

elysiumelysium Members, Reinforced - Shadow Join Date: 2013-09-01 Member: 187516Posts: 5
edited September 2013 in Server Discussion
Hi Communtiy

I'm asking me, how can I setup automated server-messages?
Example: Every 30 Minutes server says: "This server is sponsored by XYZ" , or "This Server runs on CPU XYZ", if possible with some nice color of course *smile

linux dedicated server version

greetings elysium

Comments

  • SebSeb Melbourne, AUMembers, Forum Moderators, NS2 Playtester, Squad Five Blue, Squad Five Silver, WC 2013 - Silver, Retired Community Developer Join Date: 2013-04-01 Member: 184576Posts: 514 mod
    I believe shine admin has that functionality built in and is quite customisable.
  • MaxunitMaxunit Members, Reinforced - Shadow Join Date: 2005-02-01 Member: 39414Posts: 224 Fully active user
    edited September 2013
    Shine Admin does not have such a function to repeat a message every X Seconds or X Minutes (at least I am not aware of it). Something like a small LUA script, which calls "sh_say"/!say or "sh_csay"/!csay could do it. Those functions are included in Shine Admin.

    sh_say sends a message to every player in the Chat box, sh_csay sends a message to every player at the top centre of the screen.

    !say and !csay are the chat commands for those functions, if you are ingame and want to use them yourself.

    More information here: https://github.com/Person8880/Shine/wiki/Base-Commands
    I like to be in the darkness and to be unseen...
  • ZaggyZaggy NullPointerException The NetherlandsForum Moderators, NS2 Playtester, Reinforced - Onos, Subnautica Playtester Join Date: 2003-12-10 Member: 24214Posts: 3,654 mod
    I've got a cron script running for this, from an earlier post of mine:
    Zaggy wrote: »
    Sticky for great justice!


    Edit:

    How I set it up on my Ubuntu server:

    crontab -e

    */10 * * * * /home/username/ns2server/motd.sh

    File /home/username/ns2server/motd.sh with contents:
    #!/bin/bash
    /usr/bin/curl --digest "http://username:[email protected]:port/?request=json&command=Send&rcon=sv_say Admin contact: zaggynl in #naturalselection at irc.gamesurge.net" --max-time 3 --connect-timeout 3 -silent -o /dev/null

    Don't forget to give execute permission on motd.sh with chmod +x /home/username/ns2server/motd.sh

    Explanation: every 10 minutes it will say: "Admin contact: zaggynl on #naturalselection at irc.gamesurge.net"

    Use http://meyerweb.com/eric/tools/dencoder/ to encode the part after rv_say%20 to URL notation, otherwise the message will not display correctly.

    Edit: added chmod part.


    imageProud Dutchman image
    Join the Natural Selection IRC channel: #naturalselection on irc.gamesurge.net!
  • Person8880Person8880 Members, Squad Five Blue Join Date: 2013-01-02 Member: 177167Posts: 72 Advanced user
    Maxunit wrote: »
    Shine Admin does not have such a function to repeat a message every X Seconds or X Minutes (at least I am not aware of it).
    Of course it does, see the adverts plugin.
  • MaxunitMaxunit Members, Reinforced - Shadow Join Date: 2005-02-01 Member: 39414Posts: 224 Fully active user
    edited September 2013
    Person8880 wrote: »
    Maxunit wrote: »
    Shine Admin does not have such a function to repeat a message every X Seconds or X Minutes (at least I am not aware of it).
    Of course it does, see the adverts plugin.

    Oh, thank you for the headsup. I totally missed that one :/
    I like to be in the darkness and to be unseen...
Sign In or Register to comment.