예제 #1
0
 public string stopServer()
 {
     if (task != null)
     {
         outMessage = new LnetMessage();
     }
     return("");
 }
예제 #2
0
        public string ParseInput(string Text)
        {
            MatchCollection matches = lnet_start_debug.Matches(Text);

            if (matches.Count > 0)
            {
                return(startServer(true));
            }

            matches = lnet_start.Matches(Text);
            if (matches.Count > 0)
            {
                return(startServer(false));
            }

            matches = lnet_stop.Matches(Text);
            if (matches.Count > 0)
            {
                return(stopServer());
            }

            matches = lnet_priv.Matches(Text);
            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                {
                    GroupCollection groups = match.Groups;
                    outMessage = new LnetMessage("private", groups[1].Value, groups[2].Value);
                }
                return("");
            }

            matches = lnet_chat.Matches(Text);
            if (matches.Count > 0)
            {
                foreach (Match match in matches)
                {
                    GroupCollection groups = match.Groups;
                    outMessage = new LnetMessage("channel", groups[1].Value);
                }
                return("");
            }


            return(Text);
        }