def letmein(message): """Invites the user to the private channel, if they provide their username and password""" # P redundancy msg = message.get_msg().split() if len(msg) != 3: message.alert("!letmein user pass") return try: user = CUT.auth_user(message.get_nick(), message.get_pnick, username=msg[1], password=msg[2]) if (user is not None) and user.is_member(): message.invite(message.get_nick(), Config.get("Channels","home")) except UserError: message.alert("You don't have access to this command")
def auth(message): """Authenticates the user, if they provide their username and password""" # P redundancy msg = message.get_msg().split() if len(msg) != 3: message.alert("!auth user pass") return try: user = CUT.auth_user(message.get_nick(), message.get_pnick, username=msg[1], password=msg[2]) if user is not None: message.reply("You have been authenticated as %s" % (user.name,)) except UserError: message.alert("You don't have access to this command")
def letmein(message): """Invites the user to the private channel, if they provide their username and password""" # P redundancy msg = message.get_msg().split() if len(msg) != 3: message.alert("!letmein user pass") return try: chan = message.get_chan() if message.in_chan() else None user = CUT.auth_user(message.get_nick(), chan, message.get_pnick, username=msg[1], password=msg[2]) if (user is not None) and user.is_member(): message.invite(message.get_nick(), Config.get("Channels","home")) except UserError: message.alert("You don't have access to this command")
def auth(message): """Authenticates the user, if they provide their username and password""" # P redundancy msg = message.get_msg().split() if len(msg) != 3: message.alert("!auth user pass") return try: chan = message.get_chan() if message.in_chan() else None user = CUT.auth_user(message.get_nick(), chan, message.get_pnick, username=msg[1], password=msg[2]) if user is not None: message.reply("You have been authenticated as %s" % (user.name,)) except UserError: message.alert("You don't have access to this command")