Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-plugins/TeamsLogger
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.1
Choose a base ref
...
head repository: rust-plugins/TeamsLogger
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 25, 2020

  1. Update README.md

    NickRimmer authored Jan 25, 2020
    Copy the full SHA
    abc9fdb View commit details
  2. Discord integration

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    8cfbe50 View commit details
  3. config updates

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    78c9da9 View commit details
  4. rename derective

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    4b32aeb View commit details
  5. disable Discord by default

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    ccb2a05 View commit details
  6. update readme

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    99f2d78 View commit details
  7. udpate readme

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    c9df3ee View commit details
  8. code cleanup

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    8ef43d8 View commit details
  9. Merge pull request #3 from rust-plugins/develop

    New feature: Send log messages into Discord channel
    NickRimmer authored Jan 25, 2020
    Copy the full SHA
    269201f View commit details
  10. quick fix Discord API

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    f98793e View commit details
  11. Merge pull request #4 from rust-plugins/develop

    Quick fix Discord API
    NickRimmer authored Jan 25, 2020
    Copy the full SHA
    80cd99d View commit details
  12. version update

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    dee0328 View commit details
  13. Merge pull request #5 from rust-plugins/develop

    patch version increment
    NickRimmer authored Jan 25, 2020
    Copy the full SHA
    ec18735 View commit details
  14. discord via webhooks

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    7a5b1e4 View commit details
  15. version update

    NickRimmer committed Jan 25, 2020
    Copy the full SHA
    ac251ad View commit details
  16. Merge pull request #6 from rust-plugins/develop

    Discord via webhooks
    NickRimmer authored Jan 25, 2020
    Copy the full SHA
    d69a698 View commit details

Commits on Feb 23, 2020

  1. Update README.md

    umod-org[bot] authored Feb 23, 2020
    Copy the full SHA
    f01cc52 View commit details

Commits on Jun 2, 2021

  1. Update README.md

    umod-org[bot] authored Jun 2, 2021
    Copy the full SHA
    06922b4 View commit details
  2. Thanks to those who are currently watching this, I've updated the iss…

    …ues that were occuring at hand prior to this and now the config has much more to add to it.
    umod-org[bot] authored Jun 2, 2021
    Copy the full SHA
    2cd3900 View commit details
  3. Update README.md

    umod-org[bot] authored Jun 2, 2021
    Copy the full SHA
    5475d4e View commit details
  4. Update README.md

    umod-org[bot] authored Jun 2, 2021
    Copy the full SHA
    b56595a View commit details
  5. Update README.md

    umod-org[bot] authored Jun 2, 2021
    Copy the full SHA
    3545505 View commit details

Commits on Jun 3, 2021

  1. Copy the full SHA
    d84c01e View commit details

Commits on Aug 21, 2021

  1. Update README.md

    umod-org[bot] authored Aug 21, 2021
    Copy the full SHA
    566cbdf View commit details
Showing with 351 additions and 241 deletions.
  1. +4 −1 Examples/config/TeamsLogger.json
  2. +49 −29 README.md
  3. +298 −211 TeamsLogger.cs
5 changes: 4 additions & 1 deletion Examples/config/TeamsLogger.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"Print logs to console": true,
"Print logs to file": true
"Print logs to Discord": false,
"Print logs to file": true,

"Discord hook url": null
}
78 changes: 49 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,60 @@
Simple logger for teams provides additional logging. It can be configured to log into files or/and console output.
Simple plugin to provide additional logging of teams events. It can be configured to log into files, console output, Discord channel.

# Installation
To use this plugin with your Rust server, just copy `TeamsLogger.cs` into `\oxide\plugins` folder.
It will create default language files and default configuration.
## Configuration

After plugin will be loaded, you can change configuration file.
Then restart plugin using command in server console `oxide.reload TeamsLogger`

# Configuration
```JSON
{
"Print logs to console": true,
"Print logs to file": true
"CONSOLE SETTINGS": {
"Anti-Spam Measure (Seconds)": 3.0,
"Log to Console": true,
"On Logged Colors (1 - Red, 2 - Yellow, 3 - White)": 3
},
"DISCORD SETTINGS": {
"Anti-Spam Measure (Seconds)": 3.0,
"Discord Rate Limit": 360,
"Log to Discord": false,
"Webhook URL": "---DISCORD WEBHOOK HERE---"
},
"FILE SETTINGS": {
"Anti-Spam Measure (Seconds)": 3.0,
"Log to Files": false
}
}
```
# Localization

### Discord

To send logs via Discord, you'll need to configure [Discord WebHook url](https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks).

## Localization

```JSON
{
"OnTeamCreated": "Created {0} | Player: '{1}' ({2}) created new team",
"OnTeamDisbanded": "Disband {0} | Team leader: '{1}' ({2})",
"OnTeamLeave": "Leave {0} | Player: '{1}' ({2}, is leader: {3})",
"OnTeamInvite": "Invite {0} | Player '{1}' ({2}) sent invite to '{3}' (4)",
"OnTeamRejectInvite": "Reject {0} | Player: '{1}' ({2}) rejected invite",
"OnTeamPromote": "Promote {0} | Player: '{1}' ({2}) now is new leader",
"OnTeamKick": "Kick {0} | Player: '{1}' ({2}) was kicked",
"OnTeamAcceptInvite": "Accept {0} | Player: '{1}' ({2}) accepted invite",
"CurrentTeam": "History {0} | Previously created team with members: {1}"

"OnTeamCreated": "OnTeamCreated | Team ID: {0} | Player: '{1}' ({2}) created a new team.",
"OnTeamDisbanded": "OnTeamDisbanded | Team ID: {0} | Team Leader: '{1}' ({2}).",
"OnTeamLeave": "OnTeamLeave | Team ID: {0} | Player: '{1}' ({2}, is leader: {3}).",
"OnTeamInvite": "OnTeamInvite | Team ID: {0} | Player '{1}' ({2}) sent invite to {3} ({4}).",
"OnTeamRejectInvite": "OnTeamRejectInvite | Team ID: {0} | Player: '{1}' ({2}) rejected invite from {3}.",
"OnTeamPromote": "OnTeamPromote | Team ID: {0} | Player: '{1}' ({2}) is the new leader.",
"OnTeamKick": "OnTeamKick | Team ID: {0} | {1} was kicked. | Team Leader: {2}",
"OnTeamAcceptInvite": "OnTeamAcceptInvite | Team ID: {0} | Player: '{1}' ({2}) accepted invite from {3}.",
"CurrentTeam": "CurrentTeams: {0} | Previously created team with members: {1}"
}
```
# Log file example
Path to logs `\oxide\logs\TeamsLogger\teamslogger_common-####-##-##.txt`

## Log Example

To file `oxide/logs/TeamsLogger\/eamslogger_common-####-##-##.txt`
```
17:36:22 Created 96 | Player: 'xan' (76561198051734570) created new team
17:36:23 Leave 96 | Player: 'xan' (76561198051734570, is leader: True)
17:36:23 Disband 96 | Team leader: 'xan' (76561198051734570)
17:36:25 Created 97 | Player: 'xan' (76561198051734570) created new team
17:36:26 Leave 97 | Player: 'xan' (76561198051734570, is leader: True)
17:36:26 Disband 97 | Team leader: 'xan' (76561198051734570)
08:51:22 | OnTeamCreated | Team ID: 12 | Player: 'Ujiou' (765611) created a new team.
08:51:24 | OnTeamLeave | Team ID: 12 | Player: 'Ujiou' (765611, is leader: True).
08:51:25 | OnTeamCreated | Team ID: 13 | Player: 'Ujiou' (765611) created a new team.
08:51:27 | OnTeamLeave | Team ID: 13 | Player: 'Ujiou' (765611, is leader: True).
08:51:28 | OnTeamCreated | Team ID: 14 | Player: 'Ujiou' (765611) created a new team.
08:51:33 | OnTeamLeave | Team ID: 14 | Player: 'Ujiou' (765611, is leader: True).
```

## Credits
* **[0x89A](https://umod.org/user/0x89A)**, helped with slight issues occuring.
* **[Ujiou](https://umod.org/user/Ujiou)**, current maintainer of this plugin.
* **[NickRimmer](https://umod.org/user/NickRimmer)**, the original owner of this plugin.
Loading