mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-10 12:12:33 +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 Admin.join not to add the channel to the supybot.channels
|
||||
|
@ -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])()
|
||||
|
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user