def func(self):
        playername = self.args

        # sanity check on the name
        if not re.findall('^[\w. @+-]+$', playername) or not (3 <= len(playername) <= 30):
            self.caller.msg("\n\r {rAccount name should be between 3 and 30 characters. Letters, spaces, dig\
its and @/./+/-/_ only.{n") # this echoes the restrictions made by django's auth module.
            self.menutree.goto("node2a")
            return
        if managers.players.get_player_from_name(playername):
            self.caller.msg("\n\r {rAccount name %s already exists.{n" % playername)
            self.menutree.goto("node2a")
            return
        # store the name for the next step
        self.menutree.playername = playername
        self.caller.msg(echo=False)
        self.menutree.goto("node2b")


# Menu entry 2b - Creating a Password
Execute the command
dataset/ETHPy150Open evennia/evennia/evennia/contrib/menu_login.py/CmdUsernameCreate.func