From 688c51fd893441bf32a7f0f3e4342edfb047df93 Mon Sep 17 00:00:00 2001 From: fanyx Date: Sun, 26 Jun 2022 21:21:57 +0200 Subject: [PATCH] Move config plugins to include --- xaseco/includes/rasp.settings.php | 158 ++++++++++++++++++++++++++++++ xaseco/includes/votes.config.php | 151 ++++++++++++++++++++++++++++ 2 files changed, 309 insertions(+) create mode 100644 xaseco/includes/rasp.settings.php create mode 100644 xaseco/includes/votes.config.php diff --git a/xaseco/includes/rasp.settings.php b/xaseco/includes/rasp.settings.php new file mode 100644 index 0000000..428bb39 --- /dev/null +++ b/xaseco/includes/rasp.settings.php @@ -0,0 +1,158 @@ + is 2 or 6 AND player has ranked record, OR +// player uses the records panel, then PB message is not shown at track start +$always_show_pb = true; + +//Set to true ONLY if you use the karma feature. +//If you set this to true when you are not, it will produce errors +$feature_karma = true; +//Set to true if you allow ++ & -- votes as well as /++ & /-- +$allow_public_karma = true; +//Set to true if you want to show the karma message at the start of each track +$karma_show_start = true; +//Set to true if you want to show vote counts & percentages +$karma_show_details = true; +//Set to true if you want to show players their actual votes +$karma_show_votes = true; +//Set to the number of times a player should have finished a track before +//being allowed to karma vote for it +//Note: this is the total number of finishes since the first time a player +//tried a track, not the number in the current session +$karma_require_finish = 0; +//Remind player to vote karma if [s]he hasn't yet +$remind_karma = 0; // 2 = every finish; 1 = at end of race; 0 = none + +//Set to true if you want jukebox functionality +$feature_jukebox = true; +//Set to true if you want jukebox to be extended to include the TMX /add feature +$feature_tmxadd = false; +//Set to true if you want jukebox to skip tracks requested by players that left +$jukebox_skipleft = true; +//Set to true if you want jukebox to _not_ skip tracks requested by admins +//(any tier) that left (and $jukebox_skipleft is true) +$jukebox_adminnoskip = false; +//Set to true if you want /add to permanently add tracks to the server +$jukebox_permadd = false; +//Set to true if you want /admin add to automatically jukebox the downloaded track (just like a passed /add vote) +$jukebox_adminadd = true; +//Set to true if you want jukebox messages diverted to TMF message window +$jukebox_in_window = false; + +//Set to true to reset the challenges list cache at the start of each map +$reset_cache_start = true; + +//Set to contact (email, ICQ, etc) to show in /server command, leave empty to skip entry +$admin_contact = 'YOUR@EMAIL.COM'; + +//Set to filename to enable autosaving matchsettings upon every track switch +$autosave_matchsettings = ''; // e.g. 'autosave.txt' + +//Set to true if you want start-up to prune records/rs_times for players and +// challenges deleted from database, and for tracks deleted from the server +//Only enable this if you know what you're doing! +$prune_records_times = false; + +//Set to true if you want to disable normal CallVotes & enable chat-based votes +$feature_votes = false; + +//Set to true to perform XASECO version check at start-up & MasterAdmin connect +$uptodate_check = true; + +//Set to true to perform global blacklist merge at MasterAdmin connect +$globalbl_merge = false; + +//Set to true to process only United accounts in global blacklist merge +$globalbl_united = false; + +//Set to global blacklist in XML format, same as in dedicated_cfg.txt (TMF) +// e.g. http://www.gamers.org/tmf/dedimania_blacklist.txt (TMF-only) +//On TMN in dedicated.cfg isn't loaded at start-up, so no need to define that +$globalbl_url = ''; + +//################################################################## +//#-------------------- Performance Variables ---------------------# +//# These variables are used in the main plugin. # +//# They specify how much data should be used for calculations # +//# # +//# If your server slows down considerably when calculating # +//# ranks it is recommended that you lower/increase these values # +//################################################################## + +//Sets the maximum number of records stored per track +// Lower = Faster +$maxrecs = 50; + +//Sets the minimum amount of records required for a player to be ranked +// Higher = Faster +$minrank = 3; + +//Sets the number of times used to calculate a player's average +// Lower = Faster +$maxavg = 10; + +//################################################################## +//#-------------------- Jukebox Variables -------------------------# +//# These variables are used by the jukebox. # +//################################################################## + +//Specifies how large the track history buffer is. +//If a track that is in the buffer gets requested, it won't be jukeboxed. +$buffersize = 20; + +//Specifies the required vote ratio for a TMX /add request to be successful. +$tmxvoteratio = 0.66; + +//The location of the tracks folders for saving TMX tracks, relative +//to the dedicated server's GameData/Tracks/ directory: +//$tmxdir for tracks downloaded via /admin add, and user tracks approved +// via /admin addthis. +//$tmxtmpdir for tracks downloaded via /add user votes. +//There must be full write permissions on these folders. +//In linux the command will be: chmod 777. +//Regardless of OS, use the / character for pathing. +$tmxdir = 'Challenges/TMX'; +$tmxtmpdir = 'Challenges/TMXtmp'; + +//################################################################## +//#------------------------ IRC Variables -------------------------# +//# These variables are used by the IRC plugin. # +//################################################################## + +$CONFIG = array(); +$CONFIG['server'] = 'localhost'; // server (i.e. irc.gamesnet.net) +$CONFIG['nick'] = 'botname'; // nick (i.e. demonbot) +$CONFIG['port'] = 6667; // port (standard: 6667) +$CONFIG['channel'] = '#channel'; // channel (i.e. #php) +$CONFIG['name'] = 'botlogin'; // bot name (i.e. demonbot) +$show_connect = false; //If set to true, the IRC connection messages will be displayed in the console. + +//----------------------------------------- +//Do not modify anything below this line... +//----------------------------------------- +$linesbuffer = array(); +$ircmsgs = array(); +$outbuffer = array(); +$con = array(); +$jukebox = array(); +$jb_buffer = array(); +$tmxadd = array(); +$tmxplaying = false; +$tmxplayed = false; +?> diff --git a/xaseco/includes/votes.config.php b/xaseco/includes/votes.config.php new file mode 100644 index 0000000..f5f5484 --- /dev/null +++ b/xaseco/includes/votes.config.php @@ -0,0 +1,151 @@ + 1, // endround + 1 => 2, // ladder + 2 => 3, // replay + 3 => 2, // skip + 4 => 3, // kick + 5 => 3, // add + 6 => 3, // ignore + ); + // set to true to show a vote reminder at each of those rounds + $r_show_reminder = true; + + // maximum number of seconds before a vote expires + $ta_expire_limit = array( // seconds + 0 => 0, // endround, N/A + 1 => 90, // ladder + 2 => 120, // replay + 3 => 90, // skip + 4 => 120, // kick + 5 => 120, // add + 6 => 120, // ignore + ); + // set to true to show a vote reminder at an (approx.) interval + $ta_show_reminder = true; + // interval length at which to (approx.) repeat reminder + $ta_show_interval = 30; // seconds + + // check for active voting system + if ($feature_votes) { + // disable CallVotes + $aseco->client->query('SetCallVoteRatio', 1.0); + + // really disable all CallVotes on TMF + if ($aseco->server->getGame() == 'TMF') { + $ratios = array(array('Command' => '*', 'Ratio' => -1.0)); + $aseco->client->query('SetCallVoteRatios', $ratios); + } + + // if 2, the voting explanation is sent to all players when one + // new player joins; use this during an introduction period + // if 1, the voting explanation is only sent to the new player + // upon joining + // if 0, no explanations are sent at all + $global_explain = 2; + + // define the vote ratios for all types + $vote_ratios = array( + 0 => 0.4, // endround + 1 => 0.5, // ladder + 2 => 0.6, // replay + 3 => 0.6, // skip + 4 => 0.7, // kick + 5 => 1.0, // add - ignored, defined by $tmxvoteratio + 6 => 0.6, // ignore + ); + + // divert vote messages to TMF message window? + $vote_in_window = false; + + // disable voting commands while an admin (any tier) is online? + $disable_upon_admin = false; + + // disable voting commands during scoreboard at end of track? + $disable_while_sb = true; + + // allow kicks & allow user to kick-vote any admin? + $allow_kickvotes = true; + $allow_admin_kick = false; + // allow ignores & allow user to ignore-vote any admin? + $allow_ignorevotes = true; + $allow_admin_ignore = false; + + // maximum number of these votes per track; set to 0 to disable a + // vote type, or to some really high number for unlimited votes + $max_laddervotes = 2; + $max_replayvotes = 2; + $max_skipvotes = 2; + + // limit the number of times a track can be /replay-ed; 0 = unlimited + $replays_limit = 0; + + // if true, does restart via quick ChallengeRestart + // this is what most users are accustomed to, but it stops + // a track's music (if in use) + // if false, does restart via jukebox prepend & NextChallenge + // this takes longer and may confuse users into thinking + // the restart is actually loading the next track, but + // it insures music resumes playing + $ladder_fast_restart = true; + + // enable Rounds points limits? use this to restrict the use of the + // track-related votes if the _first_ player already has reached a + // specific percentage of the server's Rounds points limit + $r_points_limits = true; + + // percentage of Rounds points limit _after_ which /ladder is disabled + $r_ladder_max = 0.4; + // percentage of Rounds points limit _before_ which /replay is disabled + $r_replay_min = 0.5; + // percentage of Rounds points limit _after_ which /skip is disabled + $r_skip_max = 0.5; + + // enable Time Attack time limits? use this to restrict the use of the + // track-related votes if the current track is already _running_ for a + // specific percentage of the server's TA time limit + // this requires function time_playing() from plugin.track.php + $ta_time_limits = true; + + // percentage of TA time limit _after_ which /ladder is disabled + $ta_ladder_max = 0.4; + // percentage of TA time limit _before_ which /replay is disabled + $ta_replay_min = 0.5; + // percentage of TA time limit _after_ which /skip is disabled + $ta_skip_max = 0.5; + + // no restrictions in other modes + } +?>