about summary refs log tree commit diff stats
path: root/bin
diff options
context:
space:
mode:
authorahriman <ahriman@falte.red>2019-07-24 03:04:27 +0000
committerahriman <ahriman@falte.red>2019-07-24 03:04:27 +0000
commit79f4ddb208169c8ab0fec5fbacb06a31b1965d17 (patch)
tree433be7ed7b8de3f9279402a016b2c9b70f38a733 /bin
parent738066303f36156408d2893f7eb01ec88ecf667b (diff)
downloadadmin-79f4ddb208169c8ab0fec5fbacb06a31b1965d17.tar.gz
fixed minor issues with dupe names and stray folders as names
Diffstat (limited to 'bin')
-rwxr-xr-xbin/connusers.py12
-rwxr-xr-xbin/regusers.py2
2 files changed, 10 insertions, 4 deletions
diff --git a/bin/connusers.py b/bin/connusers.py
index 1128c34..26ab112 100755
--- a/bin/connusers.py
+++ b/bin/connusers.py
@@ -15,9 +15,15 @@ def checkconns():
 
     connusers = list(set(subprocess.check_output("/usr/local/bin/showwhoison | sed -n '1!p'; exit 0", stderr=subprocess.STDOUT,shell=True).decode().split("\n")))
     conntable.write("<ul>\n")
-    for conn in connusers:
-        if conn != "" and conn != "root":
-            conntable.write("<li><a href=\"https://"+ conn +".tilde.institute\">"+ conn +"</a></li>\n")
+
+    seen = set()
+    for conns in connusers:
+        split = conns.split(' ')
+        for conn in split:
+            if conn != "" and conn != " " and conn != "root" and conn not in seen:
+                seen.add(conn)
+                conntable.write("<li><a href=\"https://"+ conn +".tilde.institute\">"+ conn +"</a></li>\n")
+
 
     conntable.write("</ul>\n")
 
diff --git a/bin/regusers.py b/bin/regusers.py
index e6fff77..2c482d9 100755
--- a/bin/regusers.py
+++ b/bin/regusers.py
@@ -22,6 +22,6 @@ if __name__ == "__main__":
     regusers = get_regusers("/home")
     usertable.write("<ul>\n")
     for user in sorted(regusers):
-        if user != ".git" and user != "ahriman" and user != "uucp" and user != "admins":
+        if user != "lost+found" and user != ".git" and user != "uucp" and user != "admins":
             usertable.write("<li><a href=\"https://"+ user +".tilde.institute\">"+ user +"</a></li>\n")
     usertable.write("</ul>\n")