Fix bug #1030367, supybot.replywithNickPrefix doesn't obey channel value

This commit is contained in:
James Vega 2004-09-21 01:32:26 +00:00
parent 535f4a164f
commit 781ba32793
1 changed files with 8 additions and 4 deletions

View File

@ -406,7 +406,7 @@ class RichReplyMethods(object):
def _getConfig(self, wrapper): def _getConfig(self, wrapper):
return conf.get(wrapper, self.msg.args[0]) return conf.get(wrapper, self.msg.args[0])
def replySuccess(self, s='', **kwargs): def replySuccess(self, s='', **kwargs):
v = self._getConfig(conf.supybot.replies.success) v = self._getConfig(conf.supybot.replies.success)
s = self.__makeReply(v, s) s = self.__makeReply(v, s)
@ -526,7 +526,11 @@ class IrcObjectProxy(RichReplyMethods):
self.notice = None self.notice = None
self.private = None self.private = None
self.noLengthCheck = None self.noLengthCheck = None
self.prefixName = conf.supybot.reply.withNickPrefix() if ircutils.isChannel(self.msg.args[0]):
self.prefixName = conf.get(conf.supybot.reply.withNickPrefix,
self.msg.args[0])
else:
self.prefixName = conf.supybot.reply.withNickPrefix()
def evalArgs(self): def evalArgs(self):
while self.counter < len(self.args): while self.counter < len(self.args):
@ -556,7 +560,7 @@ class IrcObjectProxy(RichReplyMethods):
except Exception, e: except Exception, e:
log.exception('Uncaught exception in %s.tokenizedCommand.' % log.exception('Uncaught exception in %s.tokenizedCommand.' %
cb.name()) cb.name())
def _callInvalidCommands(self): def _callInvalidCommands(self):
log.debug('Calling invalidCommands.') log.debug('Calling invalidCommands.')
for cb in self.irc.callbacks: for cb in self.irc.callbacks:
@ -789,7 +793,7 @@ class IrcObjectProxy(RichReplyMethods):
def noReply(self): def noReply(self):
self.msg.tag('repliedTo') self.msg.tag('repliedTo')
def getRealIrc(self): def getRealIrc(self):
"""Returns the real irclib.Irc object underlying this proxy chain.""" """Returns the real irclib.Irc object underlying this proxy chain."""
if isinstance(self.irc, irclib.Irc): if isinstance(self.irc, irclib.Irc):