I lol'd too. Btw I looked at yours.. don't you live in Austria?Quote:
I lolīd on the Netspeed xD
look on my Dedi: [Only registered and activated users can see links. Click Here To Register...]
Kinshi PM me if u need hosting :P
I lol'd too. Btw I looked at yours.. don't you live in Austria?Quote:
I lolīd on the Netspeed xD
look on my Dedi: [Only registered and activated users can see links. Click Here To Register...]
Kinshi PM me if u need hosting :P
Lol why does it matter?Quote:
Nice, good luck with the server.
Btw, the registering method isn't good, if some1 enters a wrong account ID you'll have another account created.
It's just a matter of time then you'll have tons of useless accounts...
Humans make mistakes.
This is just a example, dunno if it'll work. And it's for INI files, cba to go into MySQL atm.Quote:
Nice, good luck with the server.
Btw, the registering method isn't good, if some1 enters a wrong account ID you'll have another account created.
It's just a matter of time then you'll have tons of useless accounts...
Humans make mistakes.
Tho, that code will delete every account that hasn't been any action in 3 days with.Quote:
foreach (string acc in "C:\\Accounts\\")
{
if (DateTime.Now >= System.IO.File.GetLastWriteTime("C:\\Accounts\\" + acc).AddDays(3))
{
System.IO.File.Delete("C:\\Accounts\\" + acc);
}
}
OMG DUDE!Quote:
This is just a example, dunno if it'll work. And it's for INI files, cba to go into MySQL atm.
Tho, that code will delete every account that hasn't been any action in 3 days with.
foreach (string acc in "C:\\Accounts\\")
{
if (DateTime.Now >= System.IO.File.GetLastWriteTime("C:\\Accounts\\" + acc).AddDays(3))
{
System.IO.File.Delete("C:\\Accounts\\" + acc);
}
}
String Path = "C:\\Accounts\\";
foreach (string acc in System.IO.Directory.GetFiles(Path))
{
if (DateTime.Now >= System.IO.File.GetLastWriteTime(Path + acc).AddDays(3))
{
System.IO.File.Delete(Path + acc);
}
}
Quote:
OMG DUDE!
you search a string in another string(thats what normaly C# reads-.-')Code:foreach (string acc in "C:\\Accounts\\") { if (DateTime.Now >= System.IO.File.GetLastWriteTime("C:\\Accounts\\" + acc).AddDays(3)) { System.IO.File.Delete("C:\\Accounts\\" + acc); } }
How do you expect people to learn if you give em shit?Code:String Path = "C:\\Accounts\\"; foreach (string acc in System.IO.Directory.GetFiles(Path)) { if (DateTime.Now >= System.IO.File.GetLastWriteTime(Path + acc).AddDays(3)) { System.IO.File.Delete(Path + acc); } }
using System.IO;
//...
const string Path = @"C:\Accounts\";
DateTime Now = DateTime.Now;
foreach (string accFile in Directory.GetFiles(Path))
{
if (Now >= File.GetLastWriteTime(accFile).AddDays(3))
{
File.Delete(accFile);
}
}