home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
WWIV.ZIP
/
GFILES
/
CAPTURES
/
DELUSE.MOD
< prev
next >
Wrap
Text File
|
1995-01-09
|
8KB
|
179 lines
ok here's the mod.
Deltaman #1 @34
Mon Jan 09 19:17:39 1995
0R 34 01/09 20:17 DigiNet 54->17
0R 34 01/10 19:39 DigiNet 34->54
0R 34 01/09 19:17 DigiNet ->34
RE: Ok...
2Reply 3: 1If you want to0
2[bMESSAGE STATUS2]p No Reply Neccessary0
7═══════════════════════════════════════════════════════════════════════════════0
╒════════════════════════════════════════════════════════════════════════════╕
│ Mod Name : Auto User Maintenance Mod Author: Hackmaster 'J' 1 @6101 │
│ WWIVnet │
│ Difficulty : Easy Date : 04DEC93 │
│ │
│ WWIV Ver. : 4.23 Filename : HJ01F.MOD or (ZIP) │
│ │
│ Description: This mod runs a routine when the beginday function runs this │
│ routine compares the laston of all your users and deletes the│
│ users that haven't logged on in over 60 days(interval can be │
│ easily changed). │
│ │
│ **** Sub Mod -- Show actual exemptions not just the number │
│ │
╘════════════════════════════════════════════════════════════════════════════╛
----------------------------------------------------------------------------
04DEC93
Redid portions of the code to remove some uneeded variables. The 4.22 ver
would not compile under 4.23 due to some variable changes, so a better
method has been found. Now includes a DEFINE for number of days after
which to delete inactive users.
----------------------------------------------------------------------------
29JAN93
Revised code slightly. Tested on V4.22 OK!
----------------------------------------------------------------------------
16AUG92
Kinda incorporated another mod into this one this simple little mod is to
show exemptions in UEDIT not just the number and of course it will show
exemption from auto-deletion as well as the stock ones...
So now its a lot easier to tell what a user is exempt from without having
a clue about binary number system.....
----------------------------------------------------------------------------
10AUG92
Finally fixed(I hope!) the del new user mail error
----------------------------------------------------------------------------
19OCT91: Speeded up the code a bit removed the output to the screen(no need
for the user to know who is getting deleted). Most importantly The bit that
used the callsign to save the user is gone. To exempt a user from being auto-
deleted you must give him an exemption of 16. A user with an exemption of 16
will not be deleted by this mod. Example if the user already had an exemption
of 1 then make his 17 to exclude him from being deleted the exemptions are bit
mapped, so mark it out in binary to see the full picture. In other words if
want a user to be exempt from this mod just add 16 to his exemption whatever
it may be now.... Me and my ramblings....
----------------------------------------------------------------------------
07SEP91
This mod is the fine tuned product of the previous mods I've made on the same
subject. It does full reporting to the sysop log of whom it deleted. In
addition if you wish to exclude anyone from the auto_user_purge put a acsii
char 'Y' as the last character in their callsign. This version also fixes the
bug that a newuser's feedback message was deleted when he was the first user
of the day. This mod requires modification of only the SYSOPF.C file.
==============================================================================
Go into SYSOPF.C search for function void beginday and block read the
following function void auto_user_purge right before it.
------------------------------------------------------------------------------
/* MOD */
void auto_user_purge(void)
{
char s[80];
unsigned int un, d;
long l;
userrec u;
# define DAY_LIMIT 60 /* Number of days after which to delete */
/* inactive users */
time(&l);
un=1;
read_user(un,&u);
sprintf(s,"Auto-Purged Non-Active Users (over %d days)",DAY_LIMIT);
sl1(0,s);
do {
read_user(un,&u);
if (!(u.exempt & 0x10)) { /* Add 16 to Exemption to stop deletion */
d=(unsigned int) ((l-u.daten)/24.0/3600.0);
if (((u.inact & inact_deleted)==0) && (d > DAY_LIMIT)) {
sprintf(s," Deleted User: #%3.3d %s",un,u.name);
sl1(0,s);
deluser(un);
}
}
++un;
}
while (un <= status.users);
}
/* END */
-----------------------------------------------------------------------------
Modify function void beginday as below:
NOTE: Only modification is the line added right before the very last line
of the functione
-----------------------------------------------------------------------------
=void beginday(void) -----------------------------
={ ! Legend = is original line !
= char s[255]; ! + is changed line !
= zlogrec z,z1; -----------------------------
= int f,i;
.
.
.
= if (syscfg.beginday_c[0]) {
= stuff_in(s,syscfg.beginday_c,create_chain_file(),"","","","");
= do_remote(s,1);
= }
+ auto_user_purge(); /* MOD ADD */
=}
-----------------------------------------------------------------------------
Now add the following line to void newuser in file NEWUSER.C:
= input_age(&thisuser);
= input_comptype();
= input_screensize();
=
+ thisuser.daten=0; /* MOD to fix new users from being deleted */
+
= if (numed && (thisuser.sysstatus & sysstatus_ansi)) {
= nl();
= prt(5,get_string(568));
-----------------------------------------------------------------------------
Now modify function void print_data in file UEDIT.C as follows:
-----------------------------------------------------------------------------
= outstr(" DSL=");
= pln(u->dsl);
= if (u_qsc) {
= if ((*u_qsc)!=999) {
= outstr(get_string(256)); pln(*u_qsc);
= }
= }
/* MOD to show proper exemptions */
if (u->exempt) {
npr("%s%s",get_string(257),(u->exempt & exempt_ratio)?"XFER ":" ");
npr("%s",(u->exempt & exempt_time)?"TIME ":" ");
npr("%s",(u->exempt & exempt_all )?"ALL ":" ");
npr("%s",(u->exempt & exempt_post)?"POST ":" ");
npr("%s (%d)\r\n",(u->exempt & 0x10)?"ADEL":" ",u->exempt);
}
/* END MODIFY */
= strcpy(s3,restrict_string);
= for (i=0; i<=15; i++) {
= if (u->ar & (1 << i))
= s[i]='A'+i;
============================================================================
Type MAKE FCNS or edit the FCNS.H file to show that function auto_user_purge
is in file SYSOPF.C. Then Compile the BBS and you're done Enjoy!
Hackmaster 'J' 1@6101 WWIVnet
9-----
95D2Σ3└7┬1á4m7ä5ñ
85┌──────────────────────────────────────────────┐
75│1DigiNet@340 7 The Pyramid BBS0 1PlaNet@41165│
65│8WWIVNet@8306 0 7 (410)532-76440 8UtopiaNet@1055│
55│11.4 gig 0 124 hours/day0 1 WWIV 4.235│
45└──────────────────────────────────────────────┘