Fixed szt's incompetence
This commit is contained in:
parent
c5e223a03f
commit
f8d80c3177
|
@ -329,11 +329,11 @@ class Useless(DatabasePlugin):
|
||||||
def halfwidth(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def halfwidth(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
||||||
"""Turns UPPERCASE words into halfwidth characters
|
"""Turns UPPERCASE words into halfwidth characters
|
||||||
|
|
||||||
%%halfwidth <text>
|
%%halfwidth <text>...
|
||||||
"""
|
"""
|
||||||
def halfwidth_replace(match):
|
def halfwidth_replace(match):
|
||||||
return "".join(chr(0xFF20+(ord(c)-64)) for c in match.group(0))
|
return ''.join(chr(0xFF20 + (ord(c) - 64)) for c in match.group(0))
|
||||||
return "[HALFWIDTH] {}".format(re.sub(r'(?:\b)[A-Z]+(?:\b)', halfwidth_replace, args.get('<word>')))
|
return '[HALFWIDTH] {}'.format(re.sub(r'(?:\b)[A-Z]+(?:\b)', halfwidth_replace, ' '.join(args['<text>'])))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def asshole(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def asshole(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user