Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
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 |
//============================================================================= // NetConfigPage. //============================================================================= class NetConfigPage expands ModPageContent; Static function string LoadUpClassContent( SubWebManager Other, WebConnection Receiver ) { local string S,GN; GN = string(Other.Level.Game.Class); S = "<!-- Net config -->"$Other.NewLineChar; StartTable(S); AddConfigCheckbox(S,"Allow older clients",(Other.Level.ConsoleCommand("Get TcpNetDriver AllowOldCLients")~="True"),"OL"); AddConfigCheckbox(S,"Allow downloaders",(Other.Level.ConsoleCommand("Get TcpNetDriver AllowDownloads")~="True"),"DL"); AddConfigCheckbox(S,"Fast downloads",(Other.Level.ConsoleCommand("Get TcpNetDriver AllowFastDownload")~="True"),"FD"); AddConfigEditbox(S,"Redirect downloads to URL",Other.Level.ConsoleCommand("Get HTTPDownload RedirectToURL"),80,"RD"); AddConfigEditbox(S,"Max download size",Other.Level.ConsoleCommand("Get TcpNetDriver MaxDownloadSize"),15,"MX"); AddConfigCheckbox(S,"Do server uplink",Class'UdpServerUplink'.Default.DoUplink,"UP"); AddConfigEditbox(S,"Max players",Other.Level.ConsoleCommand("Get"@GN@"MaxPlayers"),15,"MP"); AddConfigEditbox(S,"Max spectators",Other.Level.ConsoleCommand("Get"@GN@"MaxSpectators"),15,"MS"); AddConfigEditbox(S,"Admin password",Other.Level.ConsoleCommand("Get"@GN@"AdminPassword"),50,"AP"); AddConfigEditbox(S,"Game password",Other.Level.ConsoleCommand("Get"@GN@"GamePassword"),50,"GP"); AddConfigCheckbox(S,"Mute spectators",Other.Level.Game.bMuteSpectators,"ME"); EndTable(S); S = S$"<p><input class=\"button\" type=\"submit\" name=\"edit\" value=\"Submit\"><!-- End of Net config code-->"; Return S; } Static function ProcessReceivedData( string Data, SubWebManager Other, WebConnection Receiver ) { local string Var,Val,GN; local bool bAllowOld,bAllowDLs,bUpLink,bMuteSpecs,bFastDL; GN = string(Other.Level.Game.Class); while( ParseNextStr(Data,Var,Val) ) { switch( Var ) { Case "OL": bAllowOld = True; Break; Case "DL": bAllowDLs = True; Break; Case "FD": bFastDL = True; Break; Case "RD": Other.Level.ConsoleCommand("Set HTTPDownload RedirectToURL"@Val); Break; Case "MX": Other.Level.ConsoleCommand("Set TcpNetDriver MaxDownloadSize"@int(Val)); Break; Case "UP": bUpLink = True; Break; Case "MP": Other.Level.ConsoleCommand("Set"@GN@"MaxPlayers"@int(Val)); Break; Case "MS": Other.Level.ConsoleCommand("Set"@GN@"MaxSpectators"@int(Val)); Break; Case "ME": bMuteSpecs = True; Break; Case "AP": Other.Level.ConsoleCommand("Set"@GN@"AdminPassword"@Val); Break; Case "GP": Other.Level.ConsoleCommand("Set"@GN@"GamePassword"@Val); Break; } } Other.Level.ConsoleCommand("Set TcpNetDriver AllowOldCLients"@bAllowOld); Other.Level.ConsoleCommand("Set TcpNetDriver AllowDownloads"@bAllowDLs); Other.Level.ConsoleCommand("Set TcpNetDriver AllowFastDownload"@bFastDL); Other.Level.ConsoleCommand("Set"@GN@"bMuteSpectators"@bMuteSpecs); Class'UdpServerUplink'.Default.DoUplink = bUpLink; Class'UdpServerUplink'.Static.StaticSaveConfig(); } defaultproperties { } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |