]> git.stg.codes - stg.git/blobdiff - stglibs/srvconf.lib/parser.cpp
Add support of -E key for sgconf (credit timeout)
[stg.git] / stglibs / srvconf.lib / parser.cpp
index 139c91bc6dc0a1b775ec11df1977523cda393498..89b2457cc1de9830604645e5e7d5eedf081008ed 100644 (file)
@@ -165,6 +165,14 @@ if (strcasecmp(el, "credit") == 0)
         }
     }
 
+if (strcasecmp(el, "creditExpire") == 0)
+    {
+    if (str2x(attr[1], user.creditExpire) < 0)
+        {
+        return;
+        }
+    }
+
 /*if (strcasecmp(el, "freemb") == 0)
     {
     if (strtodouble2(attr[1], user.freeMb) < 0)
@@ -518,6 +526,14 @@ if (strcasecmp(el, "currip") == 0)
     user.ip = inet_addr(attr[1]);
     }
 
+if (strcasecmp(el, "creditExpire") == 0)
+    {
+    if (str2x(attr[1], user.creditExpire) < 0)
+        {
+        return;
+        }
+    }
+
 for (int i = 0; i < USERDATA_NUM; i++)
     {
     string num;