ItsMods

Full Version: Plugin version checker
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi

Guys to improve my plugin performance i need a simple code to add in to my plugin to check plugin version from my site
and if new version of plugin is released every 3 minute in game say
"New version of Plugin is released pleas See our site".

I have idea to checking new version
1)may have sipmle way such as if in link "www.mysite.com/ver.txt
the valu 1 = new version or if valu 0 no new version and no need to update.
2)or by cheking MD5
3)or...

Thank you.
Store MD5 (or SHA1) in a www.mysite.com/ver.txt
I Think this will help you
this is the one when i tried to do this on God Plugin but Since i Dont have a Site Dumb Bitch So I Removed it from my code

Code:
public override void OnServerLoad
         try
            {
                WebClient up = new WebClient();
                string download = up.DownloadString("http://www.mysite.com/update.txt");
                string[] downloads = download.Split(',');
               }
             if downloads = "1"
                ServerPrint("Update Is available")
                //whatever else you wanna add

Inform me if this works or sth else.
The code is wrong anyway but checking for '1' in a text file doesn't make sense. Sure it will show 'There is an update' but after you updated it will show the message again because the text file still contains '1'. And then if you remove the '1' from the file, the people who haven't updated yet will never receive the update message.
hmmm. true.
but still fixable.
i believe ramin can fix it, i dont have time for this.
Use the version number.
That's what I always do.
if(currentversion != serverversion) launchUpdater()
Hi @archit your code has many problem pleas recheck your code.

thank you.
Linq is not included in NET 3.0
Pages: 1 2