fixed cmd_oset parameter handling (* might also be a valid input for the fakehost...
[srvx.git] / src / mod-hostserv.c
index 7c09463e3ef8022f7f4ffb53057a80e657f177b4..ce8a3745d64ad405d5ef7e8ffe4ddd696a315d4c 100644 (file)
@@ -1168,7 +1168,7 @@ static MODCMD_FUNC(cmd_oset) {
     struct handle_info *hi;
     char *fakehost;
     struct hs_assignment *assignment;
-    if(!strchr(argv[1], '.')) {
+    if(!strchr(argv[1], '.') && strcmp(argv[1], "*")) {
         if (!(hi = modcmd_get_handle_info(user, argv[1])))
             return 0;
         fakehost = argv[2];
@@ -1190,7 +1190,7 @@ static MODCMD_FUNC(cmd_oset) {
         reply("HSMSG_ACCESS_DENIED");
         return 0;
     }
-    if(!strcmp(argv[2], "*")) {
+    if(!strcmp(fakehost, "*")) {
         if(!assignment)
             return 0; //simply ignore (there is no assignment in use)
         hs_activate_assignment(hs_user, NULL);