Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

# TribesWebAdmin.TribesWebQueryCurrent

00001 00002 00003 00004 00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00428
00429
00430
00431
00432
00433
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451
00452
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590

    class TribesWebQueryCurrent extends TribesWebQueryHandler;

    var config string CurrentIndexPage;		// This is the page with the Menu
    var config string CurrentPlayersPage;
    var config string CurrentGamePage;
    var config string CurrentConsolePage;
    var config string CurrentConsoleLogPage;
    var config string CurrentConsoleSendPage;
    var config string CurrentMutatorsPage;
    var config string CurrentRestartPage;
    var config string DefaultSendText;		// TODO : Move to Defaults

    var localized string NoteGamePage;
    var localized string NotePlayersPage;
    var localized string NoteConsolePage;
    var localized string NoteMutatorsPage;

    var StringArray	SpeciesNames;

    function bool Query(WebRequest Request, WebResponse Response)
    {
        log("Current.Query");

    	switch (Mid(Request.URI, 1))
    	{
    	    case DefaultPage:			QueryCurrentFrame(Request, Response); return true;
    	    case CurrentIndexPage:		QueryCurrentMenu(Request, Response); return true;
    	    case CurrentPlayersPage:	if (!owner.MapIsChanging()) QueryCurrentPlayers(Request, Response); return true;
    	    case CurrentGamePage:		if (!owner.MapIsChanging()) QueryCurrentGame(Request, Response); return true;
    	    case CurrentConsolePage: 	if (!owner.MapIsChanging()) QueryCurrentConsole(Request, Response); return true;
    	    case CurrentConsoleLogPage:	if (!owner.MapIsChanging()) QueryCurrentConsoleLog(Request, Response); return true;
    	    case CurrentConsoleSendPage:	QueryCurrentConsoleSend(Request, Response); return true;
    	    case CurrentMutatorsPage:	if (!owner.MapIsChanging()) QueryCurrentMutators(Request, Response); return true;
    	    case CurrentRestartPage:	if (!owner.MapIsChanging()) owner.QueryRestartPage(Request, Response); return true;
    	}
    	return false;
    }

    //*****************************************************************************
    function QueryCurrentFrame(WebRequest Request, WebResponse Response)
    {
    local String Page;

        log("Current.QueryCurrentFrame");

    	// if no page specified, use the default
    	Page = Request.GetVariable("Page", CurrentGamePage);

    	Response.Subst("IndexURI", 	CurrentIndexPage$"?Page="$Page);
    	Response.Subst("MainURI", 	Page);

    	owner.ShowFrame(Response, DefaultPage);
    }

    function QueryCurrentMenu(WebRequest Request, WebResponse Response)
    {
    	local String Page;

        log("Current.QueryCurrentMenu");

    	Page = Request.GetVariable("Page", CurrentGamePage);

    	// set background colors
    	Response.Subst("DefaultBG", owner.DefaultBG);	// for unused tabs

    	Response.Subst("PlayersBG", owner.DefaultBG);
    	Response.Subst("GameBG", 	owner.DefaultBG);
    	Response.Subst("ConsoleBG",	owner.DefaultBG);
    	Response.Subst("MutatorsBG",owner.DefaultBG);
    	Response.Subst("RestartBG", owner.DefaultBG);

    	switch(Page) {
    	case CurrentPlayersPage:
    		Response.Subst("PlayersBG",	owner.HighlightedBG); break;
    	case CurrentGamePage:
    		Response.Subst("GameBG", 	owner.HighlightedBG); break;
    	case CurrentConsolePage:
    		Response.Subst("ConsoleBG",	owner.HighlightedBG); break;
    	case CurrentMutatorsPage:
    		Response.Subst("MutatorsBG",owner.HighlightedBG); break;
    	case CurrentRestartPage:
    		Response.Subst("RestartBG", owner.HighlightedBG); break;
    	}

    	// Set URIs
    	Response.Subst("PlayersURI", 	DefaultPage$"?Page="$CurrentPlayersPage);
    	Response.Subst("GameURI",		DefaultPage$"?Page="$CurrentGamePage);
    	Response.Subst("ConsoleURI", 	DefaultPage$"?Page="$CurrentConsolePage);
    	Response.Subst("MutatorsURI", 	DefaultPage$"?Page="$CurrentMutatorsPage);
    	Response.Subst("RestartURI", 	DefaultPage$"?Page="$CurrentRestartPage);

    	owner.ShowPage(Response, CurrentIndexPage);
    }

    function QueryCurrentPlayers(WebRequest Request, WebResponse Response)
    {
    local string Sort, PlayerListSubst, TempStr, TempTag, TempData, TeamName;
    local string KickButtonText[3], TableHeaders;
    local StringArray	PlayerList;
    local Controller P;
    local int i, Cols;
    local string IP;
    local bool bCanKick, bCanBan;

        log("Current.QueryCurrentPlayers");

    	Response.Subst("Section", "Player List");
    	Response.Subst("PostAction", CurrentPlayersPage);

    	if (owner.CanPerform("Xp|Kp|Kb|Mb"))
    	{
    		PlayerList = new(None) class'SortedStringArray';

    		Sort = Request.GetVariable("Sort", "Name");
    		Cols = 0;

    		bCanKick = owner.CanPerform("Kp|Mb");
    		bCanBan = owner.CanPerform("Kb");

    		if (bCanKick || bCanBan)
    		{
    			for ( P=owner.Level.ControllerList; P!=None; P=P.NextController )
    			{
    				if(		PlayerController(P) != None
    					&&	P.PlayerReplicationInfo != None
    					&&	NetConnection(PlayerController(P).Player) != None)
    				{
    					if ( bCanBan && Request.GetVariable("BanPlayer"$string(P.PlayerReplicationInfo.PlayerID)) != "" )
    						owner.Level.Game.AccessControl.KickBanPlayer(PlayerController(P));
    					else if ( bCanKick && Request.GetVariable("KickPlayer"$string(P.PlayerReplicationInfo.PlayerID)) != "" )
    						P.Destroy();
    				}
    			}

    			KickButtonText[0] = "Kick";
    			KickButtonText[1] = "Ban";
    			KickButtonText[2] = "Kick/Ban";
    			if (bCanKick) Cols += 1;
    			if (bCanBan) Cols += 2;
    			Response.Subst("KickButton", "<input class=button type='submit' name='Kick' value='"$KickButtonText[Cols-1]$"'>");

    			// Build of valid TableHeaders
    			TableHeaders = "";
    			if (bCanKick)
    			{
    				Response.Subst("HeadTitle", "Kick");
    				TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head");
    			}

    			if (bCanBan)
    			{
    				Response.Subst("HeadTitle", "Ban");
    				TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head");
    			}
    			Response.Subst("HeadTitle", "Name");
    			TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head_link");

    			Response.Subst("HeadTitle", "Team");
    			TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head_link");

    			Response.Subst("HeadTitle", "Ping");
    			TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head_link");
    			Response.Subst("HeadTitle", "Score");
    			TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head_link");
    			Response.Subst("HeadTitle", "IP");
    			TableHeaders = TableHeaders$owner.WebInclude(CurrentPlayersPage$"_list_head");
    			Response.Subst("TableHeaders", TableHeaders);
    		}

    		for (P=owner.Level.ControllerList; P!=None; P=P.NextController)
    		{
    			if (!P.bDeleteMe && P.bIsPlayer && P.PlayerReplicationInfo != None)
    			{
    				TempData = "<tr>";

    				Response.Subst("PlayerId", string(P.PlayerReplicationInfo.PlayerID));
    				if (owner.CanPerform("Kp"))
    					TempData = TempData$owner.WebInclude(CurrentPlayersPage$"_kick_col");

    				if (owner.CanPerform("Kb"))
    				{
    					if (PlayerController(P) != None)
    						TempData = TempData$owner.WebInclude(CurrentPlayersPage$"_ban_col");
    					else
    						TempData = TempData$owner.WebInclude(CurrentPlayersPage$"_empty_col");
    				}

                    if (P.PlayerReplicationInfo.bIsSpectator)
    					TempStr = " (Spectator)";
    				else
    					TempStr = " ";

    				if( PlayerController(P) != None )
    				{
    					IP = PlayerController(P).GetPlayerNetworkAddress();
    					if (IP!="")
        					IP = Left(IP, InStr(IP, ":"));
        				else
        				    IP = "localhost";
    				}
    				else
    					IP = "";

    				TempData = TempData$"<td><div align=\"left\" nowrap>"$owner.HtmlEncode(P.PlayerReplicationInfo.PlayerName)$TempStr$"</div></td>";

    				TeamName = owner.HtmlEncode(TribesReplicationInfo(P.PlayerReplicationInfo).team.localizedName);
    				TempData = TempData$"<td nowrap align=center>"$TeamName$" </td>";

    				TempData = TempData$"<td><div align=\"center\">"$P.PlayerReplicationInfo.Ping$"</div></td>";
    				TempData = TempData$"<td><div align=\"center\">"$int(P.PlayerReplicationInfo.Score)$"</div></td>";
    				TempData = TempData$"<td><div align=\"center\">"$IP$"</div></td></tr>";

    				switch (Sort)
    				{
    					case "Name":
    						TempTag = P.PlayerReplicationInfo.PlayerName; break;
    					case "Team":	// Ordered by Team + TeamId
    						TempTag = TeamName; break;
    					case "Ping":
    						TempTag = Right("0000"$string(P.PlayerReplicationInfo.Ping), 5); break;
    					default:
    						TempTag = Right("000"$string(int(P.PlayerReplicationInfo.Score)), 4); break;
    				}

    				PlayerList.Add(TempData, TempTag);
    			}
    		}
    		PlayerListSubst = "";
    		if (PlayerList.Count() > 0)
    		{
    			for ( i=0; i<PlayerList.Count(); i++)
    			{
    				if (Sort ~= "Score")
    					PlayerListSubst = PlayerList.GetItem(i)$PlayerListSubst;
    				else
    					PlayerListSubst = PlayerListSubst$PlayerList.GetItem(i);
    			}
    		}
    		else
    			PlayerListSubst = "<tr align=\"center\"><td colspan=\"5\">** No Players Connected **</td></tr>";

    		Response.Subst("PlayerList", PlayerListSubst);
    		Response.Subst("Sort", Sort);

    		Response.Subst("PageHelp", NotePlayersPage);
    		owner.MapTitle(Response);
    		owner.ShowPage(Response, CurrentPlayersPage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function QueryCurrentGame(WebRequest Request, WebResponse Response)
    {
    local StringArray	ExcludeMaps, IncludeMaps, MovedMaps;
    local class<Engine.GameInfo> GameClass;
    local string NewGameType, SwitchButtonName;
    local bool bMakeChanges;

        log("Current.QueryCurrentGame");

    	if (owner.CanPerform("Mt|Mm"))
    	{
    		if (Request.GetVariable("SwitchGameTypeAndMap", "") != "")
    		{
    			if (owner.CanPerform("Mt"))
    			{
    				owner.ServerChangeMap(Request, Response, Request.GetVariable("MapSelect"), Request.GetVariable("GameTypeSelect"));
    			}
    			else
    				owner.AccessDenied(Response);

    			return;
    		}
    		else if (Request.GetVariable("SwitchMap", "") != "")
    		{
    			if (owner.CanPerform("Mm|Mt"))
    			{
    				// TODO: Add a check to see if already changing
    				owner.Level.ServerTravel(Request.GetVariable("MapSelect")$"?game="$owner.Level.Game.Class$"?mutator="$owner.UsedMutators(), false);
    				owner.ShowMessage(Response, "Please Wait", "The server is now switching to map '"$Request.GetVariable("MapSelect")$"'.    Please allow 10-15 seconds while the server changes levels.");
    			}
    			else
    				owner.AccessDenied(Response);

    			return;
    		}

    		bMakeChanges = (Request.GetVariable("ApplySettings", "") != "");

    		if (owner.CanPerform("Mt") && (bMakeChanges || Request.GetVariable("SwitchGameType", "") != ""))
    		{
    			NewGameType = Request.GetVariable("GameTypeSelect");
    			GameClass = class<GameInfo>(DynamicLoadObject(NewGameType, class'Class'));
    		}
    		else
    			GameClass = None;

    		if (GameClass == None)
    		{
       			GameClass = owner.Level.Game.Class;
    			NewGameType = String(GameClass);
    		}

    		ExcludeMaps = owner.ReloadExcludeMaps(NewGameType);
    		IncludeMaps = owner.ReloadIncludeMaps(ExcludeMaps, NewGameType);

    		if (GameClass == owner.Level.Game.Class)
    		{
    			SwitchButtonName="SwitchMap";
    			MovedMaps = New(None) Class'SortedStringArray';
    			MovedMaps.CopyFromId(IncludeMaps, IncludeMaps.FindItemId(Left(string(owner.Level), InStr(string(owner.Level), "."))$".unr"));
    		}
    		else
    			SwitchButtonName="SwitchGameTypeAndMap";

    		if (owner.CanPerform("Mt"))
    		{
    			Response.Subst("GameTypeSelect", "<select name=\"GameTypeSelect\">"$owner.GenerateGameTypeOptions(NewGameType)$"</select>");
    			Response.Subst("GameTypeButton", "<input class=button type='submit' name='SwitchGameType' value='Switch'>");
    		}
    		else
    			Response.Subst("GameTypeSelect", owner.Level.Game.Default.GameName);

    		Response.Subst("MapButton", "<input class=button type='submit' name='"$SwitchButtonName$"' value='Switch'>");
    		Response.Subst("MapSelect", owner.GenerateMapListSelect(IncludeMaps, MovedMaps ));
    		Response.Subst("PostAction", CurrentGamePage);

    		Response.Subst("Section", "Current Game");
    		Response.Subst("PageHelp", NoteGamePage);
    		owner.MapTitle(Response);
    		owner.ShowPage(Response, CurrentGamePage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function QueryCurrentConsole(WebRequest Request, WebResponse Response)
    {
    local String SendStr, OutStr;

        log("Current.QueryCurrentConsole");

    	if (owner.CanPerform("Xc"))
    	{
    		SendStr = Request.GetVariable("SendText", "");
    		if (SendStr != "" && !(Left(SendStr, 6) ~= "debug " || SendStr ~= "debug"))
    		{
    			if (Left(SendStr, 4) ~= "say ")
    				owner.Level.Game.Broadcast(owner.Spectator, Mid(SendStr, 4), 'Say');
    			else if (SendStr ~= "dump")
    				owner.Spectator.Dump();
    			else
    			{
    				OutStr = owner.Level.ConsoleCommand(SendStr);
    				if (OutStr != "")
    					owner.Spectator.AddMessage(None, OutStr, 'Console');
    			}
    		}

    		Response.Subst("LogURI", CurrentConsoleLogPage);
    		Response.Subst("SayURI", CurrentConsoleSendPage);
    		owner.ShowPage(Response, CurrentConsolePage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function QueryCurrentConsoleLog(WebRequest Request, WebResponse Response)
    {
    local String LogSubst, LogStr;
    local int i;

        log("Current.QueryCurrentConsoleLog");

    	if (owner.CanPerform("Xc"))
    	{
    		Response.Subst("Section", "Server Console");
    		Response.Subst("SubTitle", owner.Level.Game.GameReplicationInfo.GameName$" in "$owner.Level.Title);
    //		Spectator.Dump();
    		i = owner.Spectator.LastMessage();
    		LogStr = owner.HtmlEncode(owner.Spectator.NextMessage(i));
    		while (LogStr  != "")
    		{
    			LogSubst = LogSubst$"> "$LogStr$"<br>";
    			LogStr = owner.HtmlEncode(owner.Spectator.NextMessage(i));
    		}
    		Response.Subst("RefreshMeta", "<meta http-equiv=\"refresh\" CONTENT=\"5; URL="$owner.WebServer.ServerURL$owner.Path$"/"$CurrentConsoleLogPage$"#END\">");
    		Response.Subst("LogText", LogSubst);
    		Response.Subst("PageHelp", NoteConsolePage);
    		owner.MapTitle(Response);
    		owner.ShowPage(Response, CurrentConsoleLogPage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function QueryCurrentConsoleSend(WebRequest Request, WebResponse Response)
    {
        log("Current.QueryCurrentConsoleSend");

    	if (owner.CanPerform("Xc"))
    	{
    		Response.Subst("DefaultSendText", DefaultSendText);
    		Response.Subst("PostAction", CurrentConsolePage);
    		owner.ShowPage(Response, CurrentConsoleSendPage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function QueryCurrentMutators(WebRequest Request, WebResponse Response)
    {
        local int i, j, k, l, id;
        local bool bHasSelected;
        local string selectedmutes, lastgroup, nextgroup, thisgroup;
        local string GrpValue;
        local StringArray	GroupedMutators;

    	if (owner.CanPerform("Mu"))
    	{
    	    // glenn: workaround for stupid unreal code

    	    owner.LoadMutators();

    	    GroupedMutators = new(None) class'SortedStringArray';
    		if (Request.GetVariable("SetMutes", "") != "")
    		{
    			owner.AIncMutators.Reset();
    			lastgroup = "";
    			for (i = 0; i<owner.AExcMutators.Count(); i++)
    			{
    				j = int(owner.AExcMutators.GetItem(i));

    				thisgroup = owner.AllMutators[j].GroupName;

    				if (Request.GetVariable(owner.AExcMutators.GetTag(i), "") != "" || Request.GetVariable(thisgroup) == owner.AllMutators[j].ClassName)
    					owner.AIncMutators.Add(owner.AExcMutators.GetItem(i), owner.AExcMutators.GetTag(i));
    			}
    		}

    		// Make a list sorted by groupname.classname
    		for (i = 0; i<owner.AExcMutators.Count(); i++)
    		{
    			j = int(owner.AExcMutators.GetItem(i));
    			GroupedMutators.Add(string(j), owner.AllMutators[j].GroupName$"."$owner.AllMutators[j].ClassName);

    			log("grouped mutators add: "$string(j)$", "$owner.AllMutators[j].GroupName$"."$owner.AllMutators[j].ClassName);
    		}

    		// First, Display Selected Mutators, 1 per line
    		selectedmutes = "";
    		for (i = 0; i<owner.AIncMutators.Count(); i++)
    		{
    		j = int(owner.AIncMutators.GetItem(i));

    			Response.Subst("MutatorName", owner.HtmlEncode(owner.AllMutators[j].FriendlyName));
    			Response.Subst("MutatorDesc", owner.HtmlEncode(owner.AllMutators[j].Description));

    			selectedmutes = selectedmutes$owner.WebInclude("current_mutators_selected");
    		}
    		if (selectedmutes != "")
    		{
    			Response.Subst("TableTitle", "Selected Mutators");
    			Response.Subst("TableRows", selectedmutes);
    			Response.Subst("SelectedTable", owner.WebInclude("current_mutators_table"));
    		}

    		// Then, Display All mutators with CheckBoxes/Radio Buttons based on Groups
    		lastgroup = "";
    		selectedmutes="";
    		for (i = 0; i<GroupedMutators.Count(); i++)
    		{
    			j = int(GroupedMutators.GetItem(i));

    			if ( (i + 1) == GroupedMutators.Count())
    				nextgroup = "";
    			else
    			{
    				k = int(GroupedMutators.GetItem(i + 1));
    				nextgroup = owner.AllMutators[k].GroupName;
    			}

    			thisgroup = owner.AllMutators[j].GroupName;

    			Response.Subst("GroupName", nextgroup);
    			if (lastgroup != thisgroup && thisgroup == nextgroup)
    			{
    				bHasSelected = false;
    				GrpValue = "None";
    				// See if any items in group is selected
    				for (k = i; k<GroupedMutators.Count(); k++)
    				{
    					l = int(GroupedMutators.GetItem(k));
    					if (owner.AllMutators[l].GroupName != nextgroup)
    						break;

    					id = owner.AIncMutators.FindTagId(owner.AllMutators[l].ClassName);

    					if (id != -1)
    					{
    						GrpValue = owner.AllMutators[l].ClassName;
    						bHasSelected = true;
    						break;
    					}
    				}

    				// Output Group Row + None Row
    				Response.Subst("GroupValue", GrpValue);
    				if (GrpValue == "None")
    					Response.Subst("Checked", "checked");

    				selectedmutes = selectedmutes$owner.WebInclude("current_mutators_group");
    			}

    			id = owner.AIncMutators.FindTagId(owner.AllMutators[j].ClassName);
    			Response.Subst("Checked", "");
    			if (id >= 0)
    				Response.Subst("Checked", "checked");

    			Response.Subst("MutatorClass", owner.AllMutators[j].ClassName);
    			Response.Subst("MutatorName", owner.AllMutators[j].FriendlyName);
    			Response.Subst("MutatorDesc", owner.AllMutators[j].Description);
    			if (nextgroup == thisgroup || thisgroup == lastgroup)
    				selectedmutes = selectedmutes$owner.WebInclude("current_mutators_group_row");
    			else
    				selectedmutes = selectedmutes$owner.WebInclude("current_mutators_row");

    			lastgroup = thisgroup;
    		}
    		Response.Subst("TableTitle", "Pick your Mutators");
    		Response.Subst("TableRows", selectedmutes);
    		Response.Subst("ChooseTable", owner.WebInclude("current_mutators_table"));

    		owner.MapTitle(Response);
    		Response.Subst("Section", "Mutators");
    		Response.Subst("PageHelp", NoteMutatorsPage);
    		Response.Subst("PostAction", CurrentMutatorsPage);
    		owner.ShowPage(Response, CurrentMutatorsPage);
    	}
    	else
    		owner.AccessDenied(Response);
    }

    function string GetTeamColor(TeamInfo Team)
    {
        // ADMIN TODO - team color (blue, yellow, red)

        /*
    	if (Team == None)
    		return "";

    	if (Team.TeamIndex < 4)
    		return Team.ColorNames[Team.TeamIndex];
    		*/

    	return "#CCCCCC";
    }

    function string GetTeamName(TeamInfo Team)
    {
    	if (Team == None)
    		return "";

    	return Team.GetHumanReadableName();
    }

    defaultproperties
    {
    	Title="Current"
    	DefaultPage="currentframe"
        CurrentIndexPage="current_menu"
        CurrentPlayersPage="current_players"
        CurrentGamePage="current_game"
        CurrentConsolePage="current_console"
        CurrentConsoleLogPage="current_console_log"
        CurrentConsoleSendPage="current_console_send"
        CurrentMutatorsPage="current_mutators"
        CurrentRestartPage="current_restart"
        DefaultSendText="say "
    	NoteGamePage="Choose a game type and/or maps then click on the corresponding change button."
    	NotePlayersPage="Shows you who is currently playing. You can kick and ban players. Use the checkboxes to choose who gets evicted."
    	NoteConsolePage="Here you you tell the players when you intend to make some changes or restart with a different map. You can also see what the players are saying, as long as its not team only messages."
    	NoteMutatorsPage="Select which mutators you want to be used when you hit the Restart Server Link"
    }

Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation
previous class next class | frames no frames

Class file time: ne 5.9.2004 15:53:58.000 - Creation time: st 23.5.2018 00:10:49.127 - Created with UnCodeX