Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   Pilot's Lounge (http://forum.fulqrumpublishing.com/forumdisplay.php?f=205)
-   -   An application that will make you get the CloD beta first! (http://forum.fulqrumpublishing.com/showthread.php?t=31363)

mazex 04-21-2012 09:25 AM

An application that will make you get the CloD beta first!
 
2012-04-23: UPDATED TO 1.0.5.0 (Removed message box about network errors etc that has made the watcher stop, as that naturally made it wait for OK before sending a mail about it...)

Hi!

There is so much frustration here now that I decided to write an application after the last delay this thursday, so I don't have to come here every day and check if there is a beta available :) It's probably the silliest app I have ever written ;)

So - this small C# application (that requires .NET Framework 4.0) will poll the site http://www.1cfiles.com/IL2_CliffsofDover/ where all the beta torrent files have been posted so far (so I assume that the next one will be published there too - m'kay Blacksix?)... It will poll every ten minutes in the default setting and if it finds a new torrent file it will send an email to you and if desired it will automatically start your torrent application of choice and start the download... So when you get back from work you are all set to fly!

There are a bunch of options that are pretty self explaining, there is a log file created in the app folder and yes, the email password is stored in encrypted format and I don't snoop it... I posted the source on the same site if you want to check or use it for some other stuff ;)

An image of the application running (I have it on a server that always runs):

http://img21.imageshack.us/img21/676...tcherv1040.jpg

Download at my Google Site here:

https://sites.google.com/site/mazexx/files

The binary app that most want is called "ClodWatcher_v1.0.3.0.zip" and the source code if anyone want it is called "ClodWatcher_v1.0.3.0_src.zip".

I have only tested the SMTP mail part with gmail where it works fine, and I have only tried the "auto start" torrent part with Vuze(Azureus)... No guarantees... I recommend to try the "Test run" button before leaving it on to see that all works (it will "fake" that the last file on the current site is "new" and act from that - downloading, mailing and starting the torrent app etc).

It uses very little CPU naturally and the load of it polling the 1cfiles site for this simple list once every 10 minutes or so will sure be no problem for them...

So - let's all fire this up and continue doing something useful in our lives, I'm going out in my garden now :)

Change Log:
--------------------------------------

1.0.5.0 (2012-04-30)
* Fixed so that there is no dialog box shown if a thread error occur - as it will not send an email about the problem before
that box is read...

1.0.4.0 (2012-04-23)
* Added a check for the event FormClosing if the user had left the "watcher loop" running and then closed the app with the "x"
so that it will shut down the background thread itself and not leave it for the garbage collector (it was defined as a
background thread so it would not have kept going any way).
* Added functionality so that the "Test Run" button is disabled when the "watcher loop" is running...
* Changed the internal "splitsleep" that divides the time the user has set in 1000 instead of 100 as before to make the
"abort watcher" go faster... Before it would not handle the "CancellationPending" event until waking from "polltime"/100 sleep. Now
it only updates the GUI every polltime/100 like before but it handles events every polltime/1000, so it will be more responsive...
* Added DoEvents and check for CancellationPending on some places in the "Test run" to make it "snappier" to abort that too...

1.0.3.0 (2012-04-22)
* Fixed an embarrasing bug that in the real scenario that is yet to happen that would make it send an email over and
over again every 30 minutes (or whatever setting for poll time the user had set). The would only have been one torrent DL though...
* Fixed some logging to be more clear
* Added more information to the mail sent if it found a new file
* Anchored the GUI elements (if the user would decide to change the size of the window they will scale nicely)
* Added "select folder" button for the download folder setting
* Made the poll a mandatory dropdown (so users can't set below 10 minutes to avoid anger from server ops, default at 30 minutes).

1.0.2.0 (2012-04-22)
* Internal version

1.0.1.0 (2012-04-21)
* Fix for http timeout that made the "watcher loop" stop... Now it will try 100 times and sleep 10 seconds between the tries if it
gets some network error. You can change the number of retries in the config file with the parameter: httpGetRetryCount.
* Added a feature so the app will also send an email if the poll loop should stop for some reason so you know it...

1.0.0.0 (2012-04-20)
* Original release

/Mazex

Strike 04-21-2012 09:49 AM

Epic! What a way to state a point really :p

Made me laugh :)

PeterPanPan 04-21-2012 10:02 AM

Thanks Mazex. A bloody mazing!!! There are some seriously talented individuals on this forum.

+1

PPP

Ataros 04-21-2012 10:16 AM

WOW! Thanks for this :mrgreen:

Maybe you would wish to help Banks with his project ? See his messages below too.

335th_GRAthos 04-21-2012 10:17 AM

You are the man!

Thanks Mazex! !!!!!!!

And obviously, you are the one who used his time most constructively (instead of most of us with one finger above the F5 key... LOL).

Now I only need an application to poll the forum every 5min, and if it finds any new post related to the patch update to send an SMS to my phone. Oh, it should also have an ignore list! ;)
Just joking...




~S~

JG52Uther 04-21-2012 10:37 AM

What a great idea! Kudos to you Mazex.
(Athos with my ignore list the forum is quiet ;) )

klem 04-21-2012 10:46 AM

mazex, sometimes I worry about you :D

Kankkis 04-21-2012 11:14 AM

Crazy people here :grin:
I must reload again my ipad battery, because of refressing bananaforum :grin:

mazex 04-21-2012 11:19 AM

Quote:

Originally Posted by klem (Post 412661)
mazex, sometimes I worry about you :D

Me too :), but it felt like a better way to spend the thursday evening and saturday morning than browsing the endless rants here ;)

I now found out that my own "Watcher" had stopped after a temporary timeout to the 1cfiles site - so I updated to version 1.0.1.0 to avoid that by retrying a number of times and send a mail if the loop should stop for some reason - see first post...

Foo'bar 04-21-2012 11:23 AM

Now we have the guarantee that the next patch will be uploaded elsewhere :P

Buchon 04-21-2012 11:54 AM

ohh, nice :)

CLoD community at the rescue :mrgreen: , I like the name F5 replacer :-P

Ibis 04-21-2012 12:43 PM

Can someone tell me where I find the:
"from email address" and
"Account password"

Not clued up like you guys.
thanks.

mazex 04-21-2012 01:16 PM

Quote:

Originally Posted by Ibis (Post 412702)
Can someone tell me where I find the:
"from email address" and
"Account password"

Not clued up like you guys.
thanks.

You have to click the "Mail Settings" button to change those...

ATAG_Doc 04-21-2012 02:05 PM

Dude you are so cool lol

fruitbat 04-21-2012 02:09 PM

Awesome stuff, very cool and funny.

CaptainDoggles 04-21-2012 02:37 PM

I'm not sure that having multiple people hammering the server over and over will do anybody any good.

mazex 04-21-2012 04:03 PM

Quote:

Originally Posted by CaptainDoggles (Post 412752)
I'm not sure that having multiple people hammering the server over and over will do anybody any good.

Well, it does a simple http get of a VERY small page once every 10 minutes... Lets say 1000 people would use this app (no way that will happen! ;)). That would give 6000 requests per hour. I think you could host a web server on an old 386 computer that would manage that load and still run on idle... How many requests per hour do you think this site gets? ;) A really small web server can do 100/requests per second, and then we talk "real" pages that are not just a list of files that is a few kb large with no database backend involved etc...

EDIT: I do however understand that if not working with stuff like this - it could seem that it would be quite a hammering for a web server! I remember working on a project 10 years ago where we did an Internet banking site that was running on two P3:s with 512Mb memory. They could handle 1500 concurrent users hammering them with almost no load at the web server side (c++/isapi dll:s)... The databases did start to get hot at that number of users though (and about 100/requests per second)... On sites today we have loads of over 700/requests per second, and the same scenario... But of course that involves a bunch of clustered servers.

ATAG_Bliss 04-21-2012 05:17 PM

But what if someone posts up a fake torrent file named IL2XXXX? With some of the folks around here I could see someone screwing the pooch so to speak.

Awesome program though. You are nuts :)

louisv 04-21-2012 05:21 PM

So now when someone asks if the patch is out, we can now say:

There is an app for that:cool:

mazex 04-21-2012 06:09 PM

Quote:

Originally Posted by louisv (Post 412850)
So now when someone asks if the patch is out, we can now say:

There is an app for that:cool:

Exactly ;)

mazex 04-21-2012 07:30 PM

Quote:

Originally Posted by Ataros (Post 412648)
WOW! Thanks for this :mrgreen:

Maybe you would wish to help Banks with his project ? See his messages below too.

Thanks!

Mmm, I already started my own idea on that subject actually in Unity that will "jack into CloD" and control a co-op or regular multi player server from a 3D commander GUI... Some day...

http://forum.1cpublishing.eu/showthr...915#post405915

With this post further down in the thread talking about what I now try to do:

http://forum.1cpublishing.eu/showpos...53&postcount=9

highness 04-21-2012 07:41 PM

nice

that app is at mercy of server admins. if they decide to disable directory browsing of that location on the server , then the app will become obsolete :(

mazex 04-21-2012 07:47 PM

Quote:

Originally Posted by highness (Post 412923)
nice

that app is at mercy of server admins. if they decide to disable directory browsing of that location on the server , then the app will become obsolete :(

Of course - and that is naturally the recommended way to configure it ;) Still, as it is a VERY cheap operation for the web server, it really does not hurt to leave us with this instead of sitting here hitting F5 :) And for us in Europe that are at work when the patches are released it would be nice so we have the patch when we get home :) And that site has had directory browsing enabled for a year now (I have used this way to check for patches manually :)) If they disable it now it would be rather "cheap" IMHO...

Codex 04-21-2012 09:31 PM

Well done mate! Thats imagination.

tk471138 04-21-2012 10:25 PM

can you make it where the user can adjust the time it checks the server??

i want to set it to every second (or better yet every half second) just so i can make sure i am the first to get it...


THANKS!!!

ramstein 04-21-2012 11:32 PM

very cool, but the name Clod Hopper might have been funnier.. or maybe not..

mazex 04-21-2012 11:37 PM

Quote:

Originally Posted by tk471138 (Post 412986)
can you make it where the user can adjust the time it checks the server??

i want to set it to every second (or better yet every half second) just so i can make sure i am the first to get it...


THANKS!!!

Thanks :) But let's leave it at the default of ten minutes so we don't annoy some server admin ;)

/mazex

mazex 04-22-2012 10:04 AM

New version 1.0.3.0 that is highly recommended! Se first post that has been updated for details :)

LcSummers 04-22-2012 10:55 AM

Mazex, you are a hell of a man,

great idea and thank you for sharing these files
:-P

sorak 04-22-2012 08:52 PM

Quote:

Originally Posted by mazex (Post 412634)
2012-04-22: IMPORTANT - UPDATED TO 1.0.3.0 (See bottom)

Hi!

There is so much frustration here now that I decided to write an application after the last delay this thursday, so I don't have to come here every day and check if there is a beta available :) It's probably the silliest app I have ever written ;)

So - this small C# application (that requires .NET Framework 4.0) will poll the site http://www.1cfiles.com/IL2_CliffsofDover/ where all the beta torrent files have been posted so far (so I assume that the next one will be published there too - m'kay Blacksix?)... It will poll every ten minutes in the default setting and if it finds a new torrent file it will send an email to you and if desired it will automatically start your torrent application of choice and start the download... So when you get back from work you are all set to fly!

There are a bunch of options that are pretty self explaining, there is a log file created in the app folder and yes, the email password is stored in encrypted format and I don't snoop it... I posted the source on the same site if you want to check or use it for some other stuff ;)

An image of the application running (I have it on a server that always runs):

http://img85.imageshack.us/img85/566...tcherv1030.jpg

Download at my Google Site here:

https://sites.google.com/site/mazexx/files

The binary app that most want is called "ClodWatcher_v1.0.3.0.zip" and the source code if anyone want it is called "ClodWatcher_v1.0.3.0_src.zip".

I have only tested the SMTP mail part with gmail where it works fine, and I have only tried the "auto start" torrent part with Vuze(Azureus)... No guarantees... I recommend to try the "Test run" button before leaving it on to see that all works (it will "fake" that the last file on the current site is "new" and act from that - downloading, mailing and starting the torrent app etc).

It uses very little CPU naturally and the load of it polling the 1cfiles site for this simple list once every 10 minutes or so will sure be no problem for them...

So - let's all fire this up and continue doing something useful in our lives, I'm going out in my garden now :)

UPDATE 2012-04-21 - Made a new version 1.0.1 after I got a http timeout that made the loop stop... Now it will try 100 times and sleep 10 seconds between the tries if it gets some network error. You can change the number of retries in the config file with the parameter: httpGetRetryCount. It will now also send an email if the poll loop should stop so you know it ;)

UPDATE 2012-04-22 Updated to version 1.0.3.0: Most importantly fixed an embarrasing bug that in the real scenario that is yet to happen would make it download the same file over and over again every 10 minutes (a late bug after adding the test run feature where the part in the loop that sets the current list as the old list was passed ;) As the torrent app would reject duplicates it would not do that much but an email every 10 minutes would be annoying! Sorry for that). Fixed some logging, anchored the GUI elements, added "select folder" for the download folder and made the poll a mandatory dropdown (so users can't set below 10 minutes to avoid anger from server ops, default at 30 minutes).

/Mazex

SO WHEN IS YOUR NEXT PATCH/UPDATE ?? HOW COULD YOU RELEASE this with so many ground breaking bugs.... Let me guess.. 2 weeks you will have all the bugs fixed?

mazex 04-22-2012 09:28 PM

Quote:

Originally Posted by sorak (Post 413326)
SO WHEN IS YOUR NEXT PATCH/UPDATE ?? HOW COULD YOU RELEASE this with so many ground breaking bugs.... Let me guess.. 2 weeks you will have all the bugs fixed?

Lol ;) I actually thought about that myself when i fixed that bug (that did never "happen", but still). This is a "hello world" sized app that was coded in an evening and still I manage to get bugs in it, and then I've been working as a professional developer for 15 years ;) Think about writing a friggin flight simulator that has to run on all weird rigs in the world and a crazy state combination to keep track of... :)

But very soon I will get a new version ready - it's in internal testing right now but we found a bug that I'm not allowed to speak about that may take a few days to fix ;) To make you happy I have this for you all to view in the meantime!

Picture of russian village that will appear in ClodWatcher version 2.0:
http://academic.umf.maine.edu/scotte...acd/farm_1.jpg

We are working at the alignment of the fences so no whining about that please!

klem 04-22-2012 10:02 PM

Quote:

Originally Posted by mazex (Post 413333)
Lol ;) I actually thought about that myself when i fixed that bug (that did never "happen", but still). This is a "hello world" sized app that was coded in an evening and still I manage to get bugs in it, and then I've been working as a professional developer for 15 years ;) Think about writing a friggin flight simulator that has to run on all weird rigs in the world and a crazy state combination to keep track of... :)

But very soon I will get a new version ready - it's in internal testing right now but we found a bug that I'm not allowed to speak about that may take a few days to fix ;) To make you happy I have this for you all to view in the meantime!

Picture of russian village that will appear in ClodWatcher version 2.0:
http://academic.umf.maine.edu/scotte...acd/farm_1.jpg

We are working at the alignment of the fences so no whining about that please!

The horse is the wrong colour :(

sorak 04-23-2012 02:23 AM

Quote:

Originally Posted by mazex (Post 413333)
Lol ;) I actually thought about that myself when i fixed that bug (that did never "happen", but still). This is a "hello world" sized app that was coded in an evening and still I manage to get bugs in it, and then I've been working as a professional developer for 15 years ;) Think about writing a friggin flight simulator that has to run on all weird rigs in the world and a crazy state combination to keep track of... :)

But very soon I will get a new version ready - it's in internal testing right now but we found a bug that I'm not allowed to speak about that may take a few days to fix ;) To make you happy I have this for you all to view in the meantime!

Picture of russian village that will appear in ClodWatcher version 2.0:
http://academic.umf.maine.edu/scotte...acd/farm_1.jpg

We are working at the alignment of the fences so no whining about that please!

heheehe

F19_Klunk 04-23-2012 08:49 AM

Quote:

Originally Posted by mazex (Post 413333)
Lol ;) I actually thought about that myself when i fixed that bug (that did never "happen", but still). This is a "hello world" sized app that was coded in an evening and still I manage to get bugs in it, and then I've been working as a professional developer for 15 years ;) Think about writing a friggin flight simulator that has to run on all weird rigs in the world and a crazy state combination to keep track of... :)

But very soon I will get a new version ready - it's in internal testing right now but we found a bug that I'm not allowed to speak about that may take a few days to fix ;) To make you happy I have this for you all to view in the meantime!

Picture of russian village that will appear in ClodWatcher version 2.0:
http://academic.umf.maine.edu/scotte...acd/farm_1.jpg

We are working at the alignment of the fences so no whining about that please!



Humour!!! :D

SG1_Lud 04-23-2012 10:40 AM

Thanks Mazex, works as advertised :grin:

Madfish 04-23-2012 05:31 PM

I get a CTD when pressing the [X] button in the top right. What's up?! :confused:

:-P

mazex 04-23-2012 06:26 PM

Quote:

Originally Posted by Madfish (Post 413650)
I get a CTD when pressing the [X] button in the top right. What's up?! :confused:

:-P

He he, even though you did joke - you actually touched something that is kind of a bug (or more of an aesthetic glitch) in the current version. If user has started the background thread that polls the server and then press the "real" exit button down in the right corner without stopping the watcher it will notice that and nicely terminate the poll thread before closing the main form. BUT - If you press the x I did not handle the event there (FormClosing) so that it should check if the user has pressed the x without stopping the background thread :) A good application is supposed to anticipate that the user maybe not does things as they are supposed to and I have changed the code for version 1.0.4 to include checking that event too... But I will not do a new build of it until something else appears...

This is the tough world of being a developer... Thinking of all the things users can do that they are not supposed to do. Having the "watcher" thread running when closing the form with the x will not cause any errors though and the "watcher" thread will die as it is defined as a background thread when it gets orphaned, but it's not elegant ;)

ATAG_Doc 04-23-2012 10:46 PM

Okay so when can we expect a patch?
:)

AndyJWest 04-24-2012 01:14 AM

Quote:

Originally Posted by ATAG_Doc (Post 413774)
Okay so when can we expect a patch?
:)

I think we need an application to do regular checks for Mazex's patch being posted... :rolleyes:

I'd write one, but I think it would probably need beta-testing first. Any volunteers? :grin:

klem 04-24-2012 04:05 AM

Quote:

Originally Posted by ATAG_Doc (Post 413774)
Okay so when can we expect a patch?
:)

I don't think he claimed it's a crystal ball.

Oh, wait, thats a different thread.

mazex 04-24-2012 04:10 AM

Quote:

Originally Posted by AndyJWest (Post 413817)
I think we need an application to do regular checks for Mazex's patch being posted... :rolleyes:

I'd write one, but I think it would probably need beta-testing first. Any volunteers? :grin:

lol :)

edit: And by the way i sneaked a patch out yesterday after the discussion of the FormClosing event so it's 1.0.4 that is the current version (see first post) :)

AndyJWest 04-24-2012 04:45 AM

I've decided that another project needs more work first. I'm going to write an application that randomly disconnects me from Rise of Flight multiplayer servers every few hours. It won't help me stay connected, it won't help me find out what else is doing it, but at least I'll have the satisfaction of knowing what might be causing it some of the time...

Yup. CloD isn't alone in having problems. There I was in a D.F.W., feeling smug as I'd just dropped a sample of the Kaiser's best bombs on the enemy from the astonishing height of 2,500m (RoF bombers tend to be somewhat realistic in the rate-of-climb department, in that they don't seem to have one), and heading back over the mud below. Glanced back to see what the AI gunner was doing (a crack shot, but stupid - some things never change), and he disappeared before my eyes. Along with the gun, and everything else, except a hole where his cockpit had been. And no, it wasn't some bounder in a Camel or a Spad, just a bug - that promptly lead to a message that I'd been disconnected. Yup. A statement of the obvious, with no clue whatsoever as to why. Actually, that gives me an idea. I'll write an error-message interceptor, that replaces useless generalisations ("parameter error") with ultra-specific randomly-generated ones ("Negative dividend in procedure wingFoldGammaCorrectionParseURL - preemptive stack-underflow"). Again, no use for actually fixing anything, but at least it gives the illusion that it is fixable... ;)

mazex 04-24-2012 06:19 AM

Quote:

Originally Posted by AndyJWest (Post 413862)
I've decided that another project needs more work first. I'm going to write an application that randomly disconnects me from Rise of Flight multiplayer servers every few hours. It won't help me stay connected, it won't help me find out what else is doing it, but at least I'll have the satisfaction of knowing what might be causing it some of the time...

Yup. CloD isn't alone in having problems. There I was in a D.F.W., feeling smug as I'd just dropped a sample of the Kaiser's best bombs on the enemy from the astonishing height of 2,500m (RoF bombers tend to be somewhat realistic in the rate-of-climb department, in that they don't seem to have one), and heading back over the mud below. Glanced back to see what the AI gunner was doing (a crack shot, but stupid - some things never change), and he disappeared before my eyes. Along with the gun, and everything else, except a hole where his cockpit had been. And no, it wasn't some bounder in a Camel or a Spad, just a bug - that promptly lead to a message that I'd been disconnected. Yup. A statement of the obvious, with no clue whatsoever as to why. Actually, that gives me an idea. I'll write an error-message interceptor, that replaces useless generalisations ("parameter error") with ultra-specific randomly-generated ones ("Negative dividend in procedure wingFoldGammaCorrectionParseURL - preemptive stack-underflow"). Again, no use for actually fixing anything, but at least it gives the illusion that it is fixable... ;)

Lol, RoF sure have their problems too (even though it's a truly great game at heart). The first months where almost as painful as for CloD, but they did catch up to make it rather robust after a year or so... But just like you describe, the pain of dying in an unhandled exception is the worst one ;)

/mazex

mazex 04-28-2012 06:57 AM

Use this app :) It won't be fooled by the latest trend of necro bumping... It already "knows of" the version 14305 brought up by pencon today and the 14413 thread brought up yesterday by Foo'bar (a bit surprised by that as Foo'bar has done much good before - like those trains!)

Then of course, they have to use their previous routine for it to work, so no guarantees ;) The only guarantee is that it's "necro bumping safe" ;)

Wolf_Rider 04-28-2012 07:47 AM

for this kind of "bloody mindedness" (the actions of a thorough meathead) - instant ban, no question, should be the response

mazex 04-28-2012 08:14 AM

Quote:

Originally Posted by Wolf_Rider (Post 416250)
for this kind of "bloody mindedness" (the actions of a thorough meathead) - instant ban, no question, should be the response

I do agree that it's childish, but at least Foo'bar bumped "his one" with:

"Unbelievable, all this is already 1 year ago. Feels like last month."

Which I must admit was a bit funny at least - and not pure evilness like pencons comment that was just done to confuse people into downloading it. The effect of bumping the old threads is however the same but as Foo'bar selected a date that is yet to come (4:th of may 2012 is not yet here in Sweden at least) even though there was the patch thread from the 27:th of april for him to "choose from" then as pencon had not bumped it yesterday... So - I think he did that deliberately to not fool anyone into downloading it?

EDIT:

And looking at the fact that Foo'bar has actually contributed to the actual CloD game with his marvelous trains gives him some "slack" for me at least (even though it was stupid!):

His stuff:

http://fooblog.mexxoft.com/

/Mazex

mazex 04-30-2012 07:32 AM

New "non mandatory" version 1.0.5 - same as CloD now :)

I had some network problem this night and it retried 100 times with no success - and then it shows a message box that it's aborting before sending the email about it... So you don't get the mail until reading the message :) The "abort" mail was a last minute bonus - mental note, never add such things without testing - I know ;)


All times are GMT. The time now is 04:08 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.