Modify context reload for better maintainability

This commit is contained in:
nemunaire 2014-10-09 07:39:38 +02:00
commit 4776fbe931
7 changed files with 83 additions and 16 deletions

View file

@ -16,6 +16,8 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import imp
from exception import IRCException
def call_game(call, *args, **kargs):
@ -74,3 +76,11 @@ def hook(store, *args, **kargs):
last_registered.append((store, MessageHook(call, *args, **kargs)))
return call
return sec
def reload():
import hooks.manager
imp.reload(hooks.manager)
import hooks.messagehook
imp.reload(hooks.messagehook)