AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Discord] Server crash (Accelerator) (https://forums.alliedmods.net/showthread.php?t=316351)

iGANGNAM 05-18-2019 19:03

[Discord] Server crash (Accelerator)
 
4 Attachment(s)
By using custom build of Accelerator possible to have forward which allows to send Discord message about server crash.
NOTE that this version/repo/branch of accelerator is unsupported and outdated.

Currently only Linux build for Accelerator, you can compile one for Windows from Git https://github.com/GamersClub/accelerator/tree/api
Also uses https://forums.alliedmods.net/showthread.php?t=292663 (You need to add entry to discord config file of that core plugin)
ConVars
Quote:

// What nickname hook will have.
// -
// Default: "Captain Crash"
discord_accelerator_hookname "Captain Crash"

// Role ID ir User ID to mention.
// You can get Role ID or User ID by making \@User or \@Group
// If you want to mention group add & before ID
// -
// Default: ""
discord_accelerator_mention ""

// Short server name
// -
// Default: ""
discord_accelerator_servername ""

// Config key from configs/discord.cfg.
// -
// Default: "accelerator"
discord_accelerator_webhook "accelerator"

// Information text that server crashed in message.
// -
// Default: "Server crashed"
discord_accelerator_message "Server crashed"

NanoC 05-18-2019 19:47

Re: [Discord] Server crash (Accelerator)
 
Good work!

Bara 05-18-2019 19:55

Re: [Discord] Server crash (Accelerator)
 
You should add an note that this version/repo/branch of accelerator is unsupported and outdated.

CrazyHackGUT 05-19-2019 03:28

Re: [Discord] Server crash (Accelerator)
 
In core.cfg we have ability change address to Accelerator web, where all crashes will be placed. For this, Accelerator uses config key MinidumpUrl.

Code:

/**
* This file is used to set various options that are important to SourceMod's core.
* If this file is missing or an option in this file is missing, then the default values will be used.
*/
"Core"
{
    "Logging"        "on"
    // ...
    "MinidumpAccount"                "7656xxxxxxxxxxxxx"
    "MinidumpUrl"                    "https://crash.limetech.org/submit"
}

I know two peoples, who self-hosts Accelerator web for own usage in server local subnet.
But in this plugin, you hardcoded url for message in Discord - in Source Code. Maybe you should respect these users, who self-hosts Accelerator web, and get address dynamically from core.cfg?

iGANGNAM 05-19-2019 04:17

Re: [Discord] Server crash (Accelerator)
 
Quote:

Originally Posted by CrazyHackGUT (Post 2652253)
In core.cfg we have ability change address to Accelerator web, where all crashes will be placed. For this, Accelerator uses config key MinidumpUrl.

Code:

/**
* This file is used to set various options that are important to SourceMod's core.
* If this file is missing or an option in this file is missing, then the default values will be used.
*/
"Core"
{
    "Logging"        "on"
    // ...
    "MinidumpAccount"                "7656xxxxxxxxxxxxx"
    "MinidumpUrl"                    "https://crash.limetech.org/submit"
}

I know two peoples, who self-hosts Accelerator web for own usage in server local subnet.
But in this plugin, you hardcoded url for message in Discord - in Source Code. Maybe you should respect these users, who self-hosts Accelerator web, and get address dynamically from core.cfg?

Added. Also added text configuration for "Server crash" text, which means no hardcoded text in content anymore.

iGANGNAM 05-20-2019 13:53

Re: [Discord] Server crash (Accelerator)
 
Fixed mistakes I made in last version. Now it should display crash url properly.

Johnoclock 12-06-2022 02:39

Re: [Discord] Server crash (Accelerator)
 
I post a version that works with last version of Accelerator [Any] New Discord Accelerator (1.0, 2022-06-12)


All times are GMT -4. The time now is 22:25.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.