mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-09 02:54:14 +01:00
unreal: rename _convertNick => _getNick
This commit is contained in:
parent
4f4ad7b54d
commit
2fc0e086ae
@ -220,8 +220,9 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
elif cap == 'SJ3':
|
elif cap == 'SJ3':
|
||||||
self.caps['SJ3'] = True
|
self.caps['SJ3'] = True
|
||||||
|
|
||||||
def _convertNick(self, target):
|
def _getNick(self, target):
|
||||||
"""Converts a nick argument to its matching UID."""
|
"""Converts a nick argument to its matching UID. This differs from utils.nickToUid()
|
||||||
|
in that it returns the original text instead of None, if no matching nick is found."""
|
||||||
target = utils.nickToUid(self.irc, target) or target
|
target = utils.nickToUid(self.irc, target) or target
|
||||||
if target not in self.irc.users:
|
if target not in self.irc.users:
|
||||||
log.warning("(%s) Possible desync? Got command target %s, who "
|
log.warning("(%s) Possible desync? Got command target %s, who "
|
||||||
@ -268,7 +269,7 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
|
|
||||||
def handle_privmsg(self, source, command, args):
|
def handle_privmsg(self, source, command, args):
|
||||||
# Convert nicks to UIDs, where they exist.
|
# Convert nicks to UIDs, where they exist.
|
||||||
target = self._convertNick(args[0])
|
target = self._getNick(args[0])
|
||||||
# We use lowercase channels internally, but uppercase UIDs.
|
# We use lowercase channels internally, but uppercase UIDs.
|
||||||
if utils.isChannel(target):
|
if utils.isChannel(target):
|
||||||
target = utils.toLower(self.irc, target)
|
target = utils.toLower(self.irc, target)
|
||||||
|
Loading…
Reference in New Issue
Block a user