/// <summary> /// Takes in the info from the moderator/owner and removes a user from the group /// </summary> /// <param name="message">Message in error to be handled</param> /// <param name="service">Service to send/recieve messages through</param> public void Run(ParsedMessage message, AWatcherService service, IDBController controller) { Message msgSender = new Message(); if (message.Arguments.Count > 0 && message.Arguments[0].Substring(0, 3).ToUpper().Equals("OFF")) { controller.UnsuppressUser(message.Sender); msgSender.FullMessage = "You have been unsuppressed and can now receive messages. To suppress yourself, please reply SUPPRESS to disable messages."; } else { controller.SuppressUser(message.Sender); msgSender.FullMessage = "You have been suppressed. If you would like to unsuppress yourself, please reply SUPPRESS OFF to remove."; } msgSender.Reciever.Add(message.Sender.PhoneEmail); service.SendMessage(msgSender); }
/// <summary> /// Takes in the info from the moderator/owner and removes a user from the group /// </summary> /// <param name="message">Message to be handled</param> /// <param name="service">Service to send/recieve messages through</param> public void Run(ParsedMessage message, AWatcherService service, IDBController controller) { Message msgSender = new Message(); if (message.Arguments.Count > 0 && message.Arguments[0].Substring(0, 3).ToUpper().Equals("YES")) { controller.DeleteUser(message.Sender); msgSender.FullMessage = "You have been removed from our system. Thank you for using our services."; } else { controller.SuppressUser(message.Sender); msgSender.FullMessage = "To remove yourself from Text2Share, please respond with STOP YES. Please keep in mind that this also deletes any groups you own and any plugins you have developed."; } msgSender.Reciever.Add(message.Sender.PhoneEmail); service.SendMessage(msgSender); }