Browse Source

added anti-cheating for mothership naming

epsylon 4 years ago
parent
commit
a805d00d7a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      core/main.py

+ 4 - 1
core/main.py

@@ -151,7 +151,10 @@ class UFONet(object):
             try:
                 self.mothership_id = str(base64.b64decode(random.choice(self.mothership_ids).strip()), 'utf-8')
             except:
-                self.mothership_id = str(base64.b64decode(random.choice(self.mothership_ids).strip()), 'latin-1')+"\n" # id (hack&slash!) creation ;-)
+                try:
+                    self.mothership_id = str(base64.b64decode(random.choice(self.mothership_ids).strip()), 'latin-1')+"\n" # id (hack&slash!) creation ;-)
+                except:
+                    self.mothership_id = "l4m3r-lulz/0\n" # motherhip naming anti-cheating!
             m = open(self.mothershipname, "w") # write mothership name to a static file as a baptism
             m.write(str(self.mothership_id.upper()))
             m.close()