3 using System.Collections.Generic;
7 namespace Kelsier.Common {
8 static public class Info {
9 static public Database db;
10 static public Logger log;
12 static public string moduledir;
14 static private Dictionary<string, IModule> _modules = new Dictionary<string,IModule>();
15 static private Dictionary<string, Hook> _hooks = new Dictionary<string,Hook>();
16 static private Dictionary<int, Bot> _bots = new Dictionary<int,Bot>();
18 static public Dictionary<string, IModule> modules { get { return _modules; } }
19 static public Dictionary<string, Hook> hooks { get { return _hooks; } }
20 static public Dictionary<int, Bot> bots { get { return _bots; } }
23 static public void refreshmods() {
24 foreach (string name in Info.modules.Keys)
28 modulefiles = Directory.GetFiles(moduledir + @"\autoload");
30 foreach (string file in modulefiles)
34 static public void loadmodfile(string file) {
37 static public void loadmod(string name) {
38 string filename = name + ".kel.dll";
39 if (File.Exists(moduledir + @"\autoload\" + filename))
40 loadmodfile(moduledir + @"\autoload\" + filename);
41 else if (File.Exists(moduledir + @"\" + filename))
42 loadmodfile(moduledir + @"\" + filename);
44 throw new FileNotFoundException();
46 static public void unloadmod(string name) {
48 static public void reloadmod(string name) {