Browse Source

remove create_account()

CMsgClientCreateAccount was diabled and now removed from the protos
pull/171/head
Rossen Georgiev 7 years ago
committed by Rossen Georgiev
parent
commit
b1d24664f9
  1. 29
      steam/client/builtins/account.py
  2. 2
      steam/core/msg/__init__.py

29
steam/client/builtins/account.py

@ -8,35 +8,6 @@ class Account(object):
def __init__(self, *args, **kwargs):
super(Account, self).__init__(*args, **kwargs)
def create_account(self, account_name, password, email=''):
"""Create a new Steam account
.. warning::
Disabled by Valve
:param account_name: desired account name
:type account_name: :class:`str`
:param password: desired password
:type password: :class:`str`
:param email: desired email
:type email: :class:`str`
:return: (EResult, SteamID)
:rtype: :class:`tuple`
"""
message = MsgProto(EMsg.ClientCreateAccountProto)
message.body.account_name = account_name
message.body.password = password
if email:
message.body.email = email
resp = self.send_job_and_wait(message, timeout=10)
if resp is None:
return EResult.Timeout, None
else:
return EResult(resp.eresult), SteamID(resp.steamid) if resp.steamid else None
def request_validation_mail(self):
"""Request validation email

2
steam/core/msg/__init__.py

@ -18,8 +18,6 @@ cmsg_lookup_predefined = {
EMsg.ServiceMethodResponse: steammessages_clientserver_2_pb2.CMsgClientServiceMethodResponse,
EMsg.ClientGetNumberOfCurrentPlayersDP: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayers,
EMsg.ClientGetNumberOfCurrentPlayersDPResponse: steammessages_clientserver_2_pb2.CMsgDPGetNumberOfCurrentPlayersResponse,
EMsg.ClientCreateAccountProto: steammessages_clientserver_2_pb2.CMsgClientCreateAccount,
EMsg.ClientCreateAccountProtoResponse: steammessages_clientserver_2_pb2.CMsgClientCreateAccountResponse,
EMsg.ClientEmailChange4: steammessages_clientserver_2_pb2.CMsgClientEmailChange,
EMsg.ClientEmailChangeResponse4: steammessages_clientserver_2_pb2.CMsgClientEmailChangeResponse,
EMsg.ClientLogonGameServer: steammessages_clientserver_login_pb2.CMsgClientLogon,

Loading…
Cancel
Save