├── SteamInviteSpamFilter.exe
├── Source
├── SteamInviteSpamFilter
│ ├── sisf.ico
│ ├── Resources
│ │ ├── x-2x.png
│ │ ├── check-2x.png
│ │ └── select2-spinner.gif
│ ├── packages.config
│ ├── Program.cs
│ ├── frmAbout.cs
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Settings.Designer.cs
│ │ └── Resources.resx
│ ├── App.config
│ ├── frmAbout.designer.cs
│ ├── frmBrowser.designer.cs
│ ├── SteamInviteSpamFilter.csproj
│ ├── frmBrowser.cs
│ ├── frmMain.cs
│ └── frmMain.Designer.cs
└── SteamInviteSpamFilter.sln
├── README.md
├── .gitignore
└── LICENSE
/SteamInviteSpamFilter.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jshackles/Steam_Invite_Spam_Filter/master/SteamInviteSpamFilter.exe
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/sisf.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jshackles/Steam_Invite_Spam_Filter/master/Source/SteamInviteSpamFilter/sisf.ico
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Resources/x-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jshackles/Steam_Invite_Spam_Filter/master/Source/SteamInviteSpamFilter/Resources/x-2x.png
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Resources/check-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jshackles/Steam_Invite_Spam_Filter/master/Source/SteamInviteSpamFilter/Resources/check-2x.png
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Resources/select2-spinner.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jshackles/Steam_Invite_Spam_Filter/master/Source/SteamInviteSpamFilter/Resources/select2-spinner.gif
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Runtime.InteropServices;
5 | using System.Threading.Tasks;
6 | using System.Windows.Forms;
7 |
8 | namespace SteamInviteSpamFilter
9 | {
10 | static class Program
11 | {
12 | ///
13 | /// The main entry point for the application.
14 | ///
15 | [STAThread]
16 | static void Main()
17 | {
18 | Application.EnableVisualStyles();
19 | Application.SetCompatibleTextRenderingDefault(false);
20 | frmMain main_form = new frmMain();
21 | if (Properties.Settings.Default.startMinimized)
22 | {
23 | main_form.WindowState = FormWindowState.Minimized;
24 | main_form.ShowInTaskbar = false;
25 | }
26 | Application.Run(main_form);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 2013
4 | VisualStudioVersion = 12.0.31101.0
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SteamInviteSpamFilter", "SteamInviteSpamFilter\SteamInviteSpamFilter.csproj", "{297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmAbout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Deployment.Application;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Reflection;
9 | using System.Text;
10 | using System.Threading.Tasks;
11 | using System.Windows.Forms;
12 |
13 | namespace SteamInviteSpamFilter
14 | {
15 | public partial class frmAbout : Form
16 | {
17 | public frmAbout()
18 | {
19 | InitializeComponent();
20 | }
21 |
22 | private void btnOK_Click(object sender, EventArgs e)
23 | {
24 | this.Close();
25 | }
26 |
27 | private void frmAbout_Load(object sender, EventArgs e)
28 | {
29 | if (ApplicationDeployment.IsNetworkDeployed)
30 | {
31 | string version = ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString();
32 | lblVersion.Text = "Steam Invite Spam Filter v" + version;
33 | }
34 | else
35 | {
36 | string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
37 | lblVersion.Text = "Steam Invite Spam Filter v" + version;
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Steam Invite Spam Filter
2 | ==============
3 |
4 | This program is designed to minimize the amount of Steam community invite "spam" that many users have been experiencing. You can configure the program to either reject all invites or to reject only those invites from profiles of a certain level or lower.
5 |
6 | This application is "Early Access"! You may encounter bugs, which you can [report here](https://github.com/jshackles/Steam_Invite_Spam_Filter/issues).
7 |
8 | Installation
9 | ------------
10 |
11 | This program requires the [.NET Framework 4.5 from Microsoft](http://www.microsoft.com/en-us/download/details.aspx?id=42643).
12 |
13 | 1. Download [SteamInviteSpamFilter.exe](https://github.com/jshackles/Steam_Invite_Spam_Filter/raw/master/SteamInviteSpamFilter.exe) and store it in a safe place.
14 | 2. Run the application and sign in to Steam.
15 | 3. Configure the filter to your preferences.
16 | 4. Check "Enabled" to enable the filter.
17 | 5. Leave the program running (minimizing it will minimize to the system tray).
18 | 6. No more invite spam!
19 |
20 | License
21 | -------
22 |
23 | Steam Invite Spam Filter is Copyright 2015 Jason Shackles. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. A copy of the GNU General Public License can be found at http://www.gnu.org/licenses/.
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | False
19 |
20 |
21 | True
22 |
23 |
24 | False
25 |
26 |
27 |
28 |
29 |
30 | 0
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SteamInviteSpamFilter")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SteamInviteSpamFilter")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("760075d7-8a3b-46df-b1d9-8842cf54ddde")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("0.0.1.0")]
36 | [assembly: AssemblyFileVersion("0.0.1.0")]
37 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | False
27 |
28 |
29 | True
30 |
31 |
32 | False
33 |
34 |
35 |
36 |
37 |
38 | 0
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.sln.docstates
8 |
9 | # Build results
10 | [Dd]ebug/
11 | [Dd]ebugPublic/
12 | [Rr]elease/
13 | [Rr]eleases/
14 | x64/
15 | x86/
16 | build/
17 | bld/
18 | [Bb]in/
19 | [Oo]bj/
20 |
21 | # Roslyn cache directories
22 | *.ide/
23 |
24 | # MSTest test Results
25 | [Tt]est[Rr]esult*/
26 | [Bb]uild[Ll]og.*
27 |
28 | #NUNIT
29 | *.VisualState.xml
30 | TestResult.xml
31 |
32 | # Build Results of an ATL Project
33 | [Dd]ebugPS/
34 | [Rr]eleasePS/
35 | dlldata.c
36 |
37 | *_i.c
38 | *_p.c
39 | *_i.h
40 | *.ilk
41 | *.meta
42 | *.obj
43 | *.pch
44 | *.pdb
45 | *.pgc
46 | *.pgd
47 | *.rsp
48 | *.sbr
49 | *.tlb
50 | *.tli
51 | *.tlh
52 | *.tmp
53 | *.tmp_proj
54 | *.log
55 | *.vspscc
56 | *.vssscc
57 | .builds
58 | *.pidb
59 | *.svclog
60 | *.scc
61 |
62 | # Chutzpah Test files
63 | _Chutzpah*
64 |
65 | # Visual C++ cache files
66 | ipch/
67 | *.aps
68 | *.ncb
69 | *.opensdf
70 | *.sdf
71 | *.cachefile
72 |
73 | # Visual Studio profiler
74 | *.psess
75 | *.vsp
76 | *.vspx
77 |
78 | # TFS 2012 Local Workspace
79 | $tf/
80 |
81 | # Guidance Automation Toolkit
82 | *.gpState
83 |
84 | # ReSharper is a .NET coding add-in
85 | _ReSharper*/
86 | *.[Rr]e[Ss]harper
87 | *.DotSettings.user
88 |
89 | # JustCode is a .NET coding addin-in
90 | .JustCode
91 |
92 | # TeamCity is a build add-in
93 | _TeamCity*
94 |
95 | # DotCover is a Code Coverage Tool
96 | *.dotCover
97 |
98 | # NCrunch
99 | _NCrunch_*
100 | .*crunch*.local.xml
101 |
102 | # MightyMoose
103 | *.mm.*
104 | AutoTest.Net/
105 |
106 | # Web workbench (sass)
107 | .sass-cache/
108 |
109 | # Installshield output folder
110 | [Ee]xpress/
111 |
112 | # DocProject is a documentation generator add-in
113 | DocProject/buildhelp/
114 | DocProject/Help/*.HxT
115 | DocProject/Help/*.HxC
116 | DocProject/Help/*.hhc
117 | DocProject/Help/*.hhk
118 | DocProject/Help/*.hhp
119 | DocProject/Help/Html2
120 | DocProject/Help/html
121 |
122 | # Click-Once directory
123 | publish/
124 |
125 | # Publish Web Output
126 | *.[Pp]ublish.xml
127 | *.azurePubxml
128 | # TODO: Comment the next line if you want to checkin your web deploy settings
129 | # but database connection strings (with potential passwords) will be unencrypted
130 | *.pubxml
131 | *.publishproj
132 |
133 | # NuGet Packages
134 | *.nupkg
135 | # The packages folder can be ignored because of Package Restore
136 | **/packages/*
137 | # except build/, which is used as an MSBuild target.
138 | !**/packages/build/
139 | # If using the old MSBuild-Integrated Package Restore, uncomment this:
140 | #!**/packages/repositories.config
141 |
142 | # Windows Azure Build Output
143 | csx/
144 | *.build.csdef
145 |
146 | # Windows Store app package directory
147 | AppPackages/
148 |
149 | # Others
150 | sql/
151 | *.Cache
152 | ClientBin/
153 | [Ss]tyle[Cc]op.*
154 | ~$*
155 | *~
156 | *.dbmdl
157 | *.dbproj.schemaview
158 | *.pfx
159 | *.publishsettings
160 | node_modules/
161 |
162 | # RIA/Silverlight projects
163 | Generated_Code/
164 |
165 | # Backup & report files from converting an old project file
166 | # to a newer Visual Studio version. Backup files are not needed,
167 | # because we have git ;-)
168 | _UpgradeReport_Files/
169 | Backup*/
170 | UpgradeLog*.XML
171 | UpgradeLog*.htm
172 |
173 | # SQL Server files
174 | *.mdf
175 | *.ldf
176 |
177 | # Business Intelligence projects
178 | *.rdl.data
179 | *.bim.layout
180 | *.bim_*.settings
181 |
182 | # Microsoft Fakes
183 | FakesAssemblies/
184 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmAbout.designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamInviteSpamFilter
2 | {
3 | partial class frmAbout
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAbout));
32 | this.btnOK = new System.Windows.Forms.Button();
33 | this.lblVersion = new System.Windows.Forms.Label();
34 | this.label2 = new System.Windows.Forms.Label();
35 | this.SuspendLayout();
36 | //
37 | // btnOK
38 | //
39 | this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
40 | this.btnOK.Location = new System.Drawing.Point(192, 49);
41 | this.btnOK.Name = "btnOK";
42 | this.btnOK.Size = new System.Drawing.Size(75, 23);
43 | this.btnOK.TabIndex = 0;
44 | this.btnOK.Text = "&OK";
45 | this.btnOK.UseVisualStyleBackColor = true;
46 | this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
47 | //
48 | // lblVersion
49 | //
50 | this.lblVersion.AutoSize = true;
51 | this.lblVersion.Location = new System.Drawing.Point(12, 9);
52 | this.lblVersion.Name = "lblVersion";
53 | this.lblVersion.Size = new System.Drawing.Size(112, 13);
54 | this.lblVersion.TabIndex = 2;
55 | this.lblVersion.Text = "SteamInviteSpamFilter";
56 | //
57 | // label2
58 | //
59 | this.label2.AutoSize = true;
60 | this.label2.Location = new System.Drawing.Point(12, 23);
61 | this.label2.Name = "label2";
62 | this.label2.Size = new System.Drawing.Size(65, 13);
63 | this.label2.TabIndex = 3;
64 | this.label2.Text = "by jshackles";
65 | //
66 | // frmAbout
67 | //
68 | this.AcceptButton = this.btnOK;
69 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
70 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
71 | this.ClientSize = new System.Drawing.Size(272, 79);
72 | this.Controls.Add(this.label2);
73 | this.Controls.Add(this.lblVersion);
74 | this.Controls.Add(this.btnOK);
75 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
76 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
77 | this.MaximizeBox = false;
78 | this.Name = "frmAbout";
79 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
80 | this.Text = "About";
81 | this.Load += new System.EventHandler(this.frmAbout_Load);
82 | this.ResumeLayout(false);
83 | this.PerformLayout();
84 |
85 | }
86 |
87 | #endregion
88 |
89 | private System.Windows.Forms.Button btnOK;
90 | private System.Windows.Forms.Label lblVersion;
91 | private System.Windows.Forms.Label label2;
92 | }
93 | }
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.34209
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SteamInviteSpamFilter.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SteamInviteSpamFilter.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap imgFalse {
67 | get {
68 | object obj = ResourceManager.GetObject("imgFalse", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap imgSpin {
77 | get {
78 | object obj = ResourceManager.GetObject("imgSpin", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized resource of type System.Drawing.Bitmap.
85 | ///
86 | internal static System.Drawing.Bitmap imgTrue {
87 | get {
88 | object obj = ResourceManager.GetObject("imgTrue", resourceCulture);
89 | return ((System.Drawing.Bitmap)(obj));
90 | }
91 | }
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmBrowser.designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamInviteSpamFilter
2 | {
3 | partial class frmBrowser
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmBrowser));
33 | this.wbAuth = new System.Windows.Forms.WebBrowser();
34 | this.label1 = new System.Windows.Forms.Label();
35 | this.tmrCheck = new System.Windows.Forms.Timer(this.components);
36 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
37 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
38 | this.SuspendLayout();
39 | //
40 | // wbAuth
41 | //
42 | this.wbAuth.AllowWebBrowserDrop = false;
43 | this.wbAuth.Dock = System.Windows.Forms.DockStyle.Fill;
44 | this.wbAuth.Location = new System.Drawing.Point(0, 0);
45 | this.wbAuth.MinimumSize = new System.Drawing.Size(20, 20);
46 | this.wbAuth.Name = "wbAuth";
47 | this.wbAuth.ScriptErrorsSuppressed = true;
48 | this.wbAuth.ScrollBarsEnabled = false;
49 | this.wbAuth.Size = new System.Drawing.Size(976, 798);
50 | this.wbAuth.TabIndex = 0;
51 | this.wbAuth.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.wbAuth_DocumentCompleted);
52 | this.wbAuth.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.wbAuth_Navigating);
53 | //
54 | // label1
55 | //
56 | this.label1.AutoSize = true;
57 | this.label1.Location = new System.Drawing.Point(34, 11);
58 | this.label1.Name = "label1";
59 | this.label1.Size = new System.Drawing.Size(242, 13);
60 | this.label1.TabIndex = 1;
61 | this.label1.Text = "Steam Invite Spam Filter is saving your information";
62 | //
63 | // tmrCheck
64 | //
65 | this.tmrCheck.Interval = 1000;
66 | this.tmrCheck.Tick += new System.EventHandler(this.tmrCheck_Tick);
67 | //
68 | // pictureBox1
69 | //
70 | this.pictureBox1.Image = global::SteamInviteSpamFilter.Properties.Resources.imgSpin;
71 | this.pictureBox1.Location = new System.Drawing.Point(12, 11);
72 | this.pictureBox1.Name = "pictureBox1";
73 | this.pictureBox1.Size = new System.Drawing.Size(28, 24);
74 | this.pictureBox1.TabIndex = 1;
75 | this.pictureBox1.TabStop = false;
76 | //
77 | // frmBrowser
78 | //
79 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
80 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
81 | this.ClientSize = new System.Drawing.Size(976, 798);
82 | this.Controls.Add(this.wbAuth);
83 | this.Controls.Add(this.label1);
84 | this.Controls.Add(this.pictureBox1);
85 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
86 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
87 | this.MaximizeBox = false;
88 | this.Name = "frmBrowser";
89 | this.Text = "Please Login to Steam";
90 | this.Load += new System.EventHandler(this.frmBrowser_Load);
91 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
92 | this.ResumeLayout(false);
93 | this.PerformLayout();
94 |
95 | }
96 |
97 | #endregion
98 |
99 | private System.Windows.Forms.WebBrowser wbAuth;
100 | private System.Windows.Forms.Label label1;
101 | private System.Windows.Forms.PictureBox pictureBox1;
102 | private System.Windows.Forms.Timer tmrCheck;
103 | }
104 | }
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.34209
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace SteamInviteSpamFilter.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("")]
29 | public string sessionid {
30 | get {
31 | return ((string)(this["sessionid"]));
32 | }
33 | set {
34 | this["sessionid"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("")]
41 | public string steamLogin {
42 | get {
43 | return ((string)(this["steamLogin"]));
44 | }
45 | set {
46 | this["steamLogin"] = value;
47 | }
48 | }
49 |
50 | [global::System.Configuration.UserScopedSettingAttribute()]
51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
52 | [global::System.Configuration.DefaultSettingValueAttribute("")]
53 | public string myProfileURL {
54 | get {
55 | return ((string)(this["myProfileURL"]));
56 | }
57 | set {
58 | this["myProfileURL"] = value;
59 | }
60 | }
61 |
62 | [global::System.Configuration.UserScopedSettingAttribute()]
63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
64 | [global::System.Configuration.DefaultSettingValueAttribute("")]
65 | public string steamparental {
66 | get {
67 | return ((string)(this["steamparental"]));
68 | }
69 | set {
70 | this["steamparental"] = value;
71 | }
72 | }
73 |
74 | [global::System.Configuration.UserScopedSettingAttribute()]
75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
76 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
77 | public bool startMinimized {
78 | get {
79 | return ((bool)(this["startMinimized"]));
80 | }
81 | set {
82 | this["startMinimized"] = value;
83 | }
84 | }
85 |
86 | [global::System.Configuration.UserScopedSettingAttribute()]
87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
88 | [global::System.Configuration.DefaultSettingValueAttribute("True")]
89 | public bool updateNeeded {
90 | get {
91 | return ((bool)(this["updateNeeded"]));
92 | }
93 | set {
94 | this["updateNeeded"] = value;
95 | }
96 | }
97 |
98 | [global::System.Configuration.UserScopedSettingAttribute()]
99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
100 | [global::System.Configuration.DefaultSettingValueAttribute("False")]
101 | public bool enabled {
102 | get {
103 | return ((bool)(this["enabled"]));
104 | }
105 | set {
106 | this["enabled"] = value;
107 | }
108 | }
109 |
110 | [global::System.Configuration.UserScopedSettingAttribute()]
111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
112 | [global::System.Configuration.DefaultSettingValueAttribute("")]
113 | public string myProfileName {
114 | get {
115 | return ((string)(this["myProfileName"]));
116 | }
117 | set {
118 | this["myProfileName"] = value;
119 | }
120 | }
121 |
122 | [global::System.Configuration.UserScopedSettingAttribute()]
123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
124 | [global::System.Configuration.DefaultSettingValueAttribute("0")]
125 | public int ignoreLevel {
126 | get {
127 | return ((int)(this["ignoreLevel"]));
128 | }
129 | set {
130 | this["ignoreLevel"] = value;
131 | }
132 | }
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/SteamInviteSpamFilter.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {297A2925-DFA8-44FF-BE2D-8BD3FE604C8D}
8 | WinExe
9 | Properties
10 | SteamInviteSpamFilter
11 | SteamInviteSpamFilter
12 | v4.5.1
13 | 512
14 |
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 | SteamInviteSpamFilter.Program
37 |
38 |
39 | sisf.ico
40 |
41 |
42 |
43 | ..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Form
61 |
62 |
63 | frmAbout.cs
64 |
65 |
66 | Form
67 |
68 |
69 | frmBrowser.cs
70 |
71 |
72 | Form
73 |
74 |
75 | frmMain.cs
76 |
77 |
78 |
79 |
80 | frmAbout.cs
81 |
82 |
83 | frmBrowser.cs
84 |
85 |
86 | frmMain.cs
87 |
88 |
89 | ResXFileCodeGenerator
90 | Resources.Designer.cs
91 | Designer
92 |
93 |
94 | True
95 | Resources.resx
96 | True
97 |
98 |
99 |
100 | SettingsSingleFileGenerator
101 | Settings.Designer.cs
102 |
103 |
104 | True
105 | Settings.settings
106 | True
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
132 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\x-2x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\select2-spinner.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
128 | ..\Resources\check-2x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmBrowser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Net;
8 | using System.Text;
9 | using System.Windows.Forms;
10 | using System.Runtime.InteropServices;
11 |
12 | namespace SteamInviteSpamFilter
13 | {
14 | public partial class frmBrowser : Form
15 | {
16 |
17 | public int seconds_waiting = 30;
18 |
19 | [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
20 | private static extern bool InternetSetOption(int hInternet,int dwOption,string lpBuffer,int dwBufferLength);
21 |
22 | [DllImport("wininet.dll", CharSet = CharSet.Auto, SetLastError = true)]
23 | private static extern bool InternetSetCookie(string lpszUrlName, string lpszCookieName, string lpszCookieData);
24 |
25 | public frmBrowser()
26 | {
27 | // This initializes the components on the form
28 | InitializeComponent();
29 | }
30 |
31 | private void frmBrowser_Load(object sender, EventArgs e)
32 | {
33 | // Remove any existing session state data
34 | InternetSetOption(0, 42, null, 0);
35 |
36 | // Delete Steam cookie data from the browser control
37 | InternetSetCookie("http://steamcommunity.com", "sessionid", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
38 | InternetSetCookie("http://steamcommunity.com", "steamLogin", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
39 | InternetSetCookie("http://steamcommunity.com", "steamRememberLogin", ";expires=Mon, 01 Jan 0001 00:00:00 GMT");
40 |
41 | // When the form is loaded, navigate to the Steam login page using the web browser control
42 | wbAuth.Navigate("https://steamcommunity.com/login/home/?goto=my/profile");
43 | }
44 |
45 | // This code block executes each time a new document is loaded into the web browser control
46 | private void wbAuth_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
47 | {
48 | // Find the page header, and remove it. This gives the login form a more streamlined look.
49 | dynamic htmldoc = wbAuth.Document.DomDocument as dynamic;
50 | dynamic global_header = htmldoc.GetElementById("global_header") as dynamic;
51 | if (global_header != null)
52 | {
53 | global_header.parentNode.removeChild(global_header);
54 | }
55 |
56 | // Get the URL of the page that just finished loading
57 | string url = wbAuth.Url.AbsoluteUri;
58 |
59 | // If the page it just finished loading isn't the login page
60 | if (url != "https://steamcommunity.com/login/home/?goto=my/profile" && url != "https://store.steampowered.com//login/transfer" && url.StartsWith("javascript:") == false && url.StartsWith("about:") == false)
61 | {
62 |
63 | dynamic parental_notice = htmldoc.GetElementById("parental_notice") as dynamic;
64 | if (parental_notice != null)
65 | {
66 | // Steam family options enabled
67 | wbAuth.Show();
68 | this.Width = 1000;
69 | this.Height = 350;
70 | return;
71 | }
72 |
73 | // Get a list of cookies from the current page
74 | CookieContainer container = GetUriCookieContainer(wbAuth.Url);
75 | var cookies = container.GetCookies(wbAuth.Url);
76 |
77 | // Go through the cookie data so that we can extract the cookies we are looking for
78 | foreach (Cookie cookie in cookies)
79 | {
80 | // Save the "sessionid" cookie
81 | if (cookie.Name == "sessionid")
82 | {
83 | Properties.Settings.Default.sessionid = cookie.Value;
84 | }
85 |
86 | // Save the "steamLogin" cookie and construct and save the user's profile link
87 | else if (cookie.Name == "steamLogin")
88 | {
89 | Properties.Settings.Default.steamLogin = cookie.Value;
90 | Properties.Settings.Default.myProfileURL = "http://steamcommunity.com/profiles/" + cookie.Value.Substring(0,17);
91 | }
92 |
93 | // Save the "steamparental" cookie"
94 | else if (cookie.Name == "steamparental")
95 | {
96 | Properties.Settings.Default.steamparental = cookie.Value;
97 | }
98 | }
99 |
100 | String profile_name = url.Replace("http://steamcommunity.com/id/", "");
101 | profile_name = profile_name.Replace("/profile", "");
102 | profile_name = profile_name.Replace("/", "");
103 |
104 | Properties.Settings.Default.myProfileName = profile_name;
105 |
106 | // Save all of the data to the program settings file, and close this form
107 | Properties.Settings.Default.Save();
108 | this.Close();
109 | }
110 | }
111 |
112 | // Imports the InternetGetCookieEx function from wininet.dll which allows the application to access the cookie data from the web browser control
113 | // Reference: http://stackoverflow.com/questions/3382498/is-it-possible-to-transfer-authentication-from-webbrowser-to-webrequest
114 | [DllImport("wininet.dll", SetLastError = true)]
115 | public static extern bool InternetGetCookieEx(
116 | string url,
117 | string cookieName,
118 | StringBuilder cookieData,
119 | ref int size,
120 | Int32 dwFlags,
121 | IntPtr lpReserved);
122 |
123 | // Assigns the hex value for the DLL flag that allows Idle Master to be able to access cookie data marked as "HTTP Only"
124 | private const Int32 InternetCookieHttponly = 0x2000;
125 |
126 | // This function returns cookie data based on a uniform resource identifier
127 | public static CookieContainer GetUriCookieContainer(Uri uri)
128 | {
129 | // First, create a null cookie container
130 | CookieContainer cookies = null;
131 |
132 | // Determine the size of the cookie
133 | int datasize = 8192 * 16;
134 | StringBuilder cookieData = new StringBuilder(datasize);
135 |
136 | // Call InternetGetCookieEx from wininet.dll
137 | if (!InternetGetCookieEx(uri.ToString(), null, cookieData, ref datasize, InternetCookieHttponly, IntPtr.Zero))
138 | {
139 | if (datasize < 0)
140 | return null;
141 | // Allocate stringbuilder large enough to hold the cookie
142 | cookieData = new StringBuilder(datasize);
143 | if (!InternetGetCookieEx(
144 | uri.ToString(),
145 | null, cookieData,
146 | ref datasize,
147 | InternetCookieHttponly,
148 | IntPtr.Zero))
149 | return null;
150 | }
151 |
152 | // If the cookie contains data, add it to the cookie container
153 | if (cookieData.Length > 0)
154 | {
155 | cookies = new CookieContainer();
156 | cookies.SetCookies(uri, cookieData.ToString().Replace(';', ','));
157 | }
158 |
159 | // Return the cookie container
160 | return cookies;
161 | }
162 |
163 | // This code executes each time the web browser control is in the process of navigating
164 | private void wbAuth_Navigating(object sender, WebBrowserNavigatingEventArgs e)
165 | {
166 | // Get the url that's being navigated to
167 | String url = e.Url.AbsoluteUri;
168 |
169 | // Check to see if the page it's navigating to isn't the Steam login page or related calls
170 | if (url != "https://steamcommunity.com/login/home/?goto=my/profile" && url != "https://store.steampowered.com//login/transfer" && url.StartsWith("javascript:") == false && url.StartsWith("about:") == false)
171 | {
172 | // start the sanity check timer
173 | tmrCheck.Enabled = true;
174 |
175 | // If it's navigating to a page other than the Steam login page, hide the browser control and resize the form
176 | wbAuth.Visible = false;
177 |
178 | // Scale the form based on the user's DPI settings
179 | Graphics graphics = this.CreateGraphics();
180 | double scaleY = graphics.DpiY * 0.84375;
181 | double scaleX = graphics.DpiX * 3.1;
182 | this.Height = Convert.ToInt32(scaleY);
183 | this.Width = Convert.ToInt32(scaleX);
184 | }
185 | }
186 |
187 | private void tmrCheck_Tick(object sender, EventArgs e)
188 | {
189 | // Prevents the application from "saving" for more than 30 seconds and will close the form after that time
190 | if (seconds_waiting > 0)
191 | {
192 | seconds_waiting = seconds_waiting - 1;
193 | }
194 | else
195 | {
196 | this.Close();
197 | }
198 | }
199 | }
200 | }
201 |
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmMain.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Diagnostics;
6 | using System.Drawing;
7 | using System.IO;
8 | using System.Linq;
9 | using System.Net;
10 | using System.Net.Http;
11 | using System.Net.Http.Headers;
12 | using System.Text;
13 | using System.Text.RegularExpressions;
14 | using System.Threading.Tasks;
15 | using System.Windows.Forms;
16 |
17 | using HtmlAgilityPack;
18 |
19 | namespace SteamInviteSpamFilter
20 | {
21 | public partial class frmMain : Form
22 | {
23 | public Boolean cookieReady = false;
24 | public int invitesIgnored = 0;
25 |
26 | public CookieContainer generateCookies()
27 | {
28 | CookieContainer cookies = new CookieContainer();
29 | Uri target = new Uri("http://steamcommunity.com");
30 | cookies.Add(new Cookie("sessionid", Properties.Settings.Default.sessionid) { Domain = target.Host });
31 | cookies.Add(new Cookie("steamLogin", Properties.Settings.Default.steamLogin) { Domain = target.Host });
32 | cookies.Add(new Cookie("steamparental", Properties.Settings.Default.steamparental) { Domain = target.Host });
33 | return cookies;
34 | }
35 |
36 | public async Task GetHttpAsync(String url, CookieContainer cookies)
37 | {
38 | String content = "";
39 | try
40 | {
41 | HttpWebRequest r = (HttpWebRequest)WebRequest.Create(url);
42 | r.Method = "GET";
43 | r.CookieContainer = cookies;
44 | HttpWebResponse res = (HttpWebResponse)await r.GetResponseAsync();
45 | if (res != null)
46 | {
47 | if (res.StatusCode == HttpStatusCode.OK)
48 | {
49 | Stream stream = res.GetResponseStream();
50 | using (StreamReader reader = new StreamReader(stream))
51 | {
52 | content = reader.ReadToEnd();
53 | }
54 | }
55 | }
56 | }
57 | catch (Exception)
58 | {
59 | }
60 | return content;
61 | }
62 |
63 | public async Task IgnoreInvite(string user_id)
64 | {
65 | CookieContainer cookieContainer = new CookieContainer();
66 | cookieContainer = generateCookies();
67 | using (HttpClientHandler handler = new HttpClientHandler() { CookieContainer = cookieContainer })
68 | using (HttpClient client = new HttpClient(handler))
69 | {
70 | client.DefaultRequestHeaders.Accept.Clear();
71 | client.DefaultRequestHeaders.Host = "steamcommunity.com";
72 | client.DefaultRequestHeaders.Add("Origin", "http://steamcommunity.com");
73 | client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.89 Safari/537.36");
74 | client.DefaultRequestHeaders.Add("Connection", "keep-alive");
75 | client.DefaultRequestHeaders.Add("Referer", "http://steamcommunity.com/id/" + Properties.Settings.Default.myProfileName + "/home/invites/");
76 |
77 | var content = new FormUrlEncodedContent(new[]
78 | {
79 | new KeyValuePair("json", "1"),
80 | new KeyValuePair("xml", "1"),
81 | new KeyValuePair("action", "approvePending"),
82 | new KeyValuePair("itype", "friend"),
83 | new KeyValuePair("perform", "ignore"),
84 | new KeyValuePair("id", user_id),
85 | new KeyValuePair("sessionID", Properties.Settings.Default.sessionid)
86 | });
87 |
88 | HttpResponseMessage response = await client.PostAsync("http://steamcommunity.com/id/" + Properties.Settings.Default.myProfileName + "/home_process", content);
89 | var responseString = await response.Content.ReadAsStringAsync();
90 |
91 | Regex regex = new Regex("success\":1");
92 |
93 | if (regex.IsMatch(responseString))
94 | {
95 | invitesIgnored = invitesIgnored + 1;
96 | tsInviteBlockedCount.Visible = true;
97 | tsInviteBlockedCount.Text = "(" + invitesIgnored.ToString() + " invites ignored)";
98 | }
99 | }
100 | }
101 |
102 | public async Task GetInvites()
103 | {
104 | CookieContainer cookies = generateCookies();
105 | string response = await GetHttpAsync(Properties.Settings.Default.myProfileURL + "/home/invites", cookies);
106 | HtmlAgilityPack.HtmlDocument document = new HtmlAgilityPack.HtmlDocument();
107 | document.LoadHtml(response);
108 | HtmlNodeCollection user_avatar = document.DocumentNode.SelectNodes("//div[contains(@class,'user_avatar')]");
109 | try
110 | {
111 | int Count = user_avatar.Count;
112 | }
113 | catch (Exception)
114 | {
115 | // Invalid cookie data
116 | cookieReady = false;
117 | lnkResetCookies_LinkClicked(null, null);
118 | return;
119 | }
120 | try
121 | {
122 | foreach (HtmlNode invite in document.DocumentNode.SelectNodes("//div[contains(@class,'invite_row')]"))
123 | {
124 | string user_name = "";
125 | string user_profile_name = "";
126 | string user_profile_id = "";
127 | int user_level = 0;
128 | HtmlNodeCollection user_name_data = invite.SelectNodes(".//a[contains(@class, 'linkTitle')]");
129 | if (user_name_data != null)
130 | {
131 | foreach (HtmlNode data in user_name_data)
132 | {
133 | if (data != null)
134 | {
135 | user_name = data.InnerHtml;
136 | user_profile_name = data.GetAttributeValue("href", "not_found").ToString();
137 | user_profile_name = user_profile_name.Replace("http://steamcommunity.com/id/", "");
138 | user_profile_name = user_profile_name.Replace("http://steamcommunity.com/profiles/", "");
139 | }
140 | }
141 | }
142 | HtmlNodeCollection user_level_data = invite.SelectNodes(".//span[contains(@class, 'friendPlayerLevelNum')]");
143 | if (user_level_data != null)
144 | {
145 | foreach (HtmlNode data in user_level_data)
146 | {
147 | if (data != null)
148 | {
149 | user_level = Convert.ToInt16(data.InnerHtml);
150 | }
151 | }
152 | }
153 | HtmlNodeCollection user_id_data = invite.SelectNodes(".//div[contains(@class, 'acceptDeclineBlock')]");
154 | if (user_id_data != null)
155 | {
156 | foreach (HtmlNode data in user_id_data)
157 | {
158 | if (data != null)
159 | {
160 | user_profile_id = Regex.Match(data.InnerHtml, @"javascript:FriendAccept\( \'(\d.+)\', \'accept\'").Groups[1].Value;
161 | }
162 | }
163 | }
164 |
165 | if (radIgnoreLevel.Checked)
166 | {
167 | if (user_level <= numLevel.Value)
168 | {
169 | await IgnoreInvite(user_profile_id);
170 | }
171 | }
172 |
173 | if (radIgnoreAll.Checked)
174 | {
175 | await IgnoreInvite(user_profile_id);
176 | }
177 |
178 | }
179 |
180 | }
181 | catch (Exception)
182 | {
183 |
184 | }
185 | }
186 |
187 | public frmMain()
188 | {
189 | InitializeComponent();
190 | }
191 |
192 | private void lnkSignIn_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
193 | {
194 | frmBrowser frm = new frmBrowser();
195 | frm.ShowDialog();
196 | }
197 |
198 | private void lnkResetCookies_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
199 | {
200 | // Clear the settings
201 | Properties.Settings.Default.sessionid = "";
202 | Properties.Settings.Default.steamLogin = "";
203 | Properties.Settings.Default.myProfileURL = "";
204 | Properties.Settings.Default.steamparental = "";
205 | Properties.Settings.Default.Save();
206 |
207 | // Set timer intervals
208 | tmrCheckCookieData.Interval = 500;
209 |
210 | // Set cookieReady to false
211 | cookieReady = false;
212 |
213 | // Re-enable tmrReadyToGo
214 | tmrCheckInvites.Interval = 100;
215 | tmrCheckInvites.Enabled = true;
216 | }
217 |
218 | private void tmrCheckCookieData_Tick(object sender, EventArgs e)
219 | {
220 | if (Properties.Settings.Default.sessionid != "" && Properties.Settings.Default.steamLogin != "")
221 | {
222 | lblCookieStatus.Text = "Steam Invite Spam Filter is connected to Steam";
223 | lblCookieStatus.ForeColor = System.Drawing.Color.Green;
224 | picCookieStatus.Image = Properties.Resources.imgTrue;
225 | lnkSignIn.Visible = false;
226 | lnkResetCookies.Visible = true;
227 | cookieReady = true;
228 | chkEnable.Enabled = true;
229 | }
230 | else
231 | {
232 | lblCookieStatus.Text = "Steam Invite Spam Filter is not connected to Steam";
233 | lblCookieStatus.ForeColor = System.Drawing.Color.Black;
234 | picCookieStatus.Image = Properties.Resources.imgFalse;
235 | lnkSignIn.Visible = true;
236 | lnkResetCookies.Visible = false;
237 | cookieReady = false;
238 | chkEnable.Enabled = false;
239 | }
240 | }
241 |
242 | private async void tmrCheckInvites_Tick(object sender, EventArgs e)
243 | {
244 | if (cookieReady && chkEnable.Checked)
245 | {
246 | // Set the program status
247 | tsStatusText.Text = "Filter running";
248 | tsStatusText.Image = Properties.Resources.imgTrue;
249 |
250 | // Reset the timer interval
251 | tmrCheckInvites.Interval = 15000;
252 |
253 | // Call the GetInvites() function asynchronously
254 | await GetInvites();
255 | }
256 | else
257 | {
258 | tsStatusText.Text = "Filter not running";
259 | tsStatusText.Image = Properties.Resources.imgFalse;
260 | }
261 | }
262 |
263 | private void frmMain_Load(object sender, EventArgs e)
264 | {
265 | if (Properties.Settings.Default.startMinimized)
266 | {
267 | startMinimizedToolStripMenuItem.Image = Properties.Resources.imgTrue;
268 | }
269 |
270 | if (Properties.Settings.Default.enabled)
271 | {
272 | chkEnable.Checked = true;
273 | }
274 | else
275 | {
276 | chkEnable.Checked = false;
277 | }
278 | numLevel.Value = Properties.Settings.Default.ignoreLevel;
279 | }
280 |
281 | private void chkEnable_CheckedChanged(object sender, EventArgs e)
282 | {
283 | if (chkEnable.Checked)
284 | {
285 | Properties.Settings.Default.enabled = true;
286 | }
287 | else
288 | {
289 | Properties.Settings.Default.enabled = false;
290 | }
291 | Properties.Settings.Default.Save();
292 | tmrCheckInvites.Interval = 100;
293 | }
294 |
295 | private void exitToolStripMenuItem_Click(object sender, EventArgs e)
296 | {
297 | this.Close();
298 | }
299 |
300 | private void numLevel_ValueChanged(object sender, EventArgs e)
301 | {
302 | Properties.Settings.Default.ignoreLevel = Convert.ToInt16(numLevel.Value);
303 | Properties.Settings.Default.Save();
304 | }
305 |
306 | private void frmMain_Resize(object sender, EventArgs e)
307 | {
308 | if (this.WindowState == FormWindowState.Minimized)
309 | {
310 | this.Hide();
311 | }
312 | }
313 |
314 | private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
315 | {
316 | this.Show();
317 | this.WindowState = FormWindowState.Normal;
318 | }
319 |
320 | private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
321 | {
322 | frmAbout form = new frmAbout();
323 | form.Show();
324 | }
325 |
326 | private void startMinimizedToolStripMenuItem_Click(object sender, EventArgs e)
327 | {
328 | if (Properties.Settings.Default.startMinimized)
329 | {
330 | Properties.Settings.Default.startMinimized = false;
331 | startMinimizedToolStripMenuItem.Image = Properties.Resources.imgFalse;
332 | }
333 | else
334 | {
335 | Properties.Settings.Default.startMinimized = true;
336 | startMinimizedToolStripMenuItem.Image = Properties.Resources.imgTrue;
337 | }
338 | Properties.Settings.Default.Save();
339 | }
340 | }
341 | }
--------------------------------------------------------------------------------
/Source/SteamInviteSpamFilter/frmMain.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SteamInviteSpamFilter
2 | {
3 | partial class frmMain
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
33 | this.lnkSignIn = new System.Windows.Forms.LinkLabel();
34 | this.lnkResetCookies = new System.Windows.Forms.LinkLabel();
35 | this.lblCookieStatus = new System.Windows.Forms.Label();
36 | this.tmrCheckCookieData = new System.Windows.Forms.Timer(this.components);
37 | this.tmrCheckInvites = new System.Windows.Forms.Timer(this.components);
38 | this.radIgnoreLevel = new System.Windows.Forms.RadioButton();
39 | this.radIgnoreAll = new System.Windows.Forms.RadioButton();
40 | this.numLevel = new System.Windows.Forms.NumericUpDown();
41 | this.chkEnable = new System.Windows.Forms.CheckBox();
42 | this.ssFooter = new System.Windows.Forms.StatusStrip();
43 | this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
44 | this.tsInviteBlockedCount = new System.Windows.Forms.ToolStripStatusLabel();
45 | this.menuStrip1 = new System.Windows.Forms.MenuStrip();
46 | this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
47 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
48 | this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
49 | this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
50 | this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
51 | this.tsStatusText = new System.Windows.Forms.ToolStripStatusLabel();
52 | this.picCookieStatus = new System.Windows.Forms.PictureBox();
53 | this.startMinimizedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
54 | this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
55 | ((System.ComponentModel.ISupportInitialize)(this.numLevel)).BeginInit();
56 | this.ssFooter.SuspendLayout();
57 | this.menuStrip1.SuspendLayout();
58 | ((System.ComponentModel.ISupportInitialize)(this.picCookieStatus)).BeginInit();
59 | this.SuspendLayout();
60 | //
61 | // lnkSignIn
62 | //
63 | this.lnkSignIn.AutoSize = true;
64 | this.lnkSignIn.Location = new System.Drawing.Point(278, 33);
65 | this.lnkSignIn.Name = "lnkSignIn";
66 | this.lnkSignIn.Size = new System.Drawing.Size(45, 13);
67 | this.lnkSignIn.TabIndex = 8;
68 | this.lnkSignIn.TabStop = true;
69 | this.lnkSignIn.Text = "(Sign in)";
70 | this.lnkSignIn.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkSignIn_LinkClicked);
71 | //
72 | // lnkResetCookies
73 | //
74 | this.lnkResetCookies.AutoSize = true;
75 | this.lnkResetCookies.Location = new System.Drawing.Point(256, 33);
76 | this.lnkResetCookies.Name = "lnkResetCookies";
77 | this.lnkResetCookies.Size = new System.Drawing.Size(52, 13);
78 | this.lnkResetCookies.TabIndex = 7;
79 | this.lnkResetCookies.TabStop = true;
80 | this.lnkResetCookies.Text = "(Sign out)";
81 | this.lnkResetCookies.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lnkResetCookies_LinkClicked);
82 | //
83 | // lblCookieStatus
84 | //
85 | this.lblCookieStatus.AutoSize = true;
86 | this.lblCookieStatus.Location = new System.Drawing.Point(30, 34);
87 | this.lblCookieStatus.Name = "lblCookieStatus";
88 | this.lblCookieStatus.Size = new System.Drawing.Size(248, 13);
89 | this.lblCookieStatus.TabIndex = 6;
90 | this.lblCookieStatus.Text = "Steam Invite Spam Filter is not connected to Steam";
91 | //
92 | // tmrCheckCookieData
93 | //
94 | this.tmrCheckCookieData.Enabled = true;
95 | this.tmrCheckCookieData.Tick += new System.EventHandler(this.tmrCheckCookieData_Tick);
96 | //
97 | // tmrCheckInvites
98 | //
99 | this.tmrCheckInvites.Enabled = true;
100 | this.tmrCheckInvites.Tick += new System.EventHandler(this.tmrCheckInvites_Tick);
101 | //
102 | // radIgnoreLevel
103 | //
104 | this.radIgnoreLevel.AutoSize = true;
105 | this.radIgnoreLevel.Checked = true;
106 | this.radIgnoreLevel.Location = new System.Drawing.Point(15, 88);
107 | this.radIgnoreLevel.Name = "radIgnoreLevel";
108 | this.radIgnoreLevel.Size = new System.Drawing.Size(240, 17);
109 | this.radIgnoreLevel.TabIndex = 10;
110 | this.radIgnoreLevel.TabStop = true;
111 | this.radIgnoreLevel.Text = "Ignore invites from users at or lower than level";
112 | this.radIgnoreLevel.UseVisualStyleBackColor = true;
113 | //
114 | // radIgnoreAll
115 | //
116 | this.radIgnoreAll.AutoSize = true;
117 | this.radIgnoreAll.Location = new System.Drawing.Point(15, 112);
118 | this.radIgnoreAll.Name = "radIgnoreAll";
119 | this.radIgnoreAll.Size = new System.Drawing.Size(101, 17);
120 | this.radIgnoreAll.TabIndex = 11;
121 | this.radIgnoreAll.Text = "Ignore all invites";
122 | this.radIgnoreAll.UseVisualStyleBackColor = true;
123 | //
124 | // numLevel
125 | //
126 | this.numLevel.Location = new System.Drawing.Point(255, 88);
127 | this.numLevel.Maximum = new decimal(new int[] {
128 | 999,
129 | 0,
130 | 0,
131 | 0});
132 | this.numLevel.Name = "numLevel";
133 | this.numLevel.Size = new System.Drawing.Size(59, 20);
134 | this.numLevel.TabIndex = 12;
135 | this.numLevel.ValueChanged += new System.EventHandler(this.numLevel_ValueChanged);
136 | //
137 | // chkEnable
138 | //
139 | this.chkEnable.AutoSize = true;
140 | this.chkEnable.Enabled = false;
141 | this.chkEnable.Location = new System.Drawing.Point(15, 56);
142 | this.chkEnable.Name = "chkEnable";
143 | this.chkEnable.Size = new System.Drawing.Size(65, 17);
144 | this.chkEnable.TabIndex = 13;
145 | this.chkEnable.Text = "Enabled";
146 | this.chkEnable.UseVisualStyleBackColor = true;
147 | this.chkEnable.CheckedChanged += new System.EventHandler(this.chkEnable_CheckedChanged);
148 | //
149 | // ssFooter
150 | //
151 | this.ssFooter.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
152 | this.toolStripStatusLabel1,
153 | this.tsStatusText,
154 | this.tsInviteBlockedCount});
155 | this.ssFooter.Location = new System.Drawing.Point(0, 153);
156 | this.ssFooter.Name = "ssFooter";
157 | this.ssFooter.Size = new System.Drawing.Size(363, 22);
158 | this.ssFooter.TabIndex = 14;
159 | this.ssFooter.Text = "statusStrip1";
160 | //
161 | // toolStripStatusLabel1
162 | //
163 | this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
164 | this.toolStripStatusLabel1.Size = new System.Drawing.Size(13, 17);
165 | this.toolStripStatusLabel1.Text = " ";
166 | //
167 | // tsInviteBlockedCount
168 | //
169 | this.tsInviteBlockedCount.Name = "tsInviteBlockedCount";
170 | this.tsInviteBlockedCount.Size = new System.Drawing.Size(15, 17);
171 | this.tsInviteBlockedCount.Text = "()";
172 | this.tsInviteBlockedCount.Visible = false;
173 | //
174 | // menuStrip1
175 | //
176 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
177 | this.fileToolStripMenuItem,
178 | this.helpToolStripMenuItem});
179 | this.menuStrip1.Location = new System.Drawing.Point(0, 0);
180 | this.menuStrip1.Name = "menuStrip1";
181 | this.menuStrip1.Size = new System.Drawing.Size(363, 24);
182 | this.menuStrip1.TabIndex = 15;
183 | this.menuStrip1.Text = "menuStrip1";
184 | //
185 | // fileToolStripMenuItem
186 | //
187 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
188 | this.startMinimizedToolStripMenuItem,
189 | this.toolStripMenuItem1,
190 | this.exitToolStripMenuItem});
191 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
192 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
193 | this.fileToolStripMenuItem.Text = "&File";
194 | //
195 | // exitToolStripMenuItem
196 | //
197 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
198 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
199 | this.exitToolStripMenuItem.Text = "E&xit";
200 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
201 | //
202 | // notifyIcon1
203 | //
204 | this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
205 | this.notifyIcon1.Text = "Steam Invite Spam Filter";
206 | this.notifyIcon1.Visible = true;
207 | this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
208 | //
209 | // helpToolStripMenuItem
210 | //
211 | this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
212 | this.aboutToolStripMenuItem});
213 | this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
214 | this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
215 | this.helpToolStripMenuItem.Text = "&Help";
216 | //
217 | // aboutToolStripMenuItem
218 | //
219 | this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
220 | this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
221 | this.aboutToolStripMenuItem.Text = "&About";
222 | this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
223 | //
224 | // tsStatusText
225 | //
226 | this.tsStatusText.Image = global::SteamInviteSpamFilter.Properties.Resources.imgFalse;
227 | this.tsStatusText.Name = "tsStatusText";
228 | this.tsStatusText.Size = new System.Drawing.Size(115, 16);
229 | this.tsStatusText.Text = "Filter not running";
230 | //
231 | // picCookieStatus
232 | //
233 | this.picCookieStatus.Location = new System.Drawing.Point(15, 33);
234 | this.picCookieStatus.Name = "picCookieStatus";
235 | this.picCookieStatus.Size = new System.Drawing.Size(15, 16);
236 | this.picCookieStatus.TabIndex = 9;
237 | this.picCookieStatus.TabStop = false;
238 | //
239 | // startMinimizedToolStripMenuItem
240 | //
241 | this.startMinimizedToolStripMenuItem.Image = global::SteamInviteSpamFilter.Properties.Resources.imgFalse;
242 | this.startMinimizedToolStripMenuItem.Name = "startMinimizedToolStripMenuItem";
243 | this.startMinimizedToolStripMenuItem.Size = new System.Drawing.Size(157, 22);
244 | this.startMinimizedToolStripMenuItem.Text = "&Start Minimized";
245 | this.startMinimizedToolStripMenuItem.Click += new System.EventHandler(this.startMinimizedToolStripMenuItem_Click);
246 | //
247 | // toolStripMenuItem1
248 | //
249 | this.toolStripMenuItem1.Name = "toolStripMenuItem1";
250 | this.toolStripMenuItem1.Size = new System.Drawing.Size(154, 6);
251 | //
252 | // frmMain
253 | //
254 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
255 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
256 | this.ClientSize = new System.Drawing.Size(363, 175);
257 | this.Controls.Add(this.ssFooter);
258 | this.Controls.Add(this.menuStrip1);
259 | this.Controls.Add(this.chkEnable);
260 | this.Controls.Add(this.numLevel);
261 | this.Controls.Add(this.radIgnoreAll);
262 | this.Controls.Add(this.radIgnoreLevel);
263 | this.Controls.Add(this.picCookieStatus);
264 | this.Controls.Add(this.lnkSignIn);
265 | this.Controls.Add(this.lnkResetCookies);
266 | this.Controls.Add(this.lblCookieStatus);
267 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
268 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
269 | this.MaximizeBox = false;
270 | this.Name = "frmMain";
271 | this.Text = "Steam Invite Spam Filter";
272 | this.Load += new System.EventHandler(this.frmMain_Load);
273 | this.Resize += new System.EventHandler(this.frmMain_Resize);
274 | ((System.ComponentModel.ISupportInitialize)(this.numLevel)).EndInit();
275 | this.ssFooter.ResumeLayout(false);
276 | this.ssFooter.PerformLayout();
277 | this.menuStrip1.ResumeLayout(false);
278 | this.menuStrip1.PerformLayout();
279 | ((System.ComponentModel.ISupportInitialize)(this.picCookieStatus)).EndInit();
280 | this.ResumeLayout(false);
281 | this.PerformLayout();
282 |
283 | }
284 |
285 | #endregion
286 |
287 | private System.Windows.Forms.LinkLabel lnkSignIn;
288 | private System.Windows.Forms.LinkLabel lnkResetCookies;
289 | private System.Windows.Forms.Label lblCookieStatus;
290 | private System.Windows.Forms.Timer tmrCheckCookieData;
291 | private System.Windows.Forms.Timer tmrCheckInvites;
292 | private System.Windows.Forms.PictureBox picCookieStatus;
293 | private System.Windows.Forms.RadioButton radIgnoreLevel;
294 | private System.Windows.Forms.RadioButton radIgnoreAll;
295 | private System.Windows.Forms.NumericUpDown numLevel;
296 | private System.Windows.Forms.CheckBox chkEnable;
297 | private System.Windows.Forms.StatusStrip ssFooter;
298 | private System.Windows.Forms.ToolStripStatusLabel tsStatusText;
299 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
300 | private System.Windows.Forms.MenuStrip menuStrip1;
301 | private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
302 | private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
303 | private System.Windows.Forms.ToolStripStatusLabel tsInviteBlockedCount;
304 | private System.Windows.Forms.NotifyIcon notifyIcon1;
305 | private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;
306 | private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
307 | private System.Windows.Forms.ToolStripMenuItem startMinimizedToolStripMenuItem;
308 | private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
309 |
310 | }
311 | }
312 |
313 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
341 |
--------------------------------------------------------------------------------