using System; using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; namespace Kelsier.Common { static public class Info { static public Database db; static public Logger log; static public string moduledir; static private Dictionary _modules = new Dictionary(); static private Dictionary _hooks = new Dictionary(); static private Dictionary _bots = new Dictionary(); static public Dictionary modules { get { return _modules; } } static public Dictionary hooks { get { return _hooks; } } static public Dictionary bots { get { return _bots; } } static public void refreshmods() { foreach (string name in Info.modules.Keys) unloadmod(name); string[] modulefiles; modulefiles = Directory.GetFiles(moduledir + @"\autoload"); foreach (string file in modulefiles) loadmodfile(file); } static public void loadmodfile(string file) { } static public void loadmod(string name) { string filename = name + ".kel.dll"; if (File.Exists(moduledir + @"\autoload\" + filename)) loadmodfile(moduledir + @"\autoload\" + filename); else if (File.Exists(moduledir + @"\" + filename)) loadmodfile(moduledir + @"\" + filename); else throw new FileNotFoundException(); } static public void unloadmod(string name) { } static public void reloadmod(string name) { } } }