X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=5ea37bfe57be087cf445a513766bfc1000295102;hb=b44a77a2aa913db5f48f01a8d58149c0df564684;hp=ca447f595e0398adb053d08cf2ef4d90a7b98a61;hpb=158e8958500476d1115c7b70f6c81a87bb0ade47;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index ca447f595..5ea37bfe5 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -26,18 +26,7 @@ #include #include #include - -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - +#include #include #include #ifdef HAVE_STRINGS_H @@ -247,21 +236,16 @@ unsigned CtdlCreateRoom(char *new_room_name, int CtdlGetRoom(struct ctdlroom *qrbuf, const char *room_name); int CtdlGetRoomLock(struct ctdlroom *qrbuf, char *room_name); int CtdlDoIHavePermissionToDeleteThisRoom(struct ctdlroom *qr); -void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, - int *result, int *view); +void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, int *result, int *view); void CtdlPutRoomLock(struct ctdlroom *qrbuf); typedef void (*ForEachRoomCallBack)(struct ctdlroom *EachRoom, void *out_data); void CtdlForEachRoom(ForEachRoomCallBack CB, void *in_data); typedef void (*ForEachRoomNetCfgCallBack)(struct ctdlroom *EachRoom, void *out_data, OneRoomNetCfg *OneRNCFG); -void CtdlForEachNetCfgRoom(ForEachRoomNetCfgCallBack CB, - void *in_data, - RoomNetCfg filter); +void CtdlForEachNetCfgRoom(ForEachRoomNetCfgCallBack CB, void *in_data, RoomNetCfg filter); void SaveChangedConfigs(void); - void CtdlDeleteRoom(struct ctdlroom *qrbuf); int CtdlRenameRoom(char *old_name, char *new_name, int new_floor); -void CtdlUserGoto (char *where, int display_result, int transiently, - int *msgs, int *new); +void CtdlUserGoto (char *where, int display_result, int transiently, int *msgs, int *new, long *oldest, long *newest); struct floor *CtdlGetCachedFloor(int floor_num); void CtdlScheduleRoomForDeletion(struct ctdlroom *qrbuf); void CtdlGetFloor (struct floor *flbuf, int floor_num); @@ -389,11 +373,27 @@ struct config { time_t c_pop3_fastest; int c_spam_flag_only; int c_guest_logins; + int c_nntp_port; + int c_nntps_port; }; +#define SET_CFGSTRBUF(which, buffer) safestrncpy(config.which, ChrPtr(buffer), sizeof(config.which)) +#define SET_CFGSTR(which, buffer) safestrncpy(config.which, buffer, sizeof(config.which)) + extern struct config config; +#define NODENAME config.c_nodename +#define FQDN config.c_fqdn +#define CTDLUID config.c_ctdluid +#define CREATAIDE config.c_creataide +#define REGISCALL config.c_regiscall +#define TWITDETECT config.c_twitdetect +#define TWITROOM config.c_twitroom +#define RESTRICT_INTERNET config.c_restrict + +#define CFG_KEY(which) config.which, strlen(config.which) + typedef void (*CfgLineParser)(const CfgLineType *ThisOne, StrBuf *Line, const char *LinePos, OneRoomNetCfg *rncfg); typedef void (*CfgLineSerializer)(const CfgLineType *ThisOne, StrBuf *OuptputBuffer, OneRoomNetCfg *rncfg, RoomNetCfgLine *data); typedef void (*CfgLineDeAllocator)(const CfgLineType *ThisOne, RoomNetCfgLine **data); @@ -487,6 +487,10 @@ int CtdlGetUserLen(struct ctdluser *usbuf, const char *name, long len); int CtdlGetUserLock(struct ctdluser *usbuf, char *name); void CtdlPutUser(struct ctdluser *usbuf); void CtdlPutUserLock(struct ctdluser *usbuf); + +int CtdlLockGetCurrentUser(void); +void CtdlPutCurrentUserLock(void); + int CtdlGetUserByNumber(struct ctdluser *usbuf, long number); void CtdlGetRelationship(visit *vbuf, struct ctdluser *rel_user,