Annotation of sbbs/sbbs3/userdat.h, revision 1.1.1.2

1.1       root        1: /* userdat.h */
                      2: 
                      3: /* Synchronet user data access routines (exported) */
                      4: 
1.1.1.2 ! root        5: /* $Id: userdat.h,v 1.27 2003/07/25 08:17:30 rswindell Exp $ */
1.1       root        6: 
                      7: /****************************************************************************
                      8:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
                      9:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
                     10:  *                                                                                                                                                     *
                     11:  * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html         *
                     12:  *                                                                                                                                                     *
                     13:  * This program is free software; you can redistribute it and/or                       *
                     14:  * modify it under the terms of the GNU General Public License                         *
                     15:  * as published by the Free Software Foundation; either version 2                      *
                     16:  * of the License, or (at your option) any later version.                                      *
                     17:  * See the GNU General Public License for more details: gpl.txt or                     *
                     18:  * http://www.fsf.org/copyleft/gpl.html                                                                                *
                     19:  *                                                                                                                                                     *
                     20:  * Anonymous FTP access to the most recent released source is available at     *
                     21:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
                     22:  *                                                                                                                                                     *
                     23:  * Anonymous CVS access to the development source and modification history     *
                     24:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
                     25:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
                     26:  *     (just hit return, no password is necessary)                                                     *
                     27:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
                     28:  *                                                                                                                                                     *
                     29:  * For Synchronet coding style and modification guidelines, see                                *
                     30:  * http://www.synchro.net/source.html                                                                          *
                     31:  *                                                                                                                                                     *
                     32:  * You are encouraged to submit any modifications (preferably in Unix diff     *
                     33:  * format) via e-mail to [email protected]                                                                      *
                     34:  *                                                                                                                                                     *
                     35:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
                     36:  ****************************************************************************/
                     37: 
                     38: #ifndef _USERDAT_H
                     39: #define _USERDAT_H
                     40: 
                     41: #include "scfgdefs.h"   /* scfg_t */
1.1.1.2 ! root       42: #include "dat_rec.h"   /* getrec/putrec prototypes */
1.1       root       43: 
                     44: #ifdef DLLEXPORT
                     45: #undef DLLEXPORT
                     46: #endif
                     47: #ifdef DLLCALL
                     48: #undef DLLCALL
                     49: #endif
                     50: 
                     51: #ifdef _WIN32
                     52:        #ifdef SBBS_EXPORTS
                     53:                #define DLLEXPORT __declspec(dllexport)
                     54:        #else
                     55:                #define DLLEXPORT __declspec(dllimport)
                     56:        #endif
                     57:        #ifdef __BORLANDC__
                     58:                #define DLLCALL __stdcall
                     59:        #else
                     60:                #define DLLCALL
                     61:        #endif
                     62: #else
                     63:        #define DLLEXPORT
                     64:        #define DLLCALL
                     65: #endif
                     66: 
                     67: #ifdef __cplusplus
                     68: extern "C" {
                     69: #endif
                     70: 
                     71: extern char* crlf;
                     72: extern char* nulstr;
                     73: 
                     74: DLLEXPORT int  DLLCALL getuserdat(scfg_t* cfg, user_t* user);  /* Fill userdat struct with user data   */
                     75: DLLEXPORT int  DLLCALL putuserdat(scfg_t* cfg, user_t* user);  /* Put userdat struct into user file    */
1.1.1.2 ! root       76: DLLEXPORT int  DLLCALL newuserdat(scfg_t* cfg, user_t* user);  /* Create new userdat in user file */
        !            77: DLLEXPORT uint DLLCALL matchuser(scfg_t* cfg, char *str, BOOL sysop_alias); /* Checks for a username match */
        !            78: DLLEXPORT char* DLLCALL alias(scfg_t* cfg, char* name, char* buf);
        !            79: DLLEXPORT int  DLLCALL putusername(scfg_t* cfg, int number, char * name);
        !            80: DLLEXPORT uint DLLCALL total_users(scfg_t* cfg);
1.1       root       81: DLLEXPORT uint DLLCALL lastuser(scfg_t* cfg);
1.1.1.2 ! root       82: DLLEXPORT BOOL DLLCALL del_lastuser(scfg_t* cfg);
1.1       root       83: DLLEXPORT char DLLCALL getage(scfg_t* cfg, char *birthdate);
                     84: DLLEXPORT char*        DLLCALL username(scfg_t* cfg, int usernumber, char * str);
1.1.1.2 ! root       85: DLLEXPORT char* DLLCALL usermailaddr(scfg_t* cfg, char* addr, char* name);
        !            86: DLLEXPORT int  DLLCALL getnodedat(scfg_t* cfg, uint number, node_t *node, int* file);
        !            87: DLLEXPORT int  DLLCALL putnodedat(scfg_t* cfg, uint number, node_t *node, int file);
        !            88: DLLEXPORT char* DLLCALL nodestatus(scfg_t* cfg, node_t* node, char* buf, size_t buflen);
        !            89: DLLEXPORT void DLLCALL printnodedat(scfg_t* cfg, uint number, node_t* node);
        !            90: DLLEXPORT void DLLCALL packchatpass(char *pass, node_t* node);
        !            91: DLLEXPORT char* DLLCALL unpackchatpass(char *pass, node_t* node);
        !            92: DLLEXPORT char* DLLCALL getsmsg(scfg_t* cfg, int usernumber);
        !            93: DLLEXPORT int  DLLCALL putsmsg(scfg_t* cfg, int usernumber, char *strin);
        !            94: DLLEXPORT char* DLLCALL getnmsg(scfg_t* cfg, int node_num);
        !            95: DLLEXPORT int  DLLCALL putnmsg(scfg_t* cfg, int num, char *strin);
        !            96: 
1.1       root       97: DLLEXPORT uint DLLCALL userdatdupe(scfg_t* cfg, uint usernumber, uint offset, uint datlen, char *dat
                     98:                                                        ,BOOL del);
                     99: 
                    100: DLLEXPORT BOOL DLLCALL chk_ar(scfg_t* cfg, uchar* str, user_t* user); /* checks access requirements */
                    101: 
                    102: DLLEXPORT int  DLLCALL getuserrec(scfg_t*, int usernumber, int start, int length, char *str);
                    103: DLLEXPORT int  DLLCALL putuserrec(scfg_t*, int usernumber, int start, uint length, char *str);
                    104: DLLEXPORT ulong        DLLCALL adjustuserrec(scfg_t*, int usernumber, int start, int length, long adj);
1.1.1.2 ! root      105: DLLEXPORT BOOL DLLCALL logoutuserdat(scfg_t*, user_t*, time_t now, time_t logontime);
        !           106: DLLEXPORT void DLLCALL resetdailyuserdat(scfg_t*, user_t*);
1.1       root      107: DLLEXPORT void DLLCALL subtract_cdt(scfg_t*, user_t*, long amt);
1.1.1.2 ! root      108: DLLEXPORT int  DLLCALL user_rec_len(int offset);
        !           109: DLLEXPORT BOOL DLLCALL is_download_free(scfg_t* cfg, uint dirnum, user_t* user);
        !           110: DLLEXPORT BOOL DLLCALL filter_ip(scfg_t* cfg, char* prot, char* reason, char* host, char* ip_addr, char* username, char* fname);
1.1       root      111: 
                    112: #ifdef __cplusplus
                    113: }
                    114: #endif
                    115: 
1.1.1.2 ! root      116: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.