public void Setup(string ServerName, bool LoadConfig = false) { _servername = ServerName; sCalendarCommand = new CalendarCommand(ServerName); sBirthdayCommand = new BirthdayCommand(ServerName); sBanCommand = new BanCommand(ServerName); sBan = new Ban(ServerName); if(IRCConfig.List[ServerName].ServerId == 1 || LoadConfig) _config = new AddonConfig(Name, ".yml"); _calendar = new Calendar(ServerName); _calendar.Start(); sIrcBase.Networks[ServerName].IrcRegisterHandler("PRIVMSG", HandlePrivmsg); InitIrcCommand(); SchumixBase.DManager.Update("banned", string.Format("ServerName = '{0}'", ServerName), string.Format("ServerId = '{0}'", IRCConfig.List[ServerName].ServerId)); SchumixBase.DManager.Update("birthday", string.Format("ServerName = '{0}'", ServerName), string.Format("ServerId = '{0}'", IRCConfig.List[ServerName].ServerId)); SchumixBase.DManager.Update("calendar", string.Format("ServerName = '{0}'", ServerName), string.Format("ServerId = '{0}'", IRCConfig.List[ServerName].ServerId)); if(CleanConfig.Database) { SchumixBase.sCleanManager.CDatabase.CleanTable("banned"); SchumixBase.sCleanManager.CDatabase.CleanTable("birthday"); SchumixBase.sCleanManager.CDatabase.CleanTable("calendar"); } }