Skip to content

Instantly share code, notes, and snippets.

@TheEagleByte
TheEagleByte / Rcon Module.cs
Created April 27, 2019 16:13
Rcon Module for Discord.NET using an implementation of Battle.NET
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using ALRP.BattleNET;
using ALRP.DiscordBot.Models;
using Discord;
using Discord.Commands;
@TheEagleByte
TheEagleByte / TicketModule.cs
Created April 26, 2019 18:20
Discord.NET Ticket Module
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Discord;
using Discord.Commands;
namespace DiscordBot.Modules
{
[Name("Tickets")]
@TheEagleByte
TheEagleByte / admincheck.ps
Created September 21, 2017 13:13
Administrator Check on Powershell
#
# Check if Running as Administrator
#
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
throw "ERROR: Run as Administrator."
}
@echo off
COLOR 0B
TITLE Arma 3 Server Auto Restarter
SETLOCAL EnableExtensions enabledelayedexpansion
set EXE=arma3server_x64.exe
set /A restartCounter=0
rem Change this to the amount of Minutes you want the server to restart each time.
Set minutesToRestart=240