Coder Social home page Coder Social logo

servermod / scpdiscord Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 28.0 22.55 MB

A ServerMod plugin which adds remote interaction to an SCP:SL server through Discord.

Home Page: https://karlofduty.com

License: GNU General Public License v3.0

C# 99.97% Batchfile 0.03%
discord scp-sl smod2 plugin discord-bot discord-js mono dotnet c-sharp

scpdiscord's Introduction

SCPDiscord Build Status Release Downloads Discord Server Codacy Badge

This is the old Smod version, looking for the new NWAPI plugin? It's available here

SCPDiscord links features from your SCP:SL server console to Discord channels, such as printing out server events to Discord and using server commands through Discord. It is incredibly customisable as you can read more about below.

Features:

  • Ability to log any ServerMod event to Discord. All are optional and can be toggled individually.

  • Complete multi-channel support letting you post different events to different channels. All can be individually re-routed.

  • Support for MultiAdmin managed servers, each sub-server can post to the same channel, different channels or even different bots and different Discord servers.

  • You can for instance have one public channel for each of your servers where things like player joins, kills, round starts and round ends are posted. You could then add one channel for each server visible only to moderators, showing things like admin actions and logging who attacks who on each server to check for teamkillers.

  • Ability to use different commands through Discord, currently kick, ban and unban. To my knowledge this is the only plugin that currently offers banning offline players, so hackers leaving as soon as they see an admin coming on is no longer an issue. It is also the only plugin I'm aware of that lets you unban players.

  • The ability to completely customise every single message from the plugin and use different languages. More info here.

  • Player count is displayed in the bot activity field. The bot's status changes from dnd when the scp server is off but the bot server is on, away when there are no players on a server and online when a server has players.

  • You can sync ranks from discord to the game, letting you automate things like supporter rewards and moderator positions.

Guides

scpdiscord's People

Contributors

barna13 avatar darnsouls avatar iopietro avatar itembi4 avatar joker-119 avatar karlofduty avatar lewisakura avatar mattymatty97 avatar minerpl avatar realmwth avatar sandeq avatar secondfry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scpdiscord's Issues

Memory leak ?

i have this error on my screen with scpdiscord, i'm on ubuntu 16.04 6gb of ram (96% used by the bot)
(node:11287) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

The bot writes OnHurt messages four times

and the killer/killed is the same like this:
Gaby (76561198046907785) was hurt by Gaby (76561198046907785) using SCP_096.
Gaby (76561198046907785) was hurt by Gaby (76561198046907785) using SCP_096.
Gaby (76561198046907785) was hurt by Gaby (76561198046907785) using SCP_096.
Gaby (76561198046907785) was hurt by Gaby (76561198046907785) using SCP_096.
Gaby (76561198046907785) was hurt by Gaby (76561198046907785) using SCP_096.

Add OFFLINE ban system

Banning using few arguments like:
offlineban

For players that left server and currently offline.

Discord Ban Permission

Greetings!

I was wondering if you could add a thing to where you have the option to disable the discord ban permission requirement - so essentially only people who have access to type in that channel can use the ban commands. Thanks!

Activities doesn't work on 0.3.1 version

discord_activity_playercount: on
discord_server_status: Players online: var:players/var:maxplayers. Round has lasted var:roundduration minutes. Active SCP: var:scpalive. Warhead switchdetonationvar:warheaddetonated been detonated. Server has been online for var:uptime minutes. Direct connect: var:ip:var:port
discord_server_status_regex: switchdetonationTrue:has,switchdetonationFalse:has not
discord_server_status_channel: default

Still no activity changes, it is stuck at "Listening for server startup"
Also no server status outputted =(

Make config option to disable server console "sent message" [Suggestions]

My server keeps running low on memory due to the server console filling with the "sent message ... to discord". Other than that this is proving to be helpful and like by my server's community. But would it be possible to add a config option to disable "sent message ... to discord" from server console or at least have it send fewer messages through the server console?

Error from bot that crashes it, having to restart it after

`(node:10556) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
at item.request.gen.end (/home/nomana/scp1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:71:65)
at then (/home/nomana/scp1/node_modules/snekfetch/src/index.js:215:21)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:10556) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:10556) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Plugin connection lost.
events.js:188
throw err;
^

Error: Unhandled "error" event. ([object Object])
at Client.emit (events.js:186:19)
at WebSocketConnection.onError (/home/nomana/scp1/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:374:17)
at WebSocket.onError (/home/nomana/scp1/node_modules/ws/lib/event-target.js:128:16)
at emitOne (events.js:116:13)
at WebSocket.emit (events.js:211:7)
at _receiver.cleanup (/home/nomana/scp1/node_modules/ws/lib/websocket.js:211:14)
at Receiver.cleanup (/home/nomana/scp1/node_modules/ws/lib/receiver.js:557:13)
at WebSocket.finalize (/home/nomana/scp1/node_modules/ws/lib/websocket.js:206:20)
at emitOne (events.js:116:13)
at TLSSocket.emit (events.js:211:7)`

I currently have the bot running a separate server from the SCP servers and it works great but after some runtime it crashes and gives this error, then I have to go in and restart the bot. I currently have it setup for 1 Discord bot to send to 5 server channels for the 5 servers we run through different listening ports.

Role syncing

Should probably add all steam accounts from users with a specific discord role on server startup also remove all who do not have their discord role anymore. Roles to sync should be configurable. should have a role hierarchy to make sure players get their highest possible role. This could open up for normal users to get discord commands as well, should investigate if there is a demand for that.

  • Add public commands #112 .

  • Add data file to save Discord<--->Steam bindings.

  • Add system to get SteamIDs from Steam profile links.

  • Add Discord role request system to plugin + bot.

  • Add role sync config or role sync entries to current config.

  • Check Discord role on player join and set their server rank.

  • Fix rank not being updated for clients

  • Add console command to unbind steamid.

Suggestion for ban command (Discord)

Maybe it can be usefull to check for duplicate SteamID ban before banning and check nickname/reason strings (may broke the tokenized file using ";" in reason, or nickname

Error OnPlayerHurt

OnPalyerHurt: Dahim (UNASSIGNED / 10) by Server (UNASSIGNED / 6) : Damage: 10 (DECONT) - Life before: 100
[19:34:35] [ERROR] [Event]  Event Handler: SCPDiscord.PlayerEventHandler Failed to handle event:Smod2.Events.PlayerHurtEvent
[19:34:35] [ERROR] [Event]  Array index is out of range.
[19:34:35] [ERROR] [Event]    at SCPDiscord.PlayerEventHandler.OnPlayerHurt (Smod2.Events.PlayerHurtEvent ev) [0x00000] in <filename unknown>:0
  at Smod2.Events.PlayerHurtEvent.ExecuteHandler (IEventHandler handler) [0x00000] in <filename unknown>:0
  at Smod2.Events.EventManager.HandleEvent[IEventHandlerPlayerHurt] (Smod2.Events.Event ev) [0x00000] in <filename unknown>:0

NONE and UNASSIGNED event spam

onplayerdie self seem bug with scp "playername" killed themselves using SCP-173 or SCP-096...
EDIT: onplayerdie for SCP-173 and SCP-096 it's smod or game problem not scpdiscord sorry
I have a second problem when I make the command +ban steamid timeandunit the plugin say :
Plugin connection lost.
Plugin connection lost.
Plugin connection lost.

sometime the plugin spam UNASSIGNED or NONE

Crash when I start the server with the new version

Ubuntu 16.04
The following assembly referenced from /home/barnaby/Steam/steamapps/common/SCP Secret Laboratory/sm_plugins/dependencies/Newtonsoft.Json.dll could not be loaded:
Assembly: System.Xml.Linq (assemblyref_index=4)
Version: 3.5.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/barnaby/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/../sm_plugins/dependencies/).

Could not load file or assembly 'System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
Could not load file or assembly 'System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XContainerWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XObjectWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The class Newtonsoft.Json.Converters.XContainerWrapper could not be loaded, used in Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
The following assembly referenced from /home/barnaby/Steam/steamapps/common/SCP Secret Laboratory/sm_plugins/dependencies/Newtonsoft.Json.dll could not be loaded:
Assembly: System.Runtime.Serialization (assemblyref_index=5)
Version: 3.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/barnaby/Steam/steamapps/common/SCP Secret Laboratory/SCPSL_Data/../sm_plugi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.