void ApplyIrcSqlProps() { Server.Config.UseIRC = irc_chkEnabled.Checked; Server.Config.IRCServer = irc_txtServer.Text; Server.Config.IRCPort = int.Parse(irc_txtPort.Text); Server.Config.IRCNick = irc_txtNick.Text; Server.Config.IRCChannels = irc_txtChannel.Text; Server.Config.IRCOpChannels = irc_txtOpChannel.Text; Server.Config.IRCIdentify = irc_chkPass.Checked; Server.Config.IRCPassword = irc_txtPass.Text; Server.Config.IRCShowPlayerTitles = irc_cbTitles.Checked; Server.Config.IRCShowWorldChanges = irc_cbWorldChanges.Checked; Server.Config.IRCShowAFK = irc_cbAFK.Checked; Server.Config.IRCControllerRank = GuiPerms.GetPermission(irc_cbRank, LevelPermission.Nobody); Server.Config.IRCVerify = (IRCControllerVerify)irc_cbVerify.SelectedIndex; Server.Config.IRCCommandPrefix = irc_txtPrefix.Text; Server.Config.UseMySQL = sql_chkUseSQL.Checked; Server.Config.MySQLUsername = sql_txtUser.Text; Server.Config.MySQLPassword = sql_txtPass.Text; Server.Config.MySQLDatabaseName = sql_txtDBName.Text; Server.Config.MySQLHost = sql_txtHost.Text; Server.Config.MySQLPort = sql_txtPort.Text; Database.Backend = Server.Config.UseMySQL ? MySQLBackend.Instance : SQLiteBackend.Instance; //Server.Config.MySQLPooling = ; // No setting for this? }
void ApplySecurityProps() { Server.Config.LogNotes = sec_cbLogNotes.Checked; Server.Config.verifyadmins = sec_cbVerifyAdmins.Checked; Server.Config.VerifyAdminsRank = GuiPerms.GetPermission(sec_cmbVerifyRank, LevelPermission.Operator); Server.Config.WhitelistedOnly = sec_cbWhitelist.Checked; Server.Config.ChatSpamCheck = sec_cbChatAuto.Checked; Server.Config.ChatSpamCount = (int)sec_numChatMsgs.Value; Server.Config.ChatSpamInterval = sec_numChatSecs.Value; Server.Config.ChatSpamMuteTime = sec_numChatMute.Value; Server.Config.CmdSpamCheck = sec_cbCmdAuto.Checked; Server.Config.CmdSpamCount = (int)sec_numCmdMsgs.Value; Server.Config.CmdSpamInterval = sec_numCmdSecs.Value; Server.Config.CmdSpamBlockTime = sec_numCmdMute.Value; Server.Config.BlockSpamCheck = sec_cbBlocksAuto.Checked; Server.Config.BlockSpamCount = (int)sec_numBlocksMsgs.Value; Server.Config.BlockSpamInterval = sec_numBlocksSecs.Value; Server.Config.IPSpamCheck = sec_cbIPAuto.Checked; Server.Config.IPSpamCount = (int)sec_numIPMsgs.Value; Server.Config.IPSpamInterval = sec_numIPSecs.Value; Server.Config.IPSpamBlockTime = sec_numIPMute.Value; }
void ApplyRankProps() { Server.Config.DefaultRankName = rank_cmbDefault.SelectedItem.ToString(); Server.Config.OSPerbuildDefault = GuiPerms.GetPermission(rank_cmbOsMap, LevelPermission.Nobody); Server.Config.HigherRankTP = rank_cbTPHigher.Checked; Server.Config.AdminsJoinSilently = rank_cbSilentAdmins.Checked; Server.Config.ListEmptyRanks = rank_cbEmpty.Checked; }
void ApplyIRCProps() { Server.Config.UseIRC = irc_chkEnabled.Checked; Server.Config.IRCServer = irc_txtServer.Text; Server.Config.IRCPort = (int)irc_numPort.Value; Server.Config.IRCNick = irc_txtNick.Text; Server.Config.IRCChannels = irc_txtChannel.Text; Server.Config.IRCOpChannels = irc_txtOpChannel.Text; Server.Config.IRCIdentify = irc_chkPass.Checked; Server.Config.IRCPassword = irc_txtPass.Text; Server.Config.IRCShowPlayerTitles = irc_cbTitles.Checked; Server.Config.IRCShowWorldChanges = irc_cbWorldChanges.Checked; Server.Config.IRCShowAFK = irc_cbAFK.Checked; Server.Config.IRCControllerRank = GuiPerms.GetPermission(irc_cmbRank, LevelPermission.Admin); Server.Config.IRCVerify = (IRCControllerVerify)irc_cmbVerify.SelectedIndex; Server.Config.IRCCommandPrefix = irc_txtPrefix.Text; }
void eco_cbItemRank_SelectedIndexChanged(object sender, EventArgs e) { const LevelPermission perm = LevelPermission.Guest; eco_curItem.PurchaseRank = GuiPerms.GetPermission(eco_cbItemRank, perm); }