More explicit module unloading messages
This commit is contained in:
parent
582da6746f
commit
1464f92c87
1 changed files with 2 additions and 1 deletions
3
bot.py
3
bot.py
|
@ -228,7 +228,7 @@ class Bot:
|
|||
def unload_module(self, name, verb=False):
|
||||
"""Unload a module"""
|
||||
if name in self.modules:
|
||||
print (name)
|
||||
self.modules[name].print_debug("Unloading module %s" % name)
|
||||
self.modules[name].save()
|
||||
if hasattr(self.modules[name], "unload"):
|
||||
self.modules[name].unload(self)
|
||||
|
@ -240,6 +240,7 @@ class Bot:
|
|||
self.del_event(e)
|
||||
# Remove from the dict
|
||||
del self.modules[name]
|
||||
print(" Module `%s' successfully unloaded." % name)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue