NidToolbox: Server News module 1.7.1

Due to human (non-bot) spam the first contribution of a user has to be reviewed and activated manually, all further contributions do not require this.
As long as a user does not have at least one reviewed and activated contribution, the user is unable to edit his profile, set a avatar, title picture or a signature.

Contains Server News module for NidToolbox Light server tool-set. Server News can be either displayed automatically on login, or triggered at any time via command.

1573-nidtoolbox-design01-nid-64-png

Server News

for NidToolbox Light

requries nid-core module available here




NEW - if you would like to have your server logo appear in the notifications area in messages that come from NidToolbox. Please join my Discord https://discord.nidaren.net/ and post them in #server-logos channel.


Create displayable Server News, containing most recent updates to your server.


Support is provided as well as suggestions are accepted on my Discord here


Server News module allows:

  • This simple module allows server admins to list recent Server News on date-by-date basis.
  • News can be then displayed by the players in a pop-up window in game via a command.
  • It is possible to set the module to display the news automatically on login, and with set delay. For instant display, set delay to 1.
  • Module can be reloaded at any time, without the need of a server restart. Both message and configs are then loaded from the files.
  • Module is fully customizable, indcluding colors, formatting and font size.
  • Title of the window can be set as well, it accepts all currently available in game colors and formatting.
  • It is possible to set everything via the in-game commands but, for best results: edit both News Message and config file in the text editor, for the ease of use of all the available formatting tags.

(click to enlarge)




Requirements:

As any module of NidToolbox set, it requires nid-core version 1.0.3+ module, available in the main forum thread: here


How to install:

  1. Unpack .zip archive
  2. Copy nid-news.dll to Mods\NidToolbox\Modules


Settings files:

Config files are located at:

  1. Configs\Mods\NidToolbox\ServerNews.json - contains module settings.
  2. Configs\Mods\NidToolbox\NewsMessage.txt - contains news message.


ServerNews.json:

Code
{  
    "Info1": "NidToolbox Light: Server Changelog settings.",  
    "WindowTitle": "<color=#add8e6><i>MyServer</i>™</color> <color=yellow>Server News</color>"
    "ShowOnLogin": true,  
    "DisplayDelay": 1
}

ShowOnLogin - when true, Server News are displayed when player logs in. Default value - false.

WindowTitle - allows setting title for the window, accepts all kinds of formatting.

DisplayDelay - when ShowOnLogin is set to true, news will be displayed after the delay timer has elapsed. Default value: 1 - Instant.

IMPORTANT: Delay timer starts when the log in request is handed to the server NOT when the player appears in the world, so account additional 6-10 seconds for the word load.



NewsMessage.txt



Available commands:


/help News


Displays information about all commands contained within this module.


/news-show


Displays current server news.

/news-show

Code
/news-show


/news-titleset

Set Server News window title.

/news-titleset string title

Code
/news-titleset titleString



/news-reload


Reload Server News message and settings from config files.

/news-reload

Code
/news-reload


/news-onlogin


Enable or Disable on Login News window popup.

/news-onlogin bool trueFalse

Code
/news-onlogin true/false


/news-delay


Set News on Login display delay.

/news-delay int seconds

Code
/news-delay 20
  • Version 1.7.1

    * Updated project to net7.

  • Version 1.7.0

    Compatibility with Eco 9.7

  • Version 1.6.0

    * Updated module to Eco version 9.6.0


    * Updated to net6.


    * REQUIRES: EM-Framework 3.3.0-beta2 or higher

  • Version 1.5.0

    * (RC.3) Module output filename updated to match namespace.


    * Module updated to Eco 9.5.0


    * REQUIRES: EM-Framework 3.2.0-RC.3 or higher.

  • Version 1.1.2

    Version 1.1.2

    • Compatibility patch with EM Framework 3.1.0
    • Requires EM Framework 3.1.0
  • Version 1.1

    Version 1.1

    • Migrated project to Net5.
    • Compatibility patch with Eco version 9.4
    • Implemented DisplayDelay option in settings. Default 30 seconds. This is to ensure that news popup does not overwrite MOTD info when used in conjunction.
  • Version 1.0.0

    Version 1.0.0


    Initial release.