mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-30 14:59:34 +01:00
Don't tell owner to contact an admin. Closes GH-20.
This commit is contained in:
parent
aefe980956
commit
693ba6aba0
@ -423,6 +423,10 @@ class RichReplyMethods(object):
|
|||||||
|
|
||||||
def replyError(self, s='', **kwargs):
|
def replyError(self, s='', **kwargs):
|
||||||
v = self._getConfig(conf.supybot.replies.error)
|
v = self._getConfig(conf.supybot.replies.error)
|
||||||
|
if 'msg' in kwargs:
|
||||||
|
msg = kwargs['msg']
|
||||||
|
if ircdb.checkCapability(msg.prefix, 'owner'):
|
||||||
|
v = self._getConfig(conf.supybot.replies.errorOwner)
|
||||||
s = self.__makeReply(v, s)
|
s = self.__makeReply(v, s)
|
||||||
return self.reply(s, **kwargs)
|
return self.reply(s, **kwargs)
|
||||||
|
|
||||||
@ -1205,7 +1209,7 @@ class Commands(BasePlugin):
|
|||||||
if conf.supybot.reply.error.detailed():
|
if conf.supybot.reply.error.detailed():
|
||||||
irc.error(utils.exnToString(e))
|
irc.error(utils.exnToString(e))
|
||||||
else:
|
else:
|
||||||
irc.replyError()
|
irc.replyError(msg=msg)
|
||||||
|
|
||||||
def getCommandHelp(self, command, simpleSyntax=None):
|
def getCommandHelp(self, command, simpleSyntax=None):
|
||||||
method = self.getCommandMethod(command)
|
method = self.getCommandMethod(command)
|
||||||
|
@ -484,6 +484,11 @@ registerChannelValue(supybot.replies, 'error',
|
|||||||
Determines what error message the bot gives when it wants to be
|
Determines what error message the bot gives when it wants to be
|
||||||
ambiguous.""")))
|
ambiguous.""")))
|
||||||
|
|
||||||
|
registerChannelValue(supybot.replies, 'errorOwner',
|
||||||
|
registry.NormalizedString(_("""An error has occurred and has been logged.
|
||||||
|
Check the logs for more informations."""), _("""Determines what error
|
||||||
|
message the bot gives to the owner when it wants to be ambiguous.""")))
|
||||||
|
|
||||||
registerChannelValue(supybot.replies, 'incorrectAuthentication',
|
registerChannelValue(supybot.replies, 'incorrectAuthentication',
|
||||||
registry.NormalizedString(_("""Your hostmask doesn't match or your password
|
registry.NormalizedString(_("""Your hostmask doesn't match or your password
|
||||||
is wrong."""), _("""Determines what message the bot replies with when
|
is wrong."""), _("""Determines what message the bot replies with when
|
||||||
|
Loading…
Reference in New Issue
Block a user