/// <summary> /// This command allows you to listen to events that the client encounters. Events /// are things like people starting or stopping to talk, people joining or leaving, /// new channels being created and many more. It registers for client notifications /// for the specified serverConnectionHandlerId. If the serverConnectionHandlerID /// is set to null it applies to all server connection handlers. /// </summary> /// <param name="event">The event to register for. Choose ClientNotifyRegisterEvent.Any to register for all events.</param> /// <param name="serverConnectionHandlerId">The id of the server connection handler.</param> public SimpleResponse RegisterForNotifications(ClientNotifyRegisterEvent @event, uint? serverConnectionHandlerId = null) { Command command = CommandName.ClientNotifyRegister.CreateCommand(); command.AddParameter("event", @event.ToString().ToLower()); command.AddParameter("schandlerid", serverConnectionHandlerId.HasValue ? serverConnectionHandlerId.Value : 0); return ResponseBase<SimpleResponse>.Parse(SendCommand(command)); }
/// <summary> /// This command allows you to listen to events that the client encounters. Events /// are things like people starting or stopping to talk, people joining or leaving, /// new channels being created and many more. It registers for client notifications /// for the specified serverConnectionHandlerId. If the serverConnectionHandlerID /// is set to null it applies to all server connection handlers. /// </summary> /// <param name="event">The event to register for. Choose ClientNotifyRegisterEvent.Any to register for all events.</param> /// <param name="serverConnectionHandlerId">The id of the server connection handler.</param> public SimpleResponse RegisterForNotifications(ClientNotifyRegisterEvent @event, uint?serverConnectionHandlerId = null) { Command command = CommandName.ClientNotifyRegister.CreateCommand(); command.AddParameter("event", @event.ToString().ToLower()); command.AddParameter("schandlerid", serverConnectionHandlerId.HasValue ? serverConnectionHandlerId.Value : 0); return(ResponseBase <SimpleResponse> .Parse(SendCommand(command))); }