Skip to content

Commit 52a5cef

Browse files
committed
Move stripformatting from Format to Filter, for consistency
1 parent d593f84 commit 52a5cef

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

plugins/Filter/README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ squish <text>
126126
stripcolor <text>
127127
Returns <text> stripped of all color codes.
128128

129+
.. _command-filter-stripformatting:
130+
131+
stripformatting <text>
132+
Strips bold, underline, and colors from <text>.
133+
129134
.. _command-filter-supa1337:
130135

131136
supa1337 <text>

plugins/Filter/plugin.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def outFilter(self, irc, msg):
8484
'scramble', 'morse', 'reverse', 'colorize', 'squish',
8585
'supa1337', 'stripcolor', 'aol', 'rainbow', 'spellit',
8686
'hebrew', 'undup', 'uwu', 'gnu', 'shrink', 'uniud', 'capwords',
87-
'caps', 'vowelrot']
87+
'caps', 'vowelrot', 'stripformatting']
8888
@internationalizeDocstring
8989
def outfilter(self, irc, msg, args, channel, command):
9090
"""[<channel>] [<command>]
@@ -421,6 +421,13 @@ def rainbow(self, irc, msg, args, text):
421421
irc.reply(''.join(L) + '\x03')
422422
rainbow = wrap(rainbow, ['text'])
423423

424+
@wrap(['text'])
425+
def stripformatting(self, irc, msg, args, text):
426+
"""<text>
427+
428+
Strips bold, underline, and colors from <text>."""
429+
irc.reply(ircutils.stripFormatting(text))
430+
424431
@internationalizeDocstring
425432
def stripcolor(self, irc, msg, args, text):
426433
"""<text>

plugins/Format/README.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ repr <text>
7979
reverse <text>
8080
Returns <text> in reverse-video.
8181

82-
.. _command-format-stripformatting:
83-
84-
stripformatting <text>
85-
Strips bold, underline, and colors from <text>.
86-
8782
.. _command-format-title:
8883

8984
title <text>

plugins/Format/plugin.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ def bold(self, irc, msg, args, text):
5050
irc.reply(ircutils.bold(text))
5151
bold = wrap(bold, ['text'])
5252

53-
@wrap(['text'])
54-
def stripformatting(self, irc, msg, args, text):
55-
"""<text>
56-
57-
Strips bold, underline, and colors from <text>."""
58-
irc.reply(ircutils.stripFormatting(text))
59-
6053
@internationalizeDocstring
6154
def reverse(self, irc, msg, args, text):
6255
"""<text>

0 commit comments

Comments
 (0)