Pandemic - SOURCE CODE INSIDE

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

supermodder911 wrote:this is cool if you finish this halomods would have to add a button for it like the aim and msn buttons lol.
Which is why I made one.
It's actually more like the ICQ button - it shows the user's status. I explain it all in the readme under the 1.6 updates.

Anyway, I don't know if I even mentioned it, but I'm up for any suggestions.
If there's a feature you want, let me know, I'll do my best to get it in. That was one of the reasons for this, getting the best of both worlds from MSN and AIM, and then tossing in whatever I could.

I'm working on getting the pan:// or pandemic:// protocol to open a new chat window.

Edit: Oh, hey, page two.
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
-DeToX-




Illusionist Recreator Connoisseur Acolyte
Sigma Decryptor Droplet Pyre
Blacksmith Socialist New Age System Engineer
ONI

Posts: 4589
Joined: Sun Jun 18, 2006 3:58 pm
Location: ...

Post by -DeToX- »

VB.Net :cry:


Anyways uh looks cool, keep working on it.
Image
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

I can convert it to C# pretty easily. How things are now with the whole .net thing, VB vs. C# is more of just a coding style than anything else. The output is now exactly the same either way.

Also, I'm done with what I said I was going to.
It stores all the required registry information when it starts up. It's working quite nicely in Firefox.
Format is:
pandemic://sendmessage.[user name]
and
pandemic://joinchat.[chat room name]

It works by starting a new instance of Pandemic, which sets a value in the app's settings and exits out (because only one instance can be run at a time). The other instance checks this setting every second (which isn't very often) and if it's anything other than "", it runs a more thorough check to turn the input (which can be pandemic:[something].[something or pandemic://[something].[something]/) and turns into [something].[something] which it can then use to determine whether it's trying to start a conversation with a user or join a chat room.

Also, the links are accepted by phpBB, so I changed the one in my sig. I will get the newest version (it's a small update) out in a few minutes.
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
User avatar
StalkingGrunt911




Recreator Connoisseur Acolyte Coroner
Sigma Pyre

Posts: 3618
Joined: Wed May 24, 2006 12:30 pm
Location: Florida!
Contact:

Post by StalkingGrunt911 »

Damn made your doing a fucking awesome job. Keep up the work bro.
User avatar
SpecOp44




Advisor Recreator Snitch! Critic

Posts: 2008
Joined: Tue Jun 06, 2006 12:34 pm
Location: The Canadarm

Post by SpecOp44 »

Very awesome indeed.
Image
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

I only wish I could use an image with trailing operators in phpBB. Instead I have to rely on a mod-rewrite with regular expressions...

Oh well, regardless, you can slap the following in your sig to show your status and link to a conversation with you in Pandemic:

[url=pandemic://sendmessage.Bacon]Image[/url]

Code: Select all

[url=pandemic://sendmessage.UserName][img]http://76.189.178.118:1337/panimage/UserName/pan.png[/img][/url]
Replace UserName in the link and image with your Pandemic user name (case sensitive)
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

FleetAdmiralBacon wrote:How things are now with the whole .net thing, VB vs. C# is more of just a coding style than anything else. The output is now exactly the same either way.
Actually, if you make the exact same .exe in both vb and C#, you'll find the C# version to be faster. It's to do with the way they are compiled into the IL.
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

The binary output is exactly the same with VS 2005, previous versions had differences. I've seen my code decompiled in C#, I'll have to get the entire project decompiled so that I can try it in C#, but I assure you, there is no difference.

Anyway, sorry the server isn't up, this is why I need to get a dedicated one on Oasis-Games.com, but I can't do that until I can get the guy running the server to allow shell access (and hopefully install Python)

Edit:
Is the server running? It's entirely possible that I just don't have access to TCP 1337 and UDP 60009 from work, in which case I can't see the status images or connect to the server. Wait... Port 80 isn't giving me status images either, so someone stopped the server. Ug... That's what I get for using a foreground command-line window on a computer that undoubtedly someone else would try to use...
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
User avatar
Prey




Connoisseur Snitch! Pyre Articulatist 500

Posts: 1026
Joined: Wed Dec 27, 2006 6:49 am
Location: UK
Contact:

Post by Prey »

FleetAdmiralBacon wrote:The binary output is exactly the same with VS 2005, previous versions had differences. I've seen my code decompiled in C#, I'll have to get the entire project decompiled so that I can try it in C#, but I assure you, there is no difference.
:? As a test I made the exact same .exe in both c# and vb, and found 3 differences:
  • The vb executable was 8kb bigger.
  • A hex compare yielded about 10 differences.
  • Decompiling both versions in the other language yeilded different results.
I understand that they are both compiled into the intermediate language, but like I said before; the way in which they are compiled differs, with C# always turning out on top.
Halo 2 Prophet - Skin with ease with the simple 3D point and click interface.
Halo 3 Research Thread - Contribute to the research into Halo 3.
User avatar
LuxuriousMeat





Posts: 824
Joined: Thu Nov 03, 2005 6:43 pm
Location: zzzzzzzzzzzzzzzz
Contact:

Post by LuxuriousMeat »

Prey wrote:
FleetAdmiralBacon wrote:The binary output is exactly the same with VS 2005, previous versions had differences. I've seen my code decompiled in C#, I'll have to get the entire project decompiled so that I can try it in C#, but I assure you, there is no difference.
:? As a test I made the exact same .exe in both c# and vb, and found 3 differences:
  • The vb executable was 8kb bigger.
  • A hex compare yielded about 10 differences.
  • Decompiling both versions in the other language yeilded different results.
I understand that they are both compiled into the intermediate language, but like I said before; the way in which they are compiled differs, with C# always turning out on top.
Well, the last reason is most likely because VB has some different functions and name spaces like the 'My' name space and whatnot.
Image
-DeToX-




Illusionist Recreator Connoisseur Acolyte
Sigma Decryptor Droplet Pyre
Blacksmith Socialist New Age System Engineer
ONI

Posts: 4589
Joined: Sun Jun 18, 2006 3:58 pm
Location: ...

Post by -DeToX- »

The Syntax says it all. Its like its got nub written all over it. But then again, this is about Pandemic, not C# or VB.

Di(nub)m nub a(nub)s nub = nub ^ nub + nub - (nub * nub).
VB = nub.
Image
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

Well, regardless, I really don't care, and if it means that much, I can port it to C# later.
In the meantime, more updates:
I've been working on fixing a few bugs and adding some new features. Users who choose to not use a custom avatar will find that their status reflects what is shown, much like in the tray icon and button. I've also added a context menu to the user list in chatrooms so you can invite new friends by just typing their names, or start up a private conversation with anyone in the chatroom. Another new addition is that sendmessage links can now have a second argument - an actual message.
I'm still cleaning things up, so I'll release it tomorrow before I leave for Florida.

In the mean time, new status image:
[url=pandemic://sendmessage.Bacon.Hello]Image[/url]

Code: Select all

[url=pandemic://sendmessage.YOUR_NAME_HERE.Hello][img]http://76.189.178.118/panimage/YOUR_NAME_HERE/spiral.png[/img][/url]
Yes, it's the standard Pandemic spiral in the different status colors.
It's basically just a generic status icon.

Edit:
Well, that should do it.
You can now pick up 1.8 from the Pandemic downloads page.
I have not made any server changes, this is a client-only update.
You will also notice that the actual program version number has not been changing since 1.6 - this is because new version numbers erase settings.

That's it for now, I'm going to Florida tonight, so I had to make sure everything was up and running beforehand.

Todo List for 1.9
Here's a list of things I'll be working on for the next update, which won't come for a while. Many of these will require extra options on the server.
+ File sending (via an integrated FTP agent, login retrieved from server, files are automatically deleted when idle, possibly?)
+ Customizable notification sounds
+ Upgraded message security.
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

I do believe five days is sufficient wait...


Anyway, 1.9. Fixed a few bugs, added a few small things like little icons on the main screen that show server features as well as a server response for wrong passwords and missing usernames. However, the biggest update is file transfer. 1.9 uses an FTP server (login information is retrieved from the server) to upload, download, and delete files. It's fairly speedy, all depends on the server used. The standard server runs on Oasis-Games.com's FTP server, so it's fairly fast.
The download end shows a progress bar while the upload end displays a marquee - this is because of the way data is written to the buffer. I can change it, but all that will do is slow things down. Further changes may be made - I may not even use FTP in the future.

Anyway, you can download 1.9 here as well as the new server here.


Edit: If you ever find that Oasis-Games.com is not responding, you can always access the Pandemic site directly by IP:
http://66.79.166.44/~kaos/pandemic/

Edit:
After about 4 hours of work (I'm lazy, things tend to be slow), I finally have a working installer. This installer is a custom-made single-file program that will extract all the necessary files and run the Mozilla ActiveX installer (you can cancel the installation for that if you already have it). The installer uses a third-party cab extraction library (which is embedded and extracted from the program itself) to extract files from a cab archive containing the necessary program files. The bulk of the installer is the Mozilla control. I may make a stripped-down version of the installer that does not include it, but for now, it will remain in there to keep everything in one place.
Anyway, without further ado, you can download the installer by clicking on the icon below:
Image


Edit (August 27th, 2:42pm, EST):
Well, I noticed plenty of bugs concerning logging and file sending (specifically with refusing files). I've fixed them up and added some security features to the file transfer. You can now choose to block certain extensions automatically, as well as automatically save incoming files (security comes first).
One thing I'm looking towards doing is an automatic updater. It will retrieve the newest installation as a CAB archive, close out of Pandemic, and then extract the archive. This will be released in the next build. The updater will be a single file that will be installed separately from the other parts of the program (it won't be stored in the CAB archive in the installer)
One last thing that's new is that the client will detect when it has lost its connection to the server through the use of the friends list and a timeout counter. Don't worry if you don't have any friends, the counter will not be enabled unless a friend status request is sent. This was put in place while testing fixes for file transfer refusal bugs and because my connect always dies. In the case that a connection is lost, the socket will shut down and reconnect with a fresh socket and boot you to the login screen. Once it has reconnected, it will send a logout, just in case you're not around to log back in (otherwise, you'll just sit on the server as being online)

Anyway, without further ado, 1.10:
Installer
Binaries
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
User avatar
FleetAdmiralBacon




Critic Pyre Articulatist 500

Posts: 2377
Joined: Sat Nov 26, 2005 7:01 pm
Location: Ohio
Contact:

Post by FleetAdmiralBacon »

Just released the source code for VB '05

Enjoy. Plenty of stuff for you in there. I'd explain everything in fancy tutorials, but I'm just too pissed off at Microsoft to promote their s****y stuff.
Image
Everything you'll ever need to know about me.
Need help with Linux, C#, C, Python, Java, PHP, Javascript, CSS, or VB? I'm available from 3:00PM-8:00PM EST on weekdays.
Plank755





Posts: 27
Joined: Fri Dec 14, 2007 2:17 pm
Location: I 1s 1n Ur H0us3 k1ll1ng ur DUd3z0rz

Post by Plank755 »

the DL links aint working
Post Reply