Exemple #1
0
        public Message Unsubscribe(string[] parameters, MessageEvent e)
        {
            if (parameters.Length == 0)
            {
                return(new Message("/unsubscribe [feed]"));
            }
            var obj = col.FindOne(x =>
                                  x.endpoint_type == e.GetEndpoint().Item1&&
                                  x.endpoint_num == e.GetEndpoint().Item2&&
                                  x.feed == parameters[0]
                                  );

            if (obj != null)
            {
                col.Delete(x => x.id == obj.id);
                return(new Message("unsubscribed"));
            }
            return(new Message("not subscribed yet"));
        }
Exemple #2
0
 public void Erase(string w) =>
 col.Delete(x => x.keyword == w);