UBrowser
Class UBrowserIRCChannelPage

source: e:\games\UnrealTournament\UBrowser\Classes\UBrowserIRCChannelPage.uc
Core.Object
   |
   +--UWindow.UWindowBase
      |
      +--UWindow.UWindowWindow
         |
         +--UWindow.UWindowClientWindow
            |
            +--UWindow.UWindowDialogClientWindow
               |
               +--UWindow.UWindowPageWindow
                  |
                  +--UBrowser.UBrowserIRCPageBase
                     |
                     +--UBrowser.UBrowserIRCChannelPage
Direct Known Subclasses:None

class UBrowserIRCChannelPage
extends UBrowser.UBrowserIRCPageBase


Variables
 string ChannelName
 UWindowHSplitter Splitter
 UBrowserIRCSystemPage SystemPage
 UBrowserIRCUserListBox UserList


Function Summary
 void BeforePaint(Canvas C, float X, float Y)
 void ChangeMode(string Nick, string Mode)
 void ChangeOp(string Nick, bool bOp)
 void ChangeVoice(string Nick, bool bVoice)
 void ChangedNick(string OldNick, string NewNick)
 void ChannelAction(string Nick, string Text)
 void ChannelText(string Nick, string Text)
 void ClosePage()
 void Created()
 void JoinedChannel(string Nick)
 void KickUser(string KickedNick, string Kicker, string Reason)
 void PartedChannel(string Nick)
 void ProcessInput(string Text)
 void UserInChannel(string Nick)
 void UserNotice(string Nick, string Text)
 void UserQuit(string Nick, string Reason)



Source Code


00001	class UBrowserIRCChannelPage expands UBrowserIRCPageBase;
00002	
00003	var string ChannelName;
00004	var UBrowserIRCSystemPage SystemPage;
00005	
00006	var UBrowserIRCUserListBox UserList;
00007	var UWindowHSplitter Splitter;
00008	
00009	function Created()
00010	{
00011		Super.Created();
00012	
00013		Splitter = UWindowHSplitter(CreateWindow(class'UWindowHSplitter', 0, 0, WinWidth, WinHeight));
00014		UserList = UBrowserIRCUserListBox(Splitter.CreateWindow(class'UBrowserIRCUserListBox', 0, 0, 100, WinHeight, Self));
00015	
00016		TextArea.SetParent(Splitter);
00017		Splitter.LeftClientWindow = TextArea;
00018		Splitter.RightClientWindow = UserList;
00019		Splitter.SplitPos = Splitter.WinWidth - 100;
00020		Splitter.MinWinWidth = 100;
00021	}
00022	
00023	function ClosePage()
00024	{
00025		SystemPage.PartChannel(ChannelName);
00026	}
00027	
00028	function BeforePaint(Canvas C, float X, float Y)
00029	{
00030		Super.BeforePaint(C, X, Y);
00031	
00032		Splitter.SetSize(WinWidth, WinHeight - EditControl.WinHeight);
00033	}
00034	
00035	function ChannelText(string Nick, string Text)
00036	{
00037		TextArea.AddText("<"$Nick$"> "$Text);
00038	}
00039	
00040	function ChannelAction(string Nick, string Text)
00041	{
00042		TextArea.AddText("* "$Nick$" "$Text);
00043	}
00044	
00045	function UserNotice(string Nick, string Text)
00046	{
00047		TextArea.AddText("-"$Nick$"- "$Text);
00048	}
00049	
00050	function ProcessInput(string Text)
00051	{
00052		if(Left(Text, 4) ~= "/me ")
00053		{
00054			ChannelAction(SystemPage.NickName, Mid(Text, 4));
00055			SystemPage.Link.SendChannelAction(ChannelName, Mid(Text, 4));
00056		}
00057		else
00058		if(Left(Text, 1) == "/")
00059			SystemPage.ProcessInput(Text);
00060		else
00061		{
00062			if(Text != "")
00063			{
00064				ChannelText(SystemPage.NickName, Text);
00065				SystemPage.Link.SendChannelText(ChannelName, Text);
00066			}
00067		}
00068	}
00069	
00070	function PartedChannel(string Nick)
00071	{
00072		TextArea.AddText("*** "$Nick@HasLeftText@ChannelName$".");
00073		UserList.RemoveUser(Nick);
00074	}
00075	
00076	function JoinedChannel(string Nick)
00077	{
00078		TextArea.AddText("*** "$Nick@HasJoinedText@ChannelName$".");
00079		UserList.AddUser(Nick);
00080	}
00081	
00082	function KickUser(string KickedNick, string Kicker, string Reason)
00083	{
00084		TextArea.AddText("*** "$KickedNick@WasKickedByText@Kicker$" ("$Reason$")");
00085		UserList.RemoveUser(KickedNick);
00086	}
00087	
00088	function UserInChannel(string Nick)
00089	{
00090		UserList.AddUser(Nick);
00091	}
00092	
00093	function ChangedNick(string OldNick, string NewNick)
00094	{
00095		TextArea.AddText("*** "$OldNick@NowKnownAsText@NewNick$".");
00096		UserList.ChangeNick(OldNick, NewNick);
00097	}
00098	
00099	function UserQuit(string Nick, string Reason)
00100	{
00101		TextArea.AddText("*** "$Nick@QuitText@"("$Reason$").");
00102		UserList.RemoveUser(Nick);
00103	}
00104	
00105	function ChangeMode(string Nick, string Mode)
00106	{
00107		TextArea.AddText("*** "$Nick@SetsModeText$": "$Mode);
00108	}
00109	
00110	function ChangeOp(string Nick, bool bOp)
00111	{
00112		UserList.ChangeOp(Nick, bOp);
00113	}
00114	
00115	function ChangeVoice(string Nick, bool bVoice)
00116	{
00117		UserList.ChangeVoice(Nick, bVoice);
00118	}
00119	
00120	defaultproperties
00121	{
00122	     RightClickMenuClass=Class'UBrowser.UBrowserIRCChannelMenu'
00123	}

End Source Code