Jacob's CTF Server
What if CTF used different software - Printable Version

+- Jacob's CTF Server (https://jacobsc.tf)
+-- Forum: Minecraft Capture the Flag (https://jacobsc.tf/forumdisplay.php?fid=3)
+--- Forum: Suggestions (https://jacobsc.tf/forumdisplay.php?fid=24)
+--- Thread: What if CTF used different software (/showthread.php?tid=909)



What if CTF used different software - Cheesse - 02-16-2017

Like MCGalaxy or D3 for example.

Other softwares have more much capability.

Just imagine...


RE: What if CTF used different software - Brady - 02-19-2017

Nope.


RE: What if CTF used different software - Jacob_ - 02-19-2017

I used to think OpenCraft (foundation of CTF) was poorly coded until I saw the MCGalaxy source.


RE: What if CTF used different software - UnknownShadow200 - 02-24-2017

Which parts of the source code are so awful? (I know most of the games code is(


RE: What if CTF used different software - Jacob_ - 02-25-2017

Code:
if (File.Exists("MCGalaxy.update") || File.Exists("MCGalaxy_.update"))
                {
                    try
                    {
                        if (File.Exists("MCGalaxy.update"))
                        {
                            if (File.Exists(args[0]))
                            {
                                if (File.Exists("MCGalaxy.backup"))
                                    File.Delete("MCGalaxy.backup");
                                File.Move(args[0], "MCGalaxy.backup");
                            }
                            File.Move("MCGalaxy.update", args[0]);
                        }
                    }
                    catch (Exception e)
                    {
                        if (tries > 4)
                        {
                            UpdateFailure(e);
                        }
                        else
                        {
                            Console.WriteLine("\n\nAn error occured while updating.  Retrying...\n\n");
                            Thread.Sleep(100);
                            Update(args);
                        }
                    }
Code:
if (args[0].Contains("securitycheck10934579068013978427893755755270374"))
                    {
                        args[0] = args[0].Replace("securitycheck10934579068013978427893755755270374", "");
                        if (args[0] == ".exe")
                            args[0] = "securitycheck10934579068013978427893755755270374.exe";
                        Console.WriteLine("Waiting for " + args[0] + " to exit...");
                        while (Process.GetProcessesByName(args[0]).Length > 0)
                        {
                            //Sit here and do nothing
                        }
                    }


It's mostly just the fact that so many different people have worked on it (MCSharp, MCZall, MCLawl, MCForge, MCDerp and however many I forgot) so there's a lot of variety in coding styles. That's true for every large project though unless you have strict style rules and code reviews.


RE: What if CTF used different software - UnknownShadow200 - 02-25-2017

Fair enough. And yeah that updater code is very ugly, I'd completely forgotten about it. Cleaned it up and happy to clean up any other ugly parts of the code.