public static void InitSystem() { if (!IsRestrictRunning()) { ProgramLog.Plugin.Log("No login system found! Restrict will be downloaded."); string restrict = Statics.PluginPath + Path.DirectorySeparatorChar + "RestrictPlugin"; string dll = restrict + ".dll"; if (!UpdateManager.performUpdate(LINK_RESTRICT, restrict + ".upt", restrict + ".bak", dll, 1, 1, "Restrict")) { ProgramLog.Error.Log("Restrict failed to download!"); return; } PluginLoadStatus loadStatus = PluginManager.LoadAndInitPlugin(dll); if (loadStatus != PluginLoadStatus.SUCCESS) { ProgramLog.Error.Log("Restrict failed to install!\nLoad result: {0}", loadStatus); } } }
public void InitSystem(Languages languages) { if (!IsRestrictRunning()) { ProgramLog.Plugin.Log(languages.NoAuth); string restrict = Statics.PluginPath + Path.DirectorySeparatorChar + "RestrictPlugin"; string dll = restrict + ".dll"; if (!UpdateManager.PerformUpdate(RestrictLink, restrict + ".upt", restrict + ".bak", dll, 1, 1, "Restrict")) { ProgramLog.Error.Log(languages.RestrictDlFailed); return; } PluginLoadStatus loadStatus = PluginManager.LoadAndInitPlugin(dll); if (loadStatus != PluginLoadStatus.SUCCESS) { ProgramLog.Error.Log( "{0}\n{1} {2}", languages.RestrictLoadFail, languages.RestrictLoadResult, loadStatus); } } }