mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
isDispatcher stuff.
This commit is contained in:
parent
b2a70f29fe
commit
eb2deeb801
@ -137,7 +137,7 @@ def reply(msg, s, prefixName=True, private=False,
|
|||||||
s = ircutils.safeArgument(s)
|
s = ircutils.safeArgument(s)
|
||||||
if not s:
|
if not s:
|
||||||
s = 'Error: I tried to send you an empty message.'
|
s = 'Error: I tried to send you an empty message.'
|
||||||
if prefixName and ircutils.isChannel(target):
|
if prefixName and not any(ircutils.isChannel, [target, to]):
|
||||||
s = '%s: %s' % (to, s)
|
s = '%s: %s' % (to, s)
|
||||||
# And now, let's decide whether it's a PRIVMSG or a NOTICE.
|
# And now, let's decide whether it's a PRIVMSG or a NOTICE.
|
||||||
msgmaker = ircmsgs.privmsg
|
msgmaker = ircmsgs.privmsg
|
||||||
@ -764,8 +764,10 @@ class Privmsg(irclib.IrcCallback):
|
|||||||
dispatcher = utils.changeFunctionName(dispatcher, canonicalname)
|
dispatcher = utils.changeFunctionName(dispatcher, canonicalname)
|
||||||
if self._original:
|
if self._original:
|
||||||
dispatcher.__doc__ = self._original.__doc__
|
dispatcher.__doc__ = self._original.__doc__
|
||||||
|
dispatcher.isDispatcher = False
|
||||||
else:
|
else:
|
||||||
dispatcher.__doc__ = docstring
|
dispatcher.__doc__ = docstring
|
||||||
|
dispatcher.isDispatcher = True
|
||||||
setattr(self.__class__, canonicalname, dispatcher)
|
setattr(self.__class__, canonicalname, dispatcher)
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
|
Loading…
Reference in New Issue
Block a user