mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
Irc: add a getFullNetworkName() function
This commit is contained in:
parent
75b5be5baf
commit
b3161d6d5d
10
classes.py
10
classes.py
@ -1043,7 +1043,8 @@ class Irc():
|
||||
|
||||
def getFriendlyName(self, entityid):
|
||||
"""
|
||||
Returns the friendly name of a SID or UID (server name for SIDs, nick for UID)."""
|
||||
Returns the friendly name of a SID or UID (server name for SIDs, nick for UID).
|
||||
"""
|
||||
if entityid in self.servers:
|
||||
return self.servers[entityid].name
|
||||
elif entityid in self.users:
|
||||
@ -1051,6 +1052,13 @@ class Irc():
|
||||
else:
|
||||
raise KeyError("Unknown UID/SID %s" % entityid)
|
||||
|
||||
def getFullNetworkName(self):
|
||||
"""
|
||||
Returns the full network name (as defined by the "netname" option), or the
|
||||
short network name if that isn't defined.
|
||||
"""
|
||||
return self.serverdata.get('netname', self.name)
|
||||
|
||||
def isOper(self, uid, allowAuthed=True, allowOper=True):
|
||||
"""
|
||||
Returns whether the given user has operator status on PyLink. This can be achieved
|
||||
|
Loading…
Reference in New Issue
Block a user