mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Some more .__class__.__name__ -> name() conversions.
This commit is contained in:
parent
7971760790
commit
0e505d89e1
@ -59,7 +59,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
for cb in irc.callbacks:
|
for cb in irc.callbacks:
|
||||||
cls = cb.__class__
|
cls = cb.__class__
|
||||||
if cls.__name__.lower().startswith(name) and \
|
if cls.name().lower().startswith(name) and \
|
||||||
not issubclass(cls, callbacks.PrivmsgRegexp) and \
|
not issubclass(cls, callbacks.PrivmsgRegexp) and \
|
||||||
issubclass(cls, callbacks.Privmsg):
|
issubclass(cls, callbacks.Privmsg):
|
||||||
commands = [x for x in cls.__dict__
|
commands = [x for x in cls.__dict__
|
||||||
@ -192,7 +192,7 @@ class MiscCommands(callbacks.Privmsg):
|
|||||||
command = privmsgs.getArgs(args)
|
command = privmsgs.getArgs(args)
|
||||||
Class = irc.findCallback(command)
|
Class = irc.findCallback(command)
|
||||||
if Class is not None:
|
if Class is not None:
|
||||||
irc.reply(msg, Class.__class__.__name__)
|
irc.reply(msg, Class.name())
|
||||||
else:
|
else:
|
||||||
irc.error(msg, 'There is no such command %s' % command)
|
irc.error(msg, 'There is no such command %s' % command)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user