| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | BinkleyTerm Who is On |
Hi Mvan,
PK> You need to find a utility to tweak the BBSTAT##.BBS file.
PK> One way I can think of is that as the .BBS file
PK> _appears_ to be in a similar format to a Mecca file,
PK> one may be able to use Mecca to generate them.
ML> Yeah but mecca doesn't have any tokens to report user
ML> location eg. reading/writing messages, downloading files, playing games.
No, but then each menu selection that the user makes can run a Mecca/Mex
that writes where things are heading. You just need to cover each possible
selection.
ML> I could swear I remember seeing something like
ML> Username Node Status
ML> -------------------- ---- ----------------------
ML> Binkleyterm 16 Waiting for caller
Thats exactly what my systems does, here is sample output I just captured -
=====================================================================
Current status of lines -
Task System/User Status.
---- ------------------------ ---------------------------
1 BinkleyTerm/2 Waiting for caller.
9 Peter Knapper Access Menu.
Press ENTER to continue
======================================================================
When I had 4 BBS lines running it really meant something but now there is
not much to choose from........;-)
You need to ensure you can run the generation program EXTERNAL to Maximus,
because there may be no maximus task running at the time the status changes
to update the output. Initially I used a small program I wrote to do this,
however eventually I managed to get MEX to do it all for me.
Now this was all back around 1995, so I have forgotten how most of it
works...........;-) Note that it DOES use the OS/2 IPC capability...
ML> I want to update the status to
ML> Status
ML> -----------------------------
ML> Sending mail to 3:712/104
You would need to get Binkleyterm to participate in that, and if I remember
correctly all Binkely does is report 1 or 2 different lines. Something like
-
Waiting for Caller
Communicating with z:nnn/hhh (or similar)
ML> if a *.bsy flag is detected in the BinkleyTerm outbound
ML> area or something. That would be cool.
The catch with .BSY flags is that the Task/Node number wont be detected, so
if you are runing multiple lines of Binkley you could have a little
problem.
Here are the 2 related MEX files, I would need to study them to see how
they work (watch out for line wrapping!!!)........;-)
NOTE 1: All this is for OS/2 as t builds resident strings for some data
stored in MCP (the Maximus Control Program). I have no idea if it will work
on anything else.
NOTE 2: My G:\ Drive is a 12KB RAM Disk used just for this function...
=== PIPC.MEX ===============================================
/////////////////////////////////////////////////////////////////////////////
/
//
// File: Pipc.mex
//
// Desc: Generates IPC file for this BBS session.
//
/////////////////////////////////////////////////////////////////////////////
/
#include
#include "pipc.mh"
/////////////////////////////////////////////////////////////////////////////
/
//
// Function: Pipcinit()
//
// Desc: Sets up Maximus static strings used for IPC data during
// this BBS session. The created strings are used by other PIPC
// functions that run later in the session.
//
/////////////////////////////////////////////////////////////////////////////
/
int pipcinit()
{
int: FDipc; // IPC file FD.
int: rc; // For various return codes.
int: i; // General counter.
string: line; // Output line.
string: pathbeg; // The beginning path to the file.
string: pathend; // The ending path to the file.
pathbeg := BASEVALUE + NAMEVALUE;
pathend := EXTNVALUE;
rc := destroy_static_string(PATHBEG);
rc := create_static_string(PATHBEG);
if (rc < 0)
{ print(" ERROR: Unable to create IPC variable (", rc, ").\n");
return(2);
}
rc := set_static_string(PATHBEG, pathbeg);
if (rc < 0)
{ print(" ERROR: Unable to set IPC variable (", rc, ").\n");
return(2);
}
rc := destroy_static_string(PATHEND);
rc := create_static_string(PATHEND);
if (rc < 0)
{ print(" ERROR: Unable to create IPC variable (", rc, ").\n");
return(2);
}
rc := set_static_string(PATHEND, pathend);
if (rc < 0)
{ print(" ERROR: Unable to set IPC variable (", rc, ").\n");
return(2);
}
rc := destroy_static_string(TASKDATA);
rc := create_static_string(TASKDATA);
if (rc < 0)
{ print(" ERROR: Unable to create IPC variable (", rc, ").\n");
return(2);
}
rc := set_static_string(TASKDATA, itostr(TASKVALUE));
if (rc < 0)
{ print(" ERROR: Unable to set IPC variable (", rc, ").\n");
return(2);
}
// Now cleanup any old IPC file...
line := pathbeg + strpadleft(itostr(id.task_num),2,'0') + pathend;
// print("Removing file [", line, "].\n");
remove(line);
return(0);
}
int main(string: argv)
{
int: FDipc; // IPC file FD.
int: rc; // For various return codes.
int: maxtasks; // Maximum task number.
string: line; // Output line.
string: work; // General work area.
string: pathbeg; // The beginning path to the file.
string: pathend; // The ending path to the file.
// print("Parms [", argv, "].\n");
rc := get_static_string(PATHBEG, pathbeg);
if (rc < 0)
{ pipcinit();
rc := get_static_string(PATHBEG, pathbeg);
}
else
{ if (rc < 0)
{ print(" ERROR: Unable to retrieve IPC variable (", rc,
").\n");
return(2);
}
}
rc := get_static_string(PATHEND, pathend);
if (rc < 0)
{ print(" ERROR: Unable to retrieve IPC variable (", rc,
").\n");
return(2);
}
rc := get_static_string(TASKDATA, work);
if (rc < 0)
{ print(" ERROR: Unable to retrieve IPC variable (", rc,
").\n");
return(2);
}
maxtasks := strtoi(work);
if (id.task_num > maxtasks)
{ print(" Oops, task number is too high...\n");
return(3);
}
line := pathbeg + strpadleft(itostr(id.task_num),2,'0') + pathend;
// print(" Creating file [", line, "].\n");
if (usr.name = "")
work := strpadleft(itostr(id.task_num),4,' ') + " " +
strpad("Maximus
",25,' ') + strtrim(argv," ");
else
work := strpadleft(itostr(id.task_num),4,' ') + " " +
strpad(usr.name
,25,' ') + strtrim(argv," ");
FDipc := open(line,IOPEN_CREATE | IOPEN_WRITE);
if (rc < 0)
{ print(" ERROR: Unable creating IPC file (", rc, ").\n");
return(2);
}
writeln(FDipc,work);
close(FDipc);
return(0);
}
=============================================================
And the header file for PIPC. All other header files are provided with Maximus.
=== PIPC.MH =================================================
/////////////////////////////////////////////////////////////////////////////
/
//
// File: Pipc.mh
//
// Desc: Include file for manual IPC handling for this BBS session.
//
/////////////////////////////////////////////////////////////////////////////
/
// The various data area names -
#define PATHBEG "PIPC:PATH_BEG"
#define PATHEND "PIPC:PATH_END"
#define TASKDATA "PIPC:TASK"
// The default values used for the static strings -
#define BASEVALUE "G:\\"
#define NAMEVALUE "PIPC"
#define EXTNVALUE ".IPC"
#define TASKVALUE 10
=============================================================
Cheers..............pk.
--- Maximus/2 3.01
* Origin: Another Good Point About OS/2 (3:772/1.10)SEEN-BY: 3/0 633/267 640/954 712/0 313 550 620 848 @PATH: 772/1 140/1 138/146 392 123/500 261/38 712/848 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.