]> Nishi Git Mirror - dataworks.git/commitdiff
remoteclient will be added soon
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Thu, 13 Jun 2024 01:51:40 +0000 (01:51 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Thu, 13 Jun 2024 01:51:40 +0000 (01:51 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@282 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Server/server.c

index 6c40e8f152476a1d7d95c58e9a0dd99fa8570ee5..0c87034158183d02c35b10ec422ee1605349e163 100644 (file)
@@ -216,6 +216,16 @@ void protocol_loop(int sock) {
                        } else {
                                writeline(sock, "ERROR:NO_AUTH");
                        }
+               } else if(__dw_strcaseequ(buf, "EXEC")){
+                       if(auth ? login : 1){
+                               if(has_arg){
+                                       dataworks_database_execute_code(db, buf + i + 1, false);
+                               }else{
+                                       writeline(sock, "ERROR:NEED_MORE_ARGS");
+                               }
+                       }else{
+                               writeline(sock, "ERROR:NOT_IN");
+                       }
                } else {
                        writeline(sock, "ERROR:UNKNOWN_CMD");
                }