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

Irc: use int values for ircmatch casemapping

The ircmatch version with casemapping variables hasn't been released on pip yet.

(cherry picked from commit 39675e15e8)
This commit is contained in:
James Lu 2016-07-23 21:51:26 -07:00
parent 3b62d0af3e
commit 795c163a69

View File

@ -924,7 +924,10 @@ class Irc():
against the target's IP address and real host, respectively.
"""
# 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.
target = self.nickToUid(target) or target