예제 #1
0
        public CommandsForRooms(ChatServer cserver, CommandsForRegistration rgclass)
        {
            chatServer = cserver;
            userReg    = rgclass.userRegistration;

            ClassRooms r = new ClassRooms("*", "LOBBY", "");

            roomHash.Add("LOBBY", r);

            // do we care about certain words in the room names?
            if (File.Exists(cserver.LocalPath + "RoomBlackList.txt"))
            {
                cusswords = File.ReadLines("c:\\file.txt").ToArray();
                for (int i = 0; i < cusswords.Length; i++)
                {
                    cusswords[i] = cusswords[i].ToLower();
                }
            }
        }
예제 #2
0
 public CommandsForRegistration(ChatServer c)
 {
     cs = c;
     userRegistration = new Registration(cs.LocalPath);
 }
 public CommandsForUsers(ChatServer cs)
 {
     chatServer = cs;
 }
예제 #4
0
 /*
  * Close even for the window defined in the xaml
  */
 public void Window_Closing(object sender, CancelEventArgs e)
 {
     cs.StopServer();
     cs = null;
 }