home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
WWIVMODS
/
RANK.ZIP
/
RANK.DOC
< prev
Wrap
Text File
|
1992-04-22
|
5KB
|
171 lines
Sysop Configurable Ranks V 1.02
Written By: Dr. D.
Black Cross 1992
I have written this mod beacuse some sysops asked me if I could
make a rank mod that you could change through WFC or something
and not half to go through the source and change it. So I made
a primative version of this mod (V 1.00) that was never disturbted
and only had on rank set unlike this where you can have male and
female ranks.So to get started
Files: RANK.C - Main Source File
RANK.DOC - Doc
RANK.DAT - Premade Ranks (Configurable)
MAKEFILE.MAK - Makefile (Use if you didn't add additional .C files)
First Copy RANK.DAT into your main WWIV directory
Second Load Up VARDEC.H and Skip beforefore the last #endif
Key
┌──────────────┐
│ * - Look For │
│ + - Add │
│ % - Change │
└──────────────┘
* } modem_info;
*
+ typedef struct {
+ char rank[53][41];
+ } rank_nfo;
*
* /*************************************************************************/
*
*
* #endif
Save File and Load Up BBS.C and find
* if (strcmp(s,"GFILEDIT")==0) {
* sysoplog("@ Ran Gfileedit");
* gfileedit();
* }
+ if (strcmp(s,"RANKEDIT")==0) {
+ if (checkpw()) {
+ sysoplog("@ Ran Rankedit");
+ rankedit();
+ }
+ }
* if (strcmp(s,"DOS")==0) {
* if (checkpw()) {
* sysoplog("@ Shelled to DOS);
Skip Down Farther in BBS.C
* switch (ch) {
* case '?':
* if (ok_local()) {
* printmenu(7);
* nl();
* getkey();
* }
* break;
+ case ',':
+ rankedit();
+ break;
* case ' ':
* outs("Log On? ");
Save BBS.C and load BBSUTL.C and find
* void yourinfo()
* {
+ ranks();
* outchr(12);
* npr("Your name : %s\r\n",nam(&thisuser,usernum));
* npr("Phone number : %s\r\n",thisuser.phone);
+ npr("Rank : %s\r\n",rank[0]);
* if (thisuser.waiting)
* npr("Mail Waiting : %s\r\n",thisuser.waiting);
Save BBSUTL.C and load MSGBASE.C and find
* void inmsg(messagerec *m1, char *title, int *annony, int needtitle, char *aux, int fsed)
* {
% char s[LEN],s1[LEN],s2[LEN],s3[81],ro[81],fnx[81],chx,*ss,*ss1;
* int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon,gati[50],gatp;
* messagerec m;
* long ll,l1;
* char *lin, *b;
* int real_name=0;
*
Skip farther down in this function and find
*
* l1=0;
* if (real_name)
+ sprintf(s3,"%s [%s]",thisuser.realname,rank[0]);
% addline(b,s3,&l1);
* else
+ sprintf(s3,"%s [%s]",nam1(&thisuser,usernum,syscfg.systemnumber),rank[0]);
% addline(b,s3,&l1);
* time(&ll);
* strcpy(s,ctime(&ll));
Save MSGBASE.C and Load LILO.C (BBSUTL.C For 4.12 and Lower) and find
* if (live_user) {
* nl();
+ ranks();
* npr("Name: %s\r\n",nam(&thisuser,usernum));
+ npr("Rank: %s\r\n",rank[0]); /* Add If You Want To */
* npr("Time allowed on: %d\r\n", (int) ((nsl()+30/60.0));
Save This File and load NEWUSER.C and find
* thisuser.bwcolors[6]=143;
* thisuser.bwcolors[7]=7;
*
* reset_act_sl();
*
+ ranks();
*
* for (i=0; i<6; i++) {
* ch=rand() % 36;
Save this file and add RANK.C to your MAKE or .PRJ file. I can only give
your instructions on adding this to your MAKE file beacuse only have
expernece in using the MAKE file. So load up MAKEFILE.MAK and find.
Use my MAKEFILE.MAK I have included if you did not add any other .C
files in your source.
% $(OBJ)utility.obj $(OBJ)xfer.obj $(OBJ)netsup.obj $(OBJ)rank.obj
* #
Skip farther down in the file and find
* $(OBJ)netsup.obj : netsup.c vars.h vardec.h net.h
* $(TCC_NRM)
+ $(OBJ)rank.obj : rank.c vars.h vardec.h
+ $(TCC_NRM)
Now if you are using the makefile run a MAKE FCNS and you will not half
to worry about this step. But if you are using the MAKE FCNS function
and you get an error load up FCNS.H, skip to the end and add
+ /* File: rank.c */
+
+ void rankedit();
+ void read_ranks();
+ void write_ranks();
+ void male_list();
+ void female_list();
+ void change_ranks();
+ void change_ranks();
+ void var_quit();
+ void ranks();
Save this file and compile your BBS.If you ever want to call up user ranks
use rank[0] (i.e npr("Rank: %s",rank[0]);).Thats about it if you have
any questions or comments on this mod E-Mail Dr. D. #3 on Black Cross BBS
(410)486-9749.
Last Comments: To acess this press , from WFC or //RANKEDIT from the BBS.