Hook factorisation ; add new hooks : default (same comportement has previous version) and one hook before any parsing

When calling a hook, passed parameters change according to associated data variable
This commit is contained in:
Némunaire 2012-08-22 21:05:33 +02:00
commit 7e20368c10
8 changed files with 109 additions and 63 deletions

View file

@ -78,7 +78,7 @@ def print_station_status(msg, station):
else:
msg.send_chn("%s: station %s inconnue." % (msg.nick, station))
def ask_stations(data, msg):
def ask_stations(msg):
"""Hook entry from !velib"""
global DATAS
if len(msg.cmd) > 5: