def create_normal_player(session, name, password):
 if _throttle(session, maxlim=5, timeout=(5 * 60)):
  session.msg('{RYou made too many connection attempts. Try again in a few minutes.{n')
  return None
 player = authenticate(username=name, password=password)
 if (not player):
  session.msg('Incorrect login information given.')
  _throttle(session)
  player = PlayerDB.objects.get_player_from_name(name)
  if player:
   player.at_failed_login(session)
  return None
 bans = ServerConfig.objects.conf('server_bans')
 if (bans and (any(((tup[0] == player.name.lower()) for tup in bans)) or any((tup[2].match(session.address) for tup in bans if tup[2])))):
  string = '{rYou have been banned and cannot continue from here.\nIf you feel this ban is in error, please email an admin.{x'
  session.msg(string)
  session.sessionhandler.disconnect(session, 'Good bye! Disconnecting.')
  return None
 return player

def create_normal_player ( session , name , password ) : if _throttle ( session , maxlim = 5 , timeout = ( 5 * 60 ) ) : session . msg ( '{RYou made too many connection attempts. Try again in a few minutes.{n' ) return None player = authenticate ( username = name , password = password ) if ( not player ) : session . msg ( 'Incorrect login information given.' ) _throttle ( session ) player = PlayerDB . objects . get_player_from_name ( name ) if player : player . at_failed_login ( session ) return None bans = ServerConfig . objects . conf ( 'server_bans' ) if ( bans and ( any ( ( ( tup [ 0 ] == player . name . lower ( ) ) for tup in bans ) ) or any ( ( tup [ 2 ] . match ( session . address ) for tup in bans if tup [ 2 ] ) ) ) ) : string = '{rYou have been banned and cannot continue from here.\nIf you feel this ban is in error, please email an admin.{x' session . msg ( string ) session . sessionhandler . disconnect ( session , 'Good bye! Disconnecting.' ) return None return player
creates a player with the given name and password .