Remove unused function (nick variant is still used in a few places)
This commit is contained in:
parent
7154a7d092
commit
ef6758e14b
24
src/users.py
24
src/users.py
@ -118,30 +118,6 @@ def add(nick, **blah): # backwards-compatible API
|
|||||||
var.USERS[nick] = blah
|
var.USERS[nick] = blah
|
||||||
return _user(nick)
|
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
|
def exists(nick, *stuff, **morestuff): # backwards-compatible API
|
||||||
return nick in var.USERS
|
return nick in var.USERS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user