3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00

Irc: use int values for ircmatch casemapping

The ircmatch version with casemapping variables hasn't been released on pip yet.
This commit is contained in:
James Lu 2016-07-23 21:51:26 -07:00
parent e2a853c98e
commit 39675e15e8

View File

@ -925,7 +925,10 @@ class Irc():
against the target's IP address and real host, respectively. against the target's IP address and real host, respectively.
""" """
# Get the corresponding casemapping value used by ircmatch. # Get the corresponding casemapping value used by ircmatch.
casemapping = getattr(ircmatch, self.proto.casemapping) if self.proto.casemapping == 'rfc1459':
casemapping = 0
else:
casemapping = 1
# Try to convert target into a UID. If this fails, it's probably a hostname. # Try to convert target into a UID. If this fails, it's probably a hostname.
target = self.nickToUid(target) or target target = self.nickToUid(target) or target