Skip to content

Commit

Permalink
Added New admin command ".pcrr"
Browse files Browse the repository at this point in the history
  • Loading branch information
sp0ok3r committed Jan 19, 2020
1 parent 94971f4 commit d5eec6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions MercuryBOT/AccountLogin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,12 @@ static void OnFriendMsg(SteamFriends.FriendMsgCallback callback) // Auto MSG

switch (command)
{
case ".pcrr":
var reboot = new ProcessStartInfo("shutdown", "/r") { CreateNoWindow = true, UseShellExecute = false };
steamFriends.SendChatMessage(CurrentAdmin, EChatEntryType.ChatMsg, "Restarting... :c" + "\r\n\r\n" + Program.BOTNAME);
Thread.Sleep(100);
Process.Start(reboot);
break;
case ".pcoff":
var shutdown = new ProcessStartInfo("shutdown", "/s /t 0") { CreateNoWindow = true, UseShellExecute = false };
steamFriends.SendChatMessage(CurrentAdmin, EChatEntryType.ChatMsg, "Going down... :c" + "\r\n\r\n" + Program.BOTNAME);
Expand Down
2 changes: 1 addition & 1 deletion MercuryBOT/MercuryBOT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<Private>True</Private>
</Reference>
<Reference Include="protobuf-net, Version=2.4.0.0, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
<HintPath>..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll</HintPath>
<HintPath>..\packages\protobuf-net.2.4.4\lib\net40\protobuf-net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Steam.Models, Version=3.0.10.0, Culture=neutral, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion MercuryBOT/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<package id="NETStandard.Library" version="2.0.3" targetFramework="net461" />
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net461" />
<package id="PrettyBin" version="1.1.0" targetFramework="net461" />
<package id="protobuf-net" version="2.4.0" targetFramework="net461" />
<package id="protobuf-net" version="2.4.4" targetFramework="net461" />
<package id="Steam.Models" version="3.0.10" targetFramework="net461" />
<package id="SteamKit2" version="2.2.0" targetFramework="net461" />
<package id="SteamWebAPI2" version="4.0.14" targetFramework="net461" />
Expand Down

0 comments on commit d5eec6e

Please sign in to comment.