mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-27 05:21:10 -05:00
CtcpNext: strip formatting, don't allow overriding ACTION/PING
This commit is contained in:
parent
9324d78dee
commit
076fb79afe
@ -116,7 +116,11 @@ class CtcpNext(callbacks.PluginRegexp):
|
|||||||
ACTION and PING, which are handled accordingly. All the standard
|
ACTION and PING, which are handled accordingly. All the standard
|
||||||
substitutes ($version, $now, $nick, etc.) are handled properly.
|
substitutes ($version, $now, $nick, etc.) are handled properly.
|
||||||
"""
|
"""
|
||||||
self.db[ctcp.upper()] = response
|
ctcp = ctcp.upper()
|
||||||
|
if ctcp in ('ACTION', 'PING'):
|
||||||
|
irc.error('Replies for CTCP ACTION and PING cannot be overridden.',
|
||||||
|
Raise=True)
|
||||||
|
self.db[ctcp] = response
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
set = wrap(set, ['admin', 'somethingWithoutSpaces', 'text'])
|
set = wrap(set, ['admin', 'somethingWithoutSpaces', 'text'])
|
||||||
|
|
||||||
@ -138,8 +142,9 @@ class CtcpNext(callbacks.PluginRegexp):
|
|||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
|
|
||||||
Lists the CTCP responses currently configured."""
|
Lists the CTCP responses currently configured."""
|
||||||
items = [format("%s: %s", k, ircutils.bold(v)) for (k, v) in self.db.items()]
|
items = [format("%s: %s", k, ircutils.bold(v) + "\x0f")
|
||||||
irc.reply(format('%L', items))
|
for (k, v) in self.db.items()]
|
||||||
|
irc.reply(format('%L', sorted(items)))
|
||||||
|
|
||||||
def clear(self, irc, msg, args):
|
def clear(self, irc, msg, args):
|
||||||
"""takes no arguments.
|
"""takes no arguments.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user