remove unnecessary method, preferring register_handlers
This commit is contained in:
parent
22615d7b9a
commit
7a9b68f2c4
|
@ -64,10 +64,6 @@ class Module(object):
|
||||||
# print what was loaded, for debugging
|
# print what was loaded, for debugging
|
||||||
print("loaded " + self.__class__.__name__)
|
print("loaded " + self.__class__.__name__)
|
||||||
|
|
||||||
def attach_to_server(self, server):
|
|
||||||
"""Call register_handlers against the given server."""
|
|
||||||
self.register_handlers(server)
|
|
||||||
|
|
||||||
def register_handlers(self, server):
|
def register_handlers(self, server):
|
||||||
"""
|
"""
|
||||||
Hook handler functions into the IRC library. This is called by __init__ and sets
|
Hook handler functions into the IRC library. This is called by __init__ and sets
|
||||||
|
|
|
@ -148,7 +148,7 @@ try:
|
||||||
__import__(modstr)
|
__import__(modstr)
|
||||||
module = sys.modules[modstr]
|
module = sys.modules[modstr]
|
||||||
botmod = eval('module.' + mod + '(config, server, modlist)')
|
botmod = eval('module.' + mod + '(config, server, modlist)')
|
||||||
botmod.attach_to_server(server)
|
botmod.register_handlers(server)
|
||||||
except NoSectionError as e:
|
except NoSectionError as e:
|
||||||
print("You seem to be missing a modules config section, which you probably wanted.")
|
print("You seem to be missing a modules config section, which you probably wanted.")
|
||||||
except NoOptionError as e:
|
except NoOptionError as e:
|
||||||
|
|
Loading…
Reference in New Issue