diff --git a/mesh_bot.py b/mesh_bot.py index 9b48093..dbecc12 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -40,10 +40,10 @@ def auto_response(message, snr, rssi, hop, pkiStatus, message_from_id, channel_n "bbspost": lambda: handle_bbspost(message, message_from_id, deviceID), "bbsread": lambda: handle_bbsread(message), "blackjack": lambda: handleBlackJack(message, message_from_id, deviceID), + "okcl": lambda: handle_checklist(message, message_from_id, deviceID), + "denycl": lambda: handle_checklist(message, message_from_id, deviceID), "checkin": lambda: handle_checklist(message, message_from_id, deviceID), "checklist": lambda: handle_checklist(message, message_from_id, deviceID), - "checklistapprove": lambda: handle_checklist(message, message_from_id, deviceID), - "checklistdeny": lambda: handle_checklist(message, message_from_id, deviceID), "checkout": lambda: handle_checklist(message, message_from_id, deviceID), "chess": lambda: handle_gTnW(chess=True), "clearsms": lambda: handle_sms(message_from_id, message), diff --git a/modules/checklist.md b/modules/checklist.md index 2a1afef..ce8cf24 100644 --- a/modules/checklist.md +++ b/modules/checklist.md @@ -33,13 +33,13 @@ The enhanced checklist module provides asset tracking and accountability feature - Provides `get_overdue_checkins()` function for alert integration - **Approval Workflow**: - - `checklistapprove ` - Approve pending check-ins (admin) - - `checklistdeny ` - Deny/remove check-ins (admin) + - `clok ` - Approve pending check-ins (admin) + - `denycl ` - Deny/remove check-ins (admin) - Support for approval-based workflows #### New Commands: -- `checklistapprove ` - Approve a check-in -- `checklistdeny ` - Deny a check-in +- `clok ` - Approve a check-in +- `denycl ` - Deny a check-in - Enhanced `checkin [interval] [note]` - Now supports interval parameter ### Enhanced Check Out Options @@ -155,19 +155,19 @@ ID: Tech2 checked-In for 00:15:30📝Equipment repair #### Approve Check-in ``` -checklistapprove +clok ``` Approve a pending check-in (requires admin privileges). **Example:** ``` -checklistapprove 123 +clok 123 ``` #### Deny Check-in ``` -checklistdeny +denycl ``` Deny and remove a check-in (requires admin privileges). diff --git a/modules/checklist.py b/modules/checklist.py index e5fcdb1..281b1bc 100644 --- a/modules/checklist.py +++ b/modules/checklist.py @@ -6,8 +6,7 @@ from modules.log import logger from modules.settings import checklist_db, reverse_in_out, bbs_ban_list, bbs_admin_list import time -trap_list_checklist = ("checkin", "checkout", "checklist", - "checklistapprove", "checklistdeny", "checklistadd", "checklistremove") +trap_list_checklist = ("checkin", "checkout", "checklist", "okcl", "denycl",) def initialize_checklist_database(): try: @@ -413,7 +412,7 @@ def process_checklist_command(nodeID, message, name="none", location="none"): # elif "purgeout" in message_lower: # return mark_checkout_removed_by_name(name) - elif message_lower.startswith("checklistapprove "): + elif "okcl " in message_lower: if not is_admin: return "You do not have permission to approve check-ins." try: @@ -421,8 +420,8 @@ def process_checklist_command(nodeID, message, name="none", location="none"): return approve_checkin(checkin_id) except (ValueError, IndexError): return "Usage: checklistapprove " - - elif message_lower.startswith("checklistdeny "): + + elif "denycl " in message_lower: if not is_admin: return "You do not have permission to deny check-ins." try: