summarylogtreecommitdiffstats
path: root/remove_privileged_actions.patch
blob: 51451ea76836df1b3803fcfe09038e4c25dc1c0a (plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
diff -Naur LazyMan.orig/src/lazyman/MainGUI.java LazyMan/src/lazyman/MainGUI.java
--- LazyMan.orig/src/lazyman/MainGUI.java	2018-02-26 23:52:09.766736453 -0500
+++ LazyMan/src/lazyman/MainGUI.java	2018-02-26 23:56:38.356799279 -0500
@@ -66,9 +66,6 @@
             leagues[i].getDateTF().setDate(Time.getPSTDate1("MMM dd, yyyy"));
             leagues[i].setFavoriteTeam(Props.getFavTeam(leagues[i].getName()));
         }
-        if (System.getProperty("os.name").toLowerCase().contains("win")) {
-            changePasswordMI.setVisible(false);
-        }
         /*else if (System.getProperty("os.name").toLowerCase().contains("mac")) {
             com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
             application.addPreferencesMenuItem();
@@ -151,12 +148,12 @@
         restartCB = new javax.swing.JCheckBox();
         jMenuBar1 = new javax.swing.JMenuBar();
         jMenu1 = new javax.swing.JMenu();
-        changePasswordMI = new javax.swing.JMenuItem();
+        //changePasswordMI = new javax.swing.JMenuItem();
         exitMI = new javax.swing.JMenuItem();
         jMenu2 = new javax.swing.JMenu();
         preferencesMI = new javax.swing.JMenuItem();
-        jMenuItem1 = new javax.swing.JMenuItem();
-        jMenuItem2 = new javax.swing.JMenuItem();
+        //jMenuItem1 = new javax.swing.JMenuItem();
+        //jMenuItem2 = new javax.swing.JMenuItem();
         jMenu3 = new javax.swing.JMenu();
         guidesMI = new javax.swing.JMenuItem();
         AboutMI = new javax.swing.JMenuItem();
@@ -572,6 +569,7 @@
                 jMenu1.setMnemonic(KeyEvent.VK_F);
                 jMenu1.setText("File");
 
+                /*
                 changePasswordMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
                 changePasswordMI.setText("Change Password");
                 changePasswordMI.addActionListener(new java.awt.event.ActionListener() {
@@ -580,6 +578,7 @@
                     }
                 });
                 jMenu1.add(changePasswordMI);
+                */
 
                 exitMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
                 exitMI.setText("Exit");
@@ -604,6 +603,7 @@
                 });
                 jMenu2.add(preferencesMI);
 
+                /*
                 jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
                 jMenuItem1.setText("Change IP");
                 jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
@@ -620,6 +620,7 @@
                     }
                 });
                 jMenu2.add(jMenuItem2);
+                */
 
                 jMenuBar1.add(jMenu2);
 
@@ -743,19 +744,6 @@
         if (!playBtn.isEnabled()) {
             return;
         }
-        
-        if (leagues[jTabbedPane1.getSelectedIndex()].getName().equals("MLB")) {
-            if (Integer.parseInt(leagues[jTabbedPane1.getSelectedIndex()].getDate().substring(0, 4)) > 2017)
-                checkHosts(leagues[jTabbedPane1.getSelectedIndex()].getKeyURL(), leagues[jTabbedPane1.getSelectedIndex()]);
-            else
-                checkHosts("mlb-ws-mf.media.mlb.com", leagues[jTabbedPane1.getSelectedIndex()]);
-        } else
-            checkHosts(leagues[jTabbedPane1.getSelectedIndex()].getKeyURL(), leagues[jTabbedPane1.getSelectedIndex()]);
-
-        if (!leagues[jTabbedPane1.getSelectedIndex()].isHostsFileEdited()) {
-            MessageBox.show("You are not completely set up! Your hosts file needs to be edited for " + leagues[jTabbedPane1.getSelectedIndex()].getName() + ".", "Hosts file not edited", 2);
-            return;
-        }
 
         if (streamlink.getLocation() == null || streamlink.getLocation().equals("")) {
             getSLLoc();
@@ -1019,7 +1007,7 @@
     private javax.swing.JTable NHLGameTable;
     private javax.swing.JButton NHLNextDayBtn;
     private javax.swing.JButton NHLPrevDayBtn;
-    private javax.swing.JMenuItem changePasswordMI;
+    //private javax.swing.JMenuItem changePasswordMI;
     private javax.swing.JPopupMenu consolePM;
     private javax.swing.JTextPane consoleTA;
     private javax.swing.JMenuItem exitMI;
@@ -1031,8 +1019,8 @@
     private javax.swing.JMenu jMenu2;
     private javax.swing.JMenu jMenu3;
     private javax.swing.JMenuBar jMenuBar1;
-    private javax.swing.JMenuItem jMenuItem1;
-    private javax.swing.JMenuItem jMenuItem2;
+    //private javax.swing.JMenuItem jMenuItem1;
+    //private javax.swing.JMenuItem jMenuItem2;
     private javax.swing.JPanel jPanel1;
     private javax.swing.JPanel jPanel2;
     private javax.swing.JPanel jPanel3;
@@ -1547,85 +1535,19 @@
 
             if (!ver[3].contains("BETA")) {
                 if (curMajor > major || (curMajor == major && curMinor > minor) || (curMajor == major && curMinor >= minor && curPatch > patch) || (curMajor == major && curMinor >= minor && curPatch >= patch && curBuild > build)) {
-                    if (MessageBox.ask("New update available!\nWould you like to update?", "New Update!") == MessageBox.yesOption()) {
-                        SwingWorker<Void, Void> u = updating();
-                        u.execute();
-                        if (AutoUpdate.download(version)) {
-                            if (AutoUpdate.unZipIt()) {
-                                String loc;
-
-                                if (!System.getProperty("os.name").toLowerCase().contains("linux")) {
-                                    loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator");
-                                    if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                        loc += "LazyMan.exe";
-                                    } else {
-                                        loc += "LazyMan.jar";
-                                    }
-                                } else {
-                                    loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar";
-                                }
-                                Runtime.getRuntime().exec("java -jar " + loc);
-                                System.exit(0);
-                            }
-                        }
-                        MessageBox.show("Could not authentically update. Please manually update", version, build);
-                    }
+                    MessageBox.show("New update available. Please manually update", version, build);
                 } else {
                     updateMI.setVisible(false);
                 }
             } else {
                 if (curMajor > major || (curMajor == major && curMinor > minor) || (curMajor == major && curMinor >= minor && curPatch > patch) || (curMajor == major && curMinor >= minor && curPatch >= patch && curBuild > build)) {
-                    if (MessageBox.ask("New stable update available!\nWould you like to update", "New Update!") == MessageBox.yesOption()) {
-                        SwingWorker<Void, Void> u = updating();
-                        u.execute();
-                        if (AutoUpdate.download(version)) {
-                            if (AutoUpdate.unZipIt()) {
-                                String loc;
-
-                                if (!System.getProperty("os.name").toLowerCase().contains("linux")) {
-                                    loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator");
-                                    if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                        loc += "LazyMan.exe";
-                                    } else {
-                                        loc += "LazyMan.jar";
-                                    }
-                                } else {
-                                    loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar";
-                                }
-                                Runtime.getRuntime().exec("java -jar " + loc);
-                                System.exit(0);
-                            }
-                        }
-                        MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2);
-                    }
+                    MessageBox.show("New update available. Please manually update", version, build);
                 } else {
                     version = Web.getContent("https://raw.githubusercontent.com/StevensNJD4/LazyMan/master/VERSIONBETA").replace(" BETA", "").trim();
                     String[] curVerB = version.split("\\.");
                     int curMajorB = Integer.parseInt(curVerB[0]), curMinorB = Integer.parseInt(curVerB[1]), curPatchB = Integer.parseInt(curVerB[2]), curBuildB = Integer.parseInt(curVerB[3]);
                     if (curMajorB > major || (curMajorB == major && curMinorB > minor) || (curMajorB == major && curMinorB >= minor && curPatchB > patch) || (curMajorB == major && curMinorB >= minor && curPatchB >= patch && curBuildB > build)) {
-                        if (MessageBox.ask("New beta update available!\nWould you like to update?", "New Update!") == MessageBox.yesOption()) {
-                            SwingWorker<Void, Void> u = updating();
-                            u.execute();
-                            if (AutoUpdate.download(version)) {
-                                if (AutoUpdate.unZipIt()) {
-                                    String loc;
-
-                                    if (!System.getProperty("os.name").toLowerCase().contains("linux")) {
-                                        loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator");
-                                        if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                            loc += "LazyMan.exe";
-                                        } else {
-                                            loc += "LazyMan.jar";
-                                        }
-                                    } else {
-                                        loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar";
-                                    }
-                                    Runtime.getRuntime().exec("java -jar " + loc);
-                                    System.exit(0);
-                                }
-                            }
-                            MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2);
-                        }
+                        MessageBox.show("New beta update available", version, build);
                     } else {
                         updateMI.setVisible(false);
                     }