From ef6758e14b9a7cd42388e5fcd72dd25066060b0b Mon Sep 17 00:00:00 2001 From: "Vgr E. Barry" Date: Fri, 13 Apr 2018 16:55:12 -0400 Subject: [PATCH] Remove unused function (nick variant is still used in a few places) --- src/users.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/users.py b/src/users.py index 5331a5a..e2071e2 100644 --- a/src/users.py +++ b/src/users.py @@ -118,30 +118,6 @@ def add(nick, **blah): # backwards-compatible API var.USERS[nick] = blah return _user(nick) -def _exists(nick=None, ident=None, host=None, realname=None, account=None, *, allow_multiple=False, allow_bot=False): - """Return True if a matching user exists. - - Positional and keyword arguments are the same as get(), with the - exception of allow_none. - - """ - - sentinel = object() - - if ident is None and host is None and nick is not None: - nick, ident, host = parse_rawnick(nick) - - cls = User - if predicate(nick): - cls = FakeUser - - temp = cls(sentinel, nick, ident, host, realname, account) - - if temp.client is sentinel: # doesn't exist; if it did, the client would be an actual client - return False - - return temp is not Bot or allow_bot - def exists(nick, *stuff, **morestuff): # backwards-compatible API return nick in var.USERS