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

XInterface.IRC_Private


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
class IRC_Private extends IRC_Channel;

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
    Super.Initcomponent(MyController, MyOwner);

    GUISplitter(Controls[1]).SplitOrientation = SPLIT_Horizontal;
    GUISplitter(Controls[1]).SplitPosition = 1;
    GUISplitter(Controls[1]).bFixedSplitter = true;
    GUISplitter(Controls[1]).bDrawSplitter = false;
}

function ProcessInput(string Text)
{
    if(Left(Text, 4) ~= "/me ")
    {
        PrivateAction(SystemPage.NickName, Mid(Text, 4));
        SystemPage.Link.SendChannelAction(ChannelName, Mid(Text, 4));
    }
    else if(Left(Text, 1) == "/")
    {
        SystemPage.Link.SendCommandText(Mid(Text, 1));
    }
    else
    {
        if(Text != "")
        {
            PrivateText(SystemPage.NickName, Text);
            SystemPage.Link.SendChannelText(ChannelName, Text);
        }
    }
}

function ChangedNick(string OldNick, string NewNick)
{
    TextDisplay.AddText(MakeColorCode(IRCInfoColor)$"*** "$OldNick@NowKnownAsText@NewNick$".");
    ChannelName = NewNick; // channel name matches nick for private channels
    MyButton.Caption = NewNick;

    // If page is not currently active, flash its tab
    if(!MyButton.bActive)
        MyButton.bForceFlash = true;
    // if it is active, change the 'close' button text
    else
        SystemPage.IRCPage.LeaveButton.Caption = SystemPage.IRCPage.LeavePrivateCaptionHead$Caps(NewNick)$SystemPage.IRCPage.LeavePrivateCaptionTail;
}

function UserQuit(string Nick, string Reason)
{
    TextDisplay.AddText(MakeColorCode(IRCInfoColor)$"*** "$Nick@QuitText@"("$Reason$").");

    if(!MyButton.bActive)
        MyButton.bForceFlash = true;
}

function PrivateText(string Nick, string Text)
{
    TextDisplay.AddText( MakeColorCode(IRCNickColor)$"<"$Nick$"> "$MakeColorCode(IRCTextColor)$ColorizeLinks(Text) );

    if( SystemPage.InGame() )
        PlayerOwner().ClientMessage("IRC: <"$Nick$"> "$Text);

    if(!MyButton.bActive)
        MyButton.bForceFlash = true;
}

function PrivateAction(string Nick, string Text)
{
    TextDisplay.AddText(MakeColorCode(IRCActionColor)$"* "$Nick$" "$Text);

    if( SystemPage.InGame() )
        PlayerOwner().ClientMessage("IRC: * "$Nick$" "$Text);

    if(!MyButton.bActive)
        MyButton.bForceFlash = true;
}

function IsAway(string Nick, string Message)
{
    TextDisplay.AddText(MakeColorCode(IRCInfoColor)$Nick@SystemPage.IsAwayText$": "$ColorizeLinks(Message));

    if(!MyButton.bActive)
        MyButton.bForceFlash = true;
}

defaultproperties
{
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:50.000 - Creation time: Mo 16.4.2007 11:20:48.968 - Created with UnCodeX