From 722881bc33cc75375dd135f71475690aad8f1e9a Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 31 May 2019 18:13:21 -0700 Subject: [PATCH] inspircd: fix incorrect lstrip() usage when mangling mode names --- protocols/inspircd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 2a4c3e2..ebf37d3 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -566,8 +566,8 @@ class InspIRCdProtocol(TS6BaseProtocol): self.prefixmodes[char[-1]] = char[0] # Strip c_, u_ prefixes to be consistent with other protocols. - name = name.lstrip('c_') - name = name.lstrip('u_') + if name.startswith(('c_', 'u_')): + name = name[2:] if name == 'reginvite': # Reginvite? That's an odd name. name = 'regonly'