From 8449ce740fa9c5dae762901265b8b2acedefc26c Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Thu, 22 Dec 2005 05:14:47 +0000
Subject: [PATCH] Add support for .plan files, add a ;PLAN str command which
 should allow editing of .plan files.

---
 exec/fingerservice.js | 7 ++++++-
 exec/str_cmds.js      | 8 ++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/exec/fingerservice.js b/exec/fingerservice.js
index 4e00d46b1a..d7db30dcd3 100644
--- a/exec/fingerservice.js
+++ b/exec/fingerservice.js
@@ -416,7 +416,12 @@ write(format("Last login %s %s\r\nvia %s from %s [%s]\r\n"
 	  ,u.connection
 	  ,u.host_name
 	  ,u.ip_address));
-
+var plan;
+plan=format("%suser/%04s.plan",system.data_dir,u.number);
+if(file_exists(plan))
+	send_file(plan)
+else
+	write("No plan.\r\n");
 done();
 
 /* End of fingerservice.js */
diff --git a/exec/str_cmds.js b/exec/str_cmds.js
index 65c6590448..e250e97a79 100644
--- a/exec/str_cmds.js
+++ b/exec/str_cmds.js
@@ -612,6 +612,14 @@ function str_cmds(str)
 	if(str=="POFF") {
 		bbs.node_settings ^= NODE_POFF;
 	}
+
+// Edit .plan
+	if(user.compare_ars("rest not G")) {
+		if(str=="PLAN") {
+			var plan=format("%suser/%04d.plan",system.data_dir,user.number);
+			console.editfile(plan);
+		}
+	}
 }
 
 //### Generic routine to ask user for parameter if one wasn't specified ###
-- 
GitLab