mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 20:22:36 +01:00
Use plugins.standardSubstitute in supybot.replies.
This commit is contained in:
parent
07733594e9
commit
d2e1d80b27
@ -1,3 +1,7 @@
|
|||||||
|
* Made standard replies (such as supybot.replies.success, etc.)
|
||||||
|
use the standard substitute (such as $nick, $who, $channel, etc.)
|
||||||
|
in their text.
|
||||||
|
|
||||||
* Fixed snarfers to respect lobotomies.
|
* Fixed snarfers to respect lobotomies.
|
||||||
|
|
||||||
* Fixed Admin.join not to add the channel to the supybot.channels
|
* Fixed Admin.join not to add the channel to the supybot.channels
|
||||||
|
@ -61,6 +61,7 @@ import utils
|
|||||||
import world
|
import world
|
||||||
import ircdb
|
import ircdb
|
||||||
import irclib
|
import irclib
|
||||||
|
import plugins
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import ircutils
|
import ircutils
|
||||||
|
|
||||||
@ -322,13 +323,15 @@ def checkCommandCapability(msg, cb, command):
|
|||||||
|
|
||||||
|
|
||||||
class RichReplyMethods(object):
|
class RichReplyMethods(object):
|
||||||
"""This is a mixin so these replies need only be defined once."""
|
"""This is a mixin so these replies need only be defined once. It operates
|
||||||
|
under several assumptions, including the fact that "self" is an Irc object
|
||||||
|
of some sort and there is a self.msg that is an IrcMsg."""
|
||||||
def __makeReply(self, prefix, s):
|
def __makeReply(self, prefix, s):
|
||||||
if s:
|
if s:
|
||||||
s = '%s %s' % (prefix, s)
|
s = '%s %s' % (prefix, s)
|
||||||
else:
|
else:
|
||||||
s = prefix
|
s = prefix
|
||||||
return s
|
return plugins.standardSubstitute(self, self.msg, s)
|
||||||
|
|
||||||
def replySuccess(self, s='', **kwargs):
|
def replySuccess(self, s='', **kwargs):
|
||||||
v = conf.supybot.replies.success.get(self.msg.args[0])()
|
v = conf.supybot.replies.success.get(self.msg.args[0])()
|
||||||
|
@ -40,7 +40,6 @@ import csv
|
|||||||
import sys
|
import sys
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
import types
|
|
||||||
import random
|
import random
|
||||||
import urllib2
|
import urllib2
|
||||||
import UserDict
|
import UserDict
|
||||||
@ -51,11 +50,7 @@ import log
|
|||||||
import conf
|
import conf
|
||||||
import utils
|
import utils
|
||||||
import world
|
import world
|
||||||
import ircdb
|
|
||||||
import ircutils
|
import ircutils
|
||||||
import privmsgs
|
|
||||||
import callbacks
|
|
||||||
import structures
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mxCrap = {}
|
mxCrap = {}
|
||||||
|
Loading…
Reference in New Issue
Block a user