2 * ion/mod_mgmtmode/main.c
4 * Copyright (c) Tuomo Valkonen 2004-2006.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
12 #include <libextl/readconfig.h>
13 #include <ioncore/saveload.h>
14 #include <ioncore/bindmaps.h>
18 /*{{{ Module information */
21 #include "../version.h"
23 char mod_mgmtmode_ion_api_version[]=ION_API_VERSION;
32 WBindmap *mod_mgmtmode_bindmap=NULL;
38 /*{{{ Init & deinit */
41 void mod_mgmtmode_deinit()
43 if(mod_mgmtmode_bindmap!=NULL){
44 ioncore_free_bindmap("WMgmtMode", mod_mgmtmode_bindmap);
45 mod_mgmtmode_bindmap=NULL;
48 mod_mgmtmode_unregister_exports();
52 bool mod_mgmtmode_init()
54 mod_mgmtmode_bindmap=ioncore_alloc_bindmap("WMgmtMode", NULL);
56 if(mod_mgmtmode_bindmap==NULL)
59 if(!mod_mgmtmode_register_exports()){
60 mod_mgmtmode_deinit();
64 extl_read_config("cfg_mgmtmode", NULL, TRUE);