Use plugins.standardSubstitute in supybot.replies.

This commit is contained in:
Jeremy Fincher 2004-02-24 21:20:31 +00:00
parent 07733594e9
commit d2e1d80b27
3 changed files with 9 additions and 7 deletions

View File

@ -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 Admin.join not to add the channel to the supybot.channels

View File

@ -61,6 +61,7 @@ import utils
import world
import ircdb
import irclib
import plugins
import ircmsgs
import ircutils
@ -322,13 +323,15 @@ def checkCommandCapability(msg, cb, command):
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):
if s:
s = '%s %s' % (prefix, s)
else:
s = prefix
return s
return plugins.standardSubstitute(self, self.msg, s)
def replySuccess(self, s='', **kwargs):
v = conf.supybot.replies.success.get(self.msg.args[0])()

View File

@ -40,7 +40,6 @@ import csv
import sys
import sets
import time
import types
import random
import urllib2
import UserDict
@ -51,11 +50,7 @@ import log
import conf
import utils
import world
import ircdb
import ircutils
import privmsgs
import callbacks
import structures
try:
mxCrap = {}