Move stripformatting from Format to Filter, for consistency

This commit is contained in:
Valentin Lorentz 2021-08-28 23:36:05 +02:00
parent d593f84a66
commit 52a5cefd50
4 changed files with 13 additions and 13 deletions

View File

@ -126,6 +126,11 @@ squish <text>
stripcolor <text>
Returns <text> stripped of all color codes.
.. _command-filter-stripformatting:
stripformatting <text>
Strips bold, underline, and colors from <text>.
.. _command-filter-supa1337:
supa1337 <text>

View File

@ -84,7 +84,7 @@ class Filter(callbacks.Plugin):
'scramble', 'morse', 'reverse', 'colorize', 'squish',
'supa1337', 'stripcolor', 'aol', 'rainbow', 'spellit',
'hebrew', 'undup', 'uwu', 'gnu', 'shrink', 'uniud', 'capwords',
'caps', 'vowelrot']
'caps', 'vowelrot', 'stripformatting']
@internationalizeDocstring
def outfilter(self, irc, msg, args, channel, command):
"""[<channel>] [<command>]
@ -421,6 +421,13 @@ class Filter(callbacks.Plugin):
irc.reply(''.join(L) + '\x03')
rainbow = wrap(rainbow, ['text'])
@wrap(['text'])
def stripformatting(self, irc, msg, args, text):
"""<text>
Strips bold, underline, and colors from <text>."""
irc.reply(ircutils.stripFormatting(text))
@internationalizeDocstring
def stripcolor(self, irc, msg, args, text):
"""<text>

View File

@ -79,11 +79,6 @@ repr <text>
reverse <text>
Returns <text> in reverse-video.
.. _command-format-stripformatting:
stripformatting <text>
Strips bold, underline, and colors from <text>.
.. _command-format-title:
title <text>

View File

@ -50,13 +50,6 @@ class Format(callbacks.Plugin):
irc.reply(ircutils.bold(text))
bold = wrap(bold, ['text'])
@wrap(['text'])
def stripformatting(self, irc, msg, args, text):
"""<text>
Strips bold, underline, and colors from <text>."""
irc.reply(ircutils.stripFormatting(text))
@internationalizeDocstring
def reverse(self, irc, msg, args, text):
"""<text>