Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UBrowser.UBrowserFavoritesFact


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
class UBrowserFavoritesFact extends UBrowserServerListFactory;

var config int FavoriteCount;
var config string FavoriteNames[50];
var config string FavoriteIPs[50];
var config int FavoritePorts[50];

function Query(optional bool bBySuperset, optional bool bInitial)
{
    local int i;

    for(i=0;i<FavoriteCount;i++)
        FoundServer(FavoriteIPs[i], FavoritePorts[i], "", "Unreal", FavoriteNames[i]);

    Super.Query();
    QueryFinished(True);
}

function SaveFavorites()
{
    local UBrowserServerList I;

    FavoriteCount = 0;
    for(I = UBrowserServerList(Owner.Next); i!=None; I = UBrowserServerList(I.Next))
    {
        FavoriteIPs[FavoriteCount] = I.IP;
        FavoritePorts[FavoriteCount] = I.QueryPort;
        FavoriteNames[FavoriteCount] = I.HostName;

        FavoriteCount++;
    }

    if(FavoriteCount < 50)
    {
        FavoriteIPs[FavoriteCount] = "";
        FavoritePorts[FavoriteCount] = 0;
        FavoriteNames[FavoriteCount] = "";
    }
    SaveConfig();
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: za 22-4-2006 13:00:12.000 - Creation time: za 22-4-2006 13:01:34.515 - Created with UnCodeX