Skip to content

Commit

Permalink
Discord header
Browse files Browse the repository at this point in the history
  • Loading branch information
MeTonaTOR committed Jun 2, 2019
1 parent aa2a06b commit 43f59fc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 43 deletions.
3 changes: 1 addition & 2 deletions GameLauncher/App/Classes/Self.cs
Expand Up @@ -33,8 +33,7 @@ class Self {
public static Boolean sendRequest = true;

public static string rememberjson = "";

public static string DiscordID = String.Empty;
public static string discordid = String.Empty;

public static void runAsAdmin() {
string[] args = Environment.GetCommandLineArgs();
Expand Down
22 changes: 2 additions & 20 deletions GameLauncher/App/Classes/WebRequest.cs
Expand Up @@ -10,9 +10,7 @@
using GameLauncher.HashPassword;

namespace GameLauncherReborn {
public class WebClientWithTimeout : WebClient
{
private Panel panel1;
public class WebClientWithTimeout : WebClient {
private static string GameLauncherHash = string.Empty;
public static string Value() {
if (string.IsNullOrEmpty(GameLauncherHash)) {
Expand All @@ -28,26 +26,10 @@ public class WebClientWithTimeout : WebClient
request.Headers["X-HWID"] = Security.FingerPrint.Value();
request.Headers["X-UserAgent"] = "GameLauncherReborn "+Application.ProductVersion+ " WinForms (+https://github.com/worldunitedgg/GameLauncher_NFSW)";
request.Headers["X-GameLauncherHash"] = Value();
request.Headers["X-DiscordID"] = Self.DiscordID;
request.Headers["X-DiscordID"] = Self.discordid;
request.Timeout = 30000;

return request;
}

private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebClientWithTimeout));
this.panel1 = new System.Windows.Forms.Panel();
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Name = "panel1";
//
// WebClientWithTimeout
//
this.Headers = ((System.Net.WebHeaderCollection)(resources.GetObject("$this.Headers")));

}
}
}
20 changes: 0 additions & 20 deletions GameLauncher/App/Classes/WebRequest.resx
Expand Up @@ -117,26 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="panel1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>200, 100</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down
2 changes: 1 addition & 1 deletion GameLauncher/App/MainScreen.cs
Expand Up @@ -156,7 +156,7 @@ private void moveWindow_MouseMove(object sender, MouseEventArgs e)
discordRpcClient.OnReady += (sender, e) =>
{
Log.Debug("Discord ready. Detected user: " + e.User.Username + ". Discord version: " + e.Version);
Self.DiscordID = e.User.ID.ToString();
Self.discordid = e.User.ID.ToString();
};

discordRpcClient.OnError += (sender, e) =>
Expand Down

0 comments on commit 43f59fc

Please sign in to comment.