Exemplo n.º 1
0
 protected override Task <string> OnProcess(string sMessage)
 {
     if (ConnectionObject.Login(sMessage))
     {
         return(GetMessage(220, "Password ok, FTP server ready"));
     }
     else
     {
         return(GetMessage(530, "Username or password incorrect"));
     }
 }
Exemplo n.º 2
0
        protected override string OnProcess(string sMessage)
        {
            sMessage = sMessage.Trim();
            if (sMessage == "")
            {
                return(GetMessage(501, string.Format("{0} needs a parameter", Command)));
            }

            if (ConnectionObject.Login(sMessage))
            {
                return(GetMessage(220, "Password ok, FTP server ready"));
            }

            return(GetMessage(530, "Username or password incorrect"));
        }