Commit Graph

8 Commits

Author SHA1 Message Date
SkyratBot
41788d096e [MIRROR] Overhauls discord verification system (#588)
* Overhauls discord verification system (#53289)

This completely replaces the previous verification system, for one that
will interoperate with a discord redbot instance that uses the cogs
located at you github.com/optimumtact/orangescogs

This cuts out several steps in the system, but it also leaves alone the
existing notify system (which just uses a file list of discord ids) as a
record of who to notify

SQL changes required for the new database system

Version 5.10, 7 August 2020, by oranges

Changes how the discord verification process works.
Adds the discord_links table, and migrates discord id entries from
player table to the discord links table in a once off operation and then
removes the discord id on the player table

The user connects to any tg server, and uses the "Verify Discord
Account" verb, this generates a six word one time use token, with a 4
hour time validity period (defined as 4 hours from the timestamp value)
in the discord links table.

This one time token, and the ckey of the user are stored in
discord_links

At this point the entire DM side is done, this is all it does

* Overhauls discord verification system

Co-authored-by: oranges <email@oranges.net.nz>
2020-09-02 02:47:22 +02:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Jordan Brown
63e20801ed TGS chat usage cleanup
- Rename send2tgs to sent2adminchat.
- Move both chat procs to SSdiscord.dm.
- Fix bug when sending to TGS4 non-admin chats.
- Add DMdocs
- Improve notify command
  - Store mentions as strings
  - Disable command if config setting isn't enabled
2020-05-23 13:33:09 -04:00
Kyle Spier-Swenson
ab0d88048e Adds tgs command to return the person's discord userid. (#50170) 2020-03-24 08:09:35 +13:00
Bobbahbrown
fdcbc8cd83 Adds Configurable Living Time Requirement to Discord Auto Enrollment (#50052)
About The Pull Request

As requested by oranges this enforces a requirement, when configured, that a player must have a certain amount of living playtime in hours to auto-enroll into a discord role.
Why It's Good For The Game

Removes discord moderation requirement
Changelog

cl bobbahbrown
server: Discord role auto enrollment can now be configured to require a certain number of living hours.
/cl
2020-03-20 21:09:16 +13:00
oranges
eea13a21ea Improves discord roleapi system
Sends the discord id to the patch call, not the ckey

Add the verify command to readd the role to the api, with
a hacky, but effective slowdown to prevent the API being flooded easily
2020-02-27 06:47:16 +00:00
AffectedArc07
0315245729 Adds in discord auto-roling (#49374)
About The Pull Request

When a user successfully links their BYOND accounts and discord accounts, they will now be automatically roled, based on config settings.

NOTE: This does not update pre-linked accounts, but I can write an external bot to do that if needed

RUST-G has also been updated in this PR, to be inline with this PR over at RUST-G tgstation/rust-g#23

Why It's Good For The Game

People with linked accounts can now be given a specific role in the discord, which is good for verification.
Changelog

🆑 AffectedArc07
add: Linking your discord and BYOND accounts will now give you a role in the discord
/🆑
2020-02-20 22:37:14 +13:00
AffectedArc07
c4e75bc40b [READY] SSdiscord and Round Notifications (#44231)
* Notify System

* V2

* Adds a hint

* Stoned fixes round 1

* Use grammar wells I can

* This didnt work

* I wish you could test on TGS without committing

* Jordie fixes round 1

* oops

* This took way longer than it should have taken

* Adds in endnotify for serverops

* Spacing
2019-06-30 00:43:25 +10:00