diff --git a/classes.py b/classes.py index 89fe552..23aceda 100644 --- a/classes.py +++ b/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