def has_privs(self, user, lowest_mode='<STR_LIT:o>'):
if isinstance(user, User):<EOL><INDENT>user = user.nick<EOL><DEDENT>user_prefixes = self.prefixes.get(user, None)<EOL>if not user_prefixes:<EOL><INDENT>return False<EOL><DEDENT>mode_dict = self.s.features.available['<STR_LIT>']<EOL>caught = False<EOL>for mode, prefix in mode_dict.items():<EOL><INDENT>if mode in lowest_mode and not caught:<EOL><INDENT>caught = True<EOL><DEDENT>elif mode not in lowest_mode and not caught:<EOL><INDENT>continue<EOL><DEDENT>if prefix in user_prefixes:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Return True if user has the given mode or higher.