コード例 #1
0
ファイル: LoginMessage.py プロジェクト: nako75/Classic-Brawl
    def process(self):
        if self.major != 26:
            LoginFailedMessage(
                self.client, self.player,
                "The server does not support your version").send()

        elif self.player.LowID != 0:

            if self.player.maintenance:
                LoginFailedMessage(self.client, self.player, "").send()

            if self.player.patch:
                if self.fingerprint_sha != self.player.patch_sha:
                    LoginFailedMessage(self.client, self.player, "").send()

            LoginOkMessage(self.client, self.player).send()
            DataBase.loadAccount(self)  # load account
            OwnHomeDataMessage(self.client, self.player).send()
            MyAllianceMessage(self.client, self.player).send()
            if self.player.DoNotDistrub == 1:
                DoNotDistrubOkMessage(self.client, self.player).send()
            if self.player.roomID > 0:
                TeamGameroomDataMessage(self.client, self.player).send()

        else:
            self.player.LowID = Helpers.randomID(self)
            self.player.HighID = 0
            self.player.Token = Helpers.randomStringDigits(self)
            LoginOkMessage(self.client, self.player).send()
            OwnHomeDataMessage(self.client, self.player).send()
            MyAllianceMessage(self.client, self.player).send()
コード例 #2
0
    def process(self):
        if self.major != 26:
            self.player.err_code = 8
            LoginFailedMessage(
                self.client, self.player,
                "Your client is outdated, click below to download the new version!"
            ).send()

        elif self.player.low_id != 0:

            if self.player.maintenance:
                LoginFailedMessage(self.client, self.player, "").send()

            if self.player.patch:
                if self.fingerprint_sha != self.player.patch_sha:
                    LoginFailedMessage(self.client, self.player, "").send()

            LoginOkMessage(self.client, self.player).send()
            DataBase.loadAccount(self)  # load account
            OwnHomeDataMessage(self.client, self.player).send()
            MyAllianceMessage(self.client, self.player).send()
            if self.player.do_not_distrub == 1:
                DoNotDistrubOkMessage(self.client, self.player).send()
            if self.player.room_id > 0:
                TeamGameroomDataMessage(self.client, self.player).send()

        else:
            self.player.low_id = Helpers.randomID(self)
            self.player.high_id = 0
            self.player.token = Helpers.randomStringDigits(self)

            LoginOkMessage(self.client, self.player).send()
            OwnHomeDataMessage(self.client, self.player).send()
            MyAllianceMessage(self.client, self.player).send()
コード例 #3
0
    def process(self):
        if self.player.LowID != 0:
            LoginOkMessage(self.client, self.player).send()
            DataBase.loadAccount(self)  # load account
            OwnHomeData(self.client, self.player).send()

        else:
            self.player.LowID = Helpers.randomID(self)
            self.player.HighID = 0
            self.player.Token = Helpers.randomStringDigits(self)
            LoginOkMessage(self.client, self.player).send()
            OwnHomeData(self.client, self.player).send()
コード例 #4
0
 def process(self, crypter):
     if len(self.player.Token) == 40:
         LoginOkMessage(self.client, self.player).send(crypter)
         DataBase.loadAccount(self)
         OwnHomeDataMessage(self.client, self.player).send(crypter)
         MyAllianceMessage(self.client, self.player).send(crypter)
     else:
         self.player.LowID = random.randint(0, 2147483647)
         self.player.HighID = 0
         self.player.Token = Helpers.randomStringDigits(self)
         LoginOkMessage(self.client, self.player).send(crypter)
         DataBase.createAccount(self)
         OwnHomeDataMessage(self.client, self.player).send(crypter)
         MyAllianceMessage(self.client, self.player).send(crypter)
コード例 #5
0
ファイル: Login.py プロジェクト: brawler888/TEST
    def process(self):
        if self.major != 27:
            LoginFailed(self.client, self.player).send()
        elif self.player.LowID != 0:
            LoginOk(self.client, self.player).send()
            DataBase.loadAccount(self)  # load account
            OwnHomeData(self.client, self.player).send()
            if self.player.DoNotDistrub == 1:
                DoNotDistrubServer(self.client, self.player).send()
            if self.player.roomID > 0:
                GameroomData(self.client, self.player).send()

        else:
            self.player.LowID = Helpers.randomID(self)
            self.player.HighID = 0
            self.player.Token = Helpers.randomStringDigits(self)
            LoginOk(self.client, self.player).send()
            OwnHomeData(self.client, self.player).send()