示例#1
0
 // Sends a BashCommand
 public void Send(BashCommand command)
 {
     Send(command.ToString());
 }
示例#2
0
 protected virtual void OnCommandRecieved(BashCommand line)
 {
     if (CommandRecieved != null) CommandRecieved(line);
 }
示例#3
0
 // Handles Chat & Bout Commands
 public void ProcessLine(BashCommand command)
 {
     // Send the command to all event handlers
     OnCommandRecieved(command);
     if (command.Name == BashCommand.Chat)
     {
         // Send the chat to all event handlers
         OnChatRecieved(command);
     }
     else if (command.Name == BashCommand.Bout)
     {
         if (command.Value == BashCommand.BoutEndString)
         {
             // Here we have built up _tempUsers fully
             //  so we set Users to _tempUsers
             //  and create a new List for the next BOUT list
             Users = _tempUsers;
             _tempUsers = new List<BashBout>();
             // Send the users to all event handlers
             OnBoutListUpdate(Users);
         }
         else
         {
             // Parse and add the bout to the temporary list
             var bout = BashBoutParser.Parse(command.Value);
             _tempUsers.Add(bout);
         }
     }
 }