- Optional Dependencies
- http://oxidemod.org/plugins/popup-notifications.1252/
This is an advanced player informations and server notifications plugin.
This plugin is in it's core based on the former available Notifier plugin.
The best of this was taken out and the more or less poor realized parts where left behind, complete replaced and also highly improved and/or extended.
Core feature list for Tipster:
Default configuration examples/descriptions:
Adverts
Commands (if being available and their chatcommands)
Countryblocking (integrated for compatibility reasons with join/kick-messages in same time at seperate plugins)
Formatting (mainly self explaining)
General
PluginList (to exclude special plugins from being listed)
Description of the location validation functions:
On First launch, the plugin will create a countrynames dictionary with all available countries (249) provided by 81 languages. This is done by a webrequest to pastebin, where i did store these data as CSV. This call will create a file called "Tipster_CountryDatabase.json" in yourdata folder.
When a player first connects, a new data record gets created for that player. Then plugin tries then randomly to call 1 of 4 api-services to get the country-code for that IP. If one service fails for any reason, the next random one is called., up to the 4th and last. Each request is time-limited and also fail-safe designed to prevent any errors caused by failed web-requests.
NOTE: This does also increase the country blocking accuracy.
The returned countrycode does then resolve by internal check the resulting countryname and both is added to his data-record. This record is by default 7 days valid, before it gets re-validated. This keeps the amount of needed web-requests as low as possible.
These created player records are saved in "Tipster_PlayerDatabase.json" also in the data folder. This gets saved at "OnServerSave".
Player location and localization in combination:
When language localization is used, then the plugin does also return for any language the correct countryname in the to a player delivered language seperate for each player. This is done by comparing the available plugin languages against the player-client provided lanaguage and finally against the 81 available translations.
Default language file example:
Language handling and text extending:
All texts are included and supported by the language api.
When the default language file for english was created it can be copied into your desired language folder.
By default it contains example messages for the 3 major types:
You will note that every of these types has a number extension beginning from 00.
In case of you need more messages of a type, you can simply add a new message of your desired type and raise the number on the end.
NOTE: Don't set a trailing comma on the last line.
Example on Rules exended by "Rules03" and also the last line shown:
In case of you need less then the provided lines, don't delete the default lines/texts! Simply replace the text-content of these lines by a space or a dash.
The plugin has a modifed language-file handling which allows it to keep any added messages in the file. This works only in Tipster, dont't try this elsewhere.
In case of you got already an alternate language file created, you can save the english file after adding new lines and reload the plugin. All new lines get then also added to the existing language files for the plugin.
The Messages support currently these generally placeholders:
The join/leave message types support also these:
I will try next time to extend to the plugin that way to support additional data also from other sources/plugins.
.
This plugin is in it's core based on the former available Notifier plugin.
The best of this was taken out and the more or less poor realized parts where left behind, complete replaced and also highly improved and/or extended.
Core feature list for Tipster:
- Player join informations
- Player leave informations
- Welcome messages
- Server rules information
- Advert messaging
- Multiple formatting optins for join/leave messages
- All country names available in 81 languages
- Welcomes messages
- Advert messages
- Server rules
- Several text coloring options
- Seperator coloring and options
- Full prefix formatting
- Extended Advert messaging controls
- Several enable/disable switches for message parts
- Plugin command options enable/disable switches
- Plugin command "chatcommand" definitions changeable
- 4-way fail-safe country-code check
- Countryblock functions included
- Self-generating CountryList with 81 available translations
- Filter function for Pluginlist command
Default configuration examples/descriptions:
Adverts
JavaScript:
{
"Adverts": {
"Adverts enabled": true, // enable/disable Advert messages
"Broadcast to console": false, // to show also on console
"Display interval (minutes)": 10, // interval between each message
"Display order randomized": true, // true=random, false=sorted by number
"Use PopupNotifications": false, // optional use of PopopNotifications
"Used Popup time": 10.0 // display time for Popup's
},
JavaScript:
"Commands": {
"Activation": {
"CmdAdminsList": false, // Adminlist overview
"CmdHelp": true, // Commands overview
"CmdPlayersCount": true, // Playercounts
"CmdPlayersList": true, // Playerlist overview
"CmdPluginsList": false, // Pluginslist overview
"CmdServerRules": true // Server rules overview
},
"Command": {
"CmdAdminsList": "admins",
"CmdHelp": "tipster",
"CmdPlayersCount": "online",
"CmdPlayersList": "players",
"CmdPluginsList": "pluginlist",
"CmdServerRules": "rules"
}
},
JavaScript:
"CountryBlocker": {
"Blocked country codes": [ // default blocked country codes
"CN",
"KP"
],
"Bypass permission": "tipster.bypassblock", // permission needed for bypass
"Enable blocker": false, // enable/disable blocking function
"Exclude admins": true, // to exlude admins of any blocks
"Use as whitelist": false // can change list function to include only listed countries
},
JavaScript:
"Formatting": {
"AdminsList namecolors": "#00a877",
"Chat separator": "#acacac",
"Command headlines": "#bfc1c2",
"Commands descriptions": "#ff8651",
"Commands in overview": "#efcc00",
"Date Format": "{day}/{month}/{year}",
"PlayersList namecolors": "#6699cc",
"Plugins name": "#ff8651",
"Plugins version": "#c0c0c0",
"Prefix": "Tipster",
"Prefix color": "#00b7eb",
"Prefix format": "| <color={0}>{1}</color> |",
"Show headline separators": true,
"Textcolor default": "#bebebe",
"Textcolor rulesview": "#ff7538",
"Time Format": "{hour}:{minute}:{second}"
},
JavaScript:
"General": {
"Broadcast to console - join/leave": true, // show join/leave also to console
"Days how long country is valid": 7, // valid days for a located player country
"Enable - join messages": true, // show player joins
"Enable - leave messages": true, // show player leaves
"Enable - welcome message": true, // display to players the welcome messages
"Hide admins - Join": false, // hide admins at join
"Hide admins - Leave": true, // hide admins at leave
"Hide admins - List": true // hide admins being online
},
JavaScript:
"PluginList": {
"Hidden in overview": [
"Rust",
"Unity Core",
"AdminRadar"
]
}
Description of the location validation functions:
On First launch, the plugin will create a countrynames dictionary with all available countries (249) provided by 81 languages. This is done by a webrequest to pastebin, where i did store these data as CSV. This call will create a file called "Tipster_CountryDatabase.json" in yourdata folder.
When a player first connects, a new data record gets created for that player. Then plugin tries then randomly to call 1 of 4 api-services to get the country-code for that IP. If one service fails for any reason, the next random one is called., up to the 4th and last. Each request is time-limited and also fail-safe designed to prevent any errors caused by failed web-requests.
NOTE: This does also increase the country blocking accuracy.
The returned countrycode does then resolve by internal check the resulting countryname and both is added to his data-record. This record is by default 7 days valid, before it gets re-validated. This keeps the amount of needed web-requests as low as possible.
These created player records are saved in "Tipster_PlayerDatabase.json" also in the data folder. This gets saved at "OnServerSave".
Player location and localization in combination:
When language localization is used, then the plugin does also return for any language the correct countryname in the to a player delivered language seperate for each player. This is done by comparing the available plugin languages against the player-client provided lanaguage and finally against the 81 available translations.
Default language file example:
JavaScript:
{
"Join Message": "<color=#5af>{player.name} <color=#bfc1c2>joined from</color> {player.country}</color>",
"Join Message Unknown": "<color=#5af>{player.name} <color=#bfc1c2>joined from anywhere</color>",
"Join Admin": "<color=#af5>{player.name} <color=#bfc1c2>joined the server</color></color>",
"CountryBlocked": "Your country is blocked on this server",
"Leave Message": "<color=#5af>{player.name}</color> left the server (Reason: {reason})",
"Leave Admin": "<color=#af5>{player.name}</color> left the server",
"No Admins Online": "There are no <color=#00b7eb>Admins</color> currently online",
"CmdPlayersList Description": "List of active players",
"CmdPluginsList Description": "List of plugins running in the server",
"CmdAdminsList Description": "List of active Admins",
"CmdServerRules Description": "Displays server rules",
"CmdHelp Description": "Shows this overview",
"CmdPlayersCount Description": "Counts players, sleepers and admins of the server",
"Players List Title": "Players List",
"Plugins List Title": "Plugins List",
"Admins List Title": "Admins Online",
"Server Rules Title": "Server Rules",
"Command Overview": "Available Commands",
"Players Count Message": "There are <color=#ff7538>{players.active} <color=#bfc1c2>of</color> {server.maxplayers}</color> <color=#bfc1c2>players in the server, and <color=#ff7538>{players.sleepers}</color> sleepers</color>",
"Welcome00": "<size=18>Welcome <color=lightblue>{player.name}</color></size>",
"Welcome01": "<color=#ff7538><size=20>•</size></color> Type <color=#ff7538>/tipster</color> for all available commands",
"Welcome02": "<color=#ff7538><size=20>•</size></color> Please respect our server <color=#ff7538>/rules</color>",
"Welcome03": "<color=#ff7538><size=20>•</size></color> Have fun and respect other players",
"Advert00": "<color=#ff7538>Need help?</color> Try calling for the <color=cyan>Admins</color> in the chat.",
"Advert01": "Please avoid any insults and be respectful!",
"Advert02": "Cheating or abusing of game exploits will result in a <color=red>permanent</color> ban.",
"Advert03": "You are playing on: <color=#ff7538>{server.hostname}</color>",
"Advert04": "There are <color=#ff7538>{players.active}<color=#bfc1c2>/</color>{server.maxplayers} <color=#bfc1c2>players playing in the server, and</color> {players.sleepers}</color> sleepers.",
"Advert05": "Check the tips with <color=#ff7538>/tipster</color> command.",
"Rules00": "Cheating is strictly prohibited!",
"Rules01": "Respect all players!",
"Rules02": "Don't spam the chat!"
}
Language handling and text extending:
All texts are included and supported by the language api.
When the default language file for english was created it can be copied into your desired language folder.
By default it contains example messages for the 3 major types:
- Welcome
- Advert
- Rules
You will note that every of these types has a number extension beginning from 00.
In case of you need more messages of a type, you can simply add a new message of your desired type and raise the number on the end.
NOTE: Don't set a trailing comma on the last line.
Example on Rules exended by "Rules03" and also the last line shown:
JavaScript:
"Rules00": "Cheating is strictly prohibited!",
"Rules01": "Respect all players!",
"Rules02": "Don't spam the chat!",
"Rules03": "Don't be evil!"
}
In case of you need less then the provided lines, don't delete the default lines/texts! Simply replace the text-content of these lines by a space or a dash.
The plugin has a modifed language-file handling which allows it to keep any added messages in the file. This works only in Tipster, dont't try this elsewhere.
In case of you got already an alternate language file created, you can save the english file after adding new lines and reload the plugin. All new lines get then also added to the existing language files for the plugin.
The Messages support currently these generally placeholders:
Code:
{server.ip} > ConVar.Server.ip
{server.port} > ConVar.Server.port
{server.hostname} > ConVar.Server.hostname
{server.description} > ConVar.Server.description
{server.maxplayers} > ConVar.Server.maxplayers
{server.worldsize} > ConVar.Server.worldsize
{server.seed} > ConVar.Server.seed
{server.level} > ConVar.Server.level
{localtime.now} > time
{localtime.date} > date
{players.active} > "Active Players"
{players.joining} > "ServerMgr.Instance.connectionQueue.Joining"
{players.queued} > "ServerMgr.Instance.connectionQueue.Queued"
{players.online} > "ServerMgr.Instance.connectionQueue.Joining + Active"
{players.sleepers} > "Sleepers"
{players.total} > "Active + Sleepers"
Code:
{player.name} > Player Name
{player.country} > Player Country
{player.countrycode} > Player CountryCode
{player.ip} > Player IpAddress
{player.uid} > Player UserID
.