Subj : The code!
To : All
From : Sean Dennis
Date : Thu Oct 15 2009 10:31 am
Hello, All.
This program is supposed to set the hidden bit on a particular node in
Telegard/2 when it's called. I was using the user record but evidently that's
for use with being permanently hidden from the userlist. This will toggle the
"ishidden" bit in NODES.DAT by reading the node number off of the command line
and then will set the correct bit for the correct node. I'm using Virtual
Pascal to do this.
NODES.DAT is set up as each node number has its own record from 0 to n (0 being
node 1).
I'll put error handling in a little later.
Okay, after reading the last few messages and making a few changes, here's what
I have:
=== Cut ===
Program HideTheSysop;
Uses
DOS, SysUtils;
{$I TELEGARD.INC}
Var
NRec : NodesRec;
NodeFile : File of NodesRec;
NodeNum : Word;
NI : WhosOnFlags;
Begin
NodeNum := StrToInt(ParamStr(1));
Assign (NodeFile, 'nodes.dat');
{$I+}Reset(NodeFile);{$I-}
Seek(NodeFile, NodeNum);
Read(NodeFile, NRec);
NRec.NI := NRec.NI + [ishidden];
Write(NodeFile, NRec);
Close(NodeFile);
End.
=== Cut ===
Look close enough? :)
Later,
Sean
//
[email protected] |
http://nsbbs.info | ICQ: 19965647
... A book is like a garden carried in the pocket. - Arab proverb
--- GoldED/2 3.0.1
* Origin: Nocturnal State BBS - Johnson City, TN - bbs.nsbbs.info (1:18/200)