2 * Citadel Extension Loader
3 * Originally written by Brian Costello <btx@calyx.net>
5 * Copyright (c) 1987-2020 by the citadel.org team
7 * This program is open source software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 3.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
20 #include <libcitadel.h>
21 #include "sysdep_decls.h"
22 #include "modules/crypto/serv_crypto.h" /* Needed until a universal crypto startup hook is implimented for CtdlStartTLS */
23 #include "serv_extensions.h"
24 #include "ctdl_module.h"
29 * Structure defentitions for hook tables
32 typedef struct FixedOutputHook FixedOutputHook;
33 struct FixedOutputHook {
34 FixedOutputHook *next;
35 char content_type[64];
36 void (*h_function_pointer) (char *, int);
38 FixedOutputHook *FixedOutputTable = NULL;
42 * SessionFunctionHook extensions are used for any type of hook for which
43 * the context in which it's being called (which is determined by the event
44 * type) will make it obvious for the hook function to know where to look for
47 typedef struct SessionFunctionHook SessionFunctionHook;
48 struct SessionFunctionHook {
49 SessionFunctionHook *next;
51 void (*h_function_pointer) (void);
54 SessionFunctionHook *SessionHookTable = NULL;
58 * UserFunctionHook extensions are used for any type of hook which implements
59 * an operation on a user or username (potentially) other than the one
60 * operating the current session.
62 typedef struct UserFunctionHook UserFunctionHook;
63 struct UserFunctionHook {
64 UserFunctionHook *next;
65 void (*h_function_pointer) (struct ctdluser *usbuf);
68 UserFunctionHook *UserHookTable = NULL;
72 * MessageFunctionHook extensions are used for hooks which implement handlers
73 * for various types of message operations (save, read, etc.)
75 typedef struct MessageFunctionHook MessageFunctionHook;
76 struct MessageFunctionHook {
77 MessageFunctionHook *next;
78 int (*h_function_pointer) (struct CtdlMessage *msg, recptypes *recps);
81 MessageFunctionHook *MessageHookTable = NULL;
85 * DeleteFunctionHook extensions are used for hooks which get called when a
86 * message is about to be deleted.
88 typedef struct DeleteFunctionHook DeleteFunctionHook;
89 struct DeleteFunctionHook {
90 DeleteFunctionHook *next;
91 void (*h_function_pointer) (char *target_room, long msgnum);
93 DeleteFunctionHook *DeleteHookTable = NULL;
97 * ExpressMessageFunctionHook extensions are used for hooks which implement
98 * the sending of an instant message through various channels. Any function
99 * registered should return the number of recipients to whom the message was
100 * successfully transmitted.
102 typedef struct XmsgFunctionHook XmsgFunctionHook;
103 struct XmsgFunctionHook {
104 XmsgFunctionHook *next;
105 int (*h_function_pointer) (char *, char *, char *, char *);
108 XmsgFunctionHook *XmsgHookTable = NULL;
112 * RoomFunctionHook extensions are used for hooks which impliment room
113 * processing functions when new messages are added.
115 typedef struct RoomFunctionHook RoomFunctionHook;
116 struct RoomFunctionHook {
117 RoomFunctionHook *next;
118 int (*fcn_ptr) (struct ctdlroom *);
120 RoomFunctionHook *RoomHookTable = NULL;
123 typedef struct SearchFunctionHook SearchFunctionHook;
124 struct SearchFunctionHook {
125 SearchFunctionHook *next;
126 void (*fcn_ptr) (int *, long **, const char *);
129 SearchFunctionHook *SearchFunctionHookTable = NULL;
131 CleanupFunctionHook *CleanupHookTable = NULL;
132 CleanupFunctionHook *EVCleanupHookTable = NULL;
134 ServiceFunctionHook *ServiceHookTable = NULL;
136 typedef struct ProtoFunctionHook ProtoFunctionHook;
137 struct ProtoFunctionHook {
138 void (*handler) (char *cmdbuf);
143 HashList *ProtoHookList = NULL;
146 #define ERR_PORT (1 << 1)
149 static StrBuf *portlist = NULL;
150 static StrBuf *errormessages = NULL;
153 long DetailErrorFlags;
154 ConstStr Empty = {HKEY("")};
155 char *ErrSubject = "Startup Problems";
156 ConstStr ErrGeneral[] = {
157 {HKEY("Citadel had trouble on starting up. ")},
158 {HKEY(" This means, Citadel won't be the service provider for a specific service you configured it to.\n\n"
159 "If you don't want Citadel to provide these services, turn them off in WebCit via: ")},
160 {HKEY("To make both ways actualy take place restart the citserver with \"sendcommand down\"\n\n"
161 "The errors returned by the system were:\n")},
162 {HKEY("You can recheck the above if you follow this faq item:\n"
163 "http://www.citadel.org/doku.php?id=faq:mastering_your_os:net#netstat")}
166 ConstStr ErrPortShort = { HKEY("We couldn't bind all ports you configured to be provided by Citadel Server.\n")};
167 ConstStr ErrPortWhere = { HKEY("\"Admin->System Preferences->Network\".\n\nThe failed ports and sockets are: ")};
168 ConstStr ErrPortHint = { HKEY("If you want Citadel to provide you with that functionality, "
169 "check the output of \"netstat -lnp\" on Linux, or \"netstat -na\" on BSD"
170 " and disable the program that binds these ports.\n")};
173 void LogPrintMessages(long err)
176 StrBuf *List, *DetailList;
177 ConstStr *Short, *Where, *Hint;
180 Message = NewStrBufPlain(NULL, StrLength(portlist) + StrLength(errormessages));
182 DetailErrorFlags = DetailErrorFlags & ~err;
187 Short = &ErrPortShort;
188 Where = &ErrPortWhere;
191 DetailList = errormessages;
201 StrBufAppendBufPlain(Message, CKEY(ErrGeneral[0]), 0);
202 StrBufAppendBufPlain(Message, CKEY(*Short), 0);
203 StrBufAppendBufPlain(Message, CKEY(ErrGeneral[1]), 0);
204 StrBufAppendBufPlain(Message, CKEY(*Where), 0);
205 StrBufAppendBuf(Message, List, 0);
206 StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
207 StrBufAppendBufPlain(Message, CKEY(*Hint), 0);
208 StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
209 StrBufAppendBufPlain(Message, CKEY(ErrGeneral[2]), 0);
210 StrBufAppendBuf(Message, DetailList, 0);
211 StrBufAppendBufPlain(Message, HKEY("\n\n"), 0);
212 StrBufAppendBufPlain(Message, CKEY(ErrGeneral[3]), 0);
214 syslog(LOG_EMERG, "extensions: %s", ChrPtr(Message));
215 syslog(LOG_EMERG, "extensions: %s", ErrSubject);
216 quickie_message("Citadel", NULL, NULL, AIDEROOM, ChrPtr(Message), FMT_FIXED, ErrSubject);
218 FreeStrBuf(&Message);
220 FreeStrBuf(&DetailList);
224 void AddPortError(char *Port, char *ErrorMessage)
228 DetailErrorFlags |= ERR_PORT;
230 len = StrLength(errormessages);
231 if (len > 0) StrBufAppendBufPlain(errormessages, HKEY("; "), 0);
232 else errormessages = NewStrBuf();
233 StrBufAppendBufPlain(errormessages, ErrorMessage, -1, 0);
236 len = StrLength(portlist);
237 if (len > 0) StrBufAppendBufPlain(portlist, HKEY(";"), 0);
238 else portlist = NewStrBuf();
239 StrBufAppendBufPlain(portlist, Port, -1, 0);
243 int DLoader_Exec_Cmd(char *cmdbuf)
246 ProtoFunctionHook *p;
248 if (GetHash(ProtoHookList, cmdbuf, 4, &vP) && (vP != NULL)) {
249 p = (ProtoFunctionHook*) vP;
250 p->handler(&cmdbuf[5]);
257 void CtdlRegisterProtoHook(void (*handler) (char *), char *cmd, char *desc)
259 ProtoFunctionHook *p;
261 if (ProtoHookList == NULL)
262 ProtoHookList = NewHash (1, FourHash);
265 p = (ProtoFunctionHook *)
266 malloc(sizeof(ProtoFunctionHook));
269 fprintf(stderr, "can't malloc new ProtoFunctionHook\n");
272 p->handler = handler;
276 Put(ProtoHookList, cmd, 4, p, NULL);
277 syslog(LOG_DEBUG, "extensions: registered server command %s (%s)", cmd, desc);
281 void CtdlRegisterCleanupHook(void (*fcn_ptr) (void))
284 CleanupFunctionHook *newfcn;
286 newfcn = (CleanupFunctionHook *)
287 malloc(sizeof(CleanupFunctionHook));
288 newfcn->next = CleanupHookTable;
289 newfcn->h_function_pointer = fcn_ptr;
290 CleanupHookTable = newfcn;
292 syslog(LOG_DEBUG, "extensions: registered a new cleanup function");
296 void CtdlUnregisterCleanupHook(void (*fcn_ptr) (void))
298 CleanupFunctionHook *cur, *p, *last;
300 cur = CleanupHookTable;
303 if (fcn_ptr == cur->h_function_pointer)
305 syslog(LOG_DEBUG, "extensions: unregistered cleanup function");
314 CleanupHookTable = p;
325 void CtdlRegisterEVCleanupHook(void (*fcn_ptr) (void))
328 CleanupFunctionHook *newfcn;
330 newfcn = (CleanupFunctionHook *)
331 malloc(sizeof(CleanupFunctionHook));
332 newfcn->next = EVCleanupHookTable;
333 newfcn->h_function_pointer = fcn_ptr;
334 EVCleanupHookTable = newfcn;
336 syslog(LOG_DEBUG, "extensions: registered a new cleanup function");
340 void CtdlUnregisterEVCleanupHook(void (*fcn_ptr) (void))
342 CleanupFunctionHook *cur, *p, *last;
344 cur = EVCleanupHookTable;
347 if (fcn_ptr == cur->h_function_pointer)
349 syslog(LOG_DEBUG, "extensions: unregistered cleanup function");
358 EVCleanupHookTable = p;
369 void CtdlRegisterSessionHook(void (*fcn_ptr) (void), int EventType, int Priority)
371 SessionFunctionHook *newfcn;
373 newfcn = (SessionFunctionHook *)
374 malloc(sizeof(SessionFunctionHook));
375 newfcn->Priority = Priority;
376 newfcn->h_function_pointer = fcn_ptr;
377 newfcn->eventtype = EventType;
379 SessionFunctionHook **pfcn;
380 pfcn = &SessionHookTable;
381 while ((*pfcn != NULL) &&
382 ((*pfcn)->Priority < newfcn->Priority) &&
383 ((*pfcn)->next != NULL))
384 pfcn = &(*pfcn)->next;
386 newfcn->next = *pfcn;
389 syslog(LOG_DEBUG, "extensions: registered a new session function (type %d Priority %d)", EventType, Priority);
393 void CtdlUnregisterSessionHook(void (*fcn_ptr) (void), int EventType)
395 SessionFunctionHook *cur, *p, *last;
397 cur = SessionHookTable;
398 while (cur != NULL) {
399 if ((fcn_ptr == cur->h_function_pointer) &&
400 (EventType == cur->eventtype))
402 syslog(LOG_DEBUG, "extensions: unregistered session function (type %d)", EventType);
411 SessionHookTable = p;
422 void CtdlRegisterUserHook(void (*fcn_ptr) (ctdluser *), int EventType)
425 UserFunctionHook *newfcn;
427 newfcn = (UserFunctionHook *)
428 malloc(sizeof(UserFunctionHook));
429 newfcn->next = UserHookTable;
430 newfcn->h_function_pointer = fcn_ptr;
431 newfcn->eventtype = EventType;
432 UserHookTable = newfcn;
434 syslog(LOG_DEBUG, "extensions: registered a new user function (type %d)",
439 void CtdlUnregisterUserHook(void (*fcn_ptr) (struct ctdluser *), int EventType)
441 UserFunctionHook *cur, *p, *last;
444 while (cur != NULL) {
445 if ((fcn_ptr == cur->h_function_pointer) &&
446 (EventType == cur->eventtype))
448 syslog(LOG_DEBUG, "extensions: unregistered user function (type %d)", EventType);
468 void CtdlRegisterMessageHook(int (*handler)(struct CtdlMessage *, recptypes *), int EventType)
471 MessageFunctionHook *newfcn;
473 newfcn = (MessageFunctionHook *)
474 malloc(sizeof(MessageFunctionHook));
475 newfcn->next = MessageHookTable;
476 newfcn->h_function_pointer = handler;
477 newfcn->eventtype = EventType;
478 MessageHookTable = newfcn;
480 syslog(LOG_DEBUG, "extensions: registered a new message function (type %d)", EventType);
484 void CtdlUnregisterMessageHook(int (*handler)(struct CtdlMessage *, recptypes *), int EventType)
486 MessageFunctionHook *cur, *p, *last;
488 cur = MessageHookTable;
489 while (cur != NULL) {
490 if ((handler == cur->h_function_pointer) &&
491 (EventType == cur->eventtype))
493 syslog(LOG_DEBUG, "extensions: unregistered message function (type %d)", EventType);
501 MessageHookTable = p;
512 void CtdlRegisterRoomHook(int (*fcn_ptr)(struct ctdlroom *))
514 RoomFunctionHook *newfcn;
516 newfcn = (RoomFunctionHook *)
517 malloc(sizeof(RoomFunctionHook));
518 newfcn->next = RoomHookTable;
519 newfcn->fcn_ptr = fcn_ptr;
520 RoomHookTable = newfcn;
522 syslog(LOG_DEBUG, "extensions: registered a new room function");
526 void CtdlUnregisterRoomHook(int (*fcn_ptr)(struct ctdlroom *))
528 RoomFunctionHook *cur, *p, *last;
533 if (fcn_ptr == cur->fcn_ptr) {
534 syslog(LOG_DEBUG, "extensions: unregistered room function");
554 void CtdlRegisterDeleteHook(void (*handler)(char *, long) )
556 DeleteFunctionHook *newfcn;
558 newfcn = (DeleteFunctionHook *)
559 malloc(sizeof(DeleteFunctionHook));
560 newfcn->next = DeleteHookTable;
561 newfcn->h_function_pointer = handler;
562 DeleteHookTable = newfcn;
564 syslog(LOG_DEBUG, "extensions: registered a new delete function");
568 void CtdlUnregisterDeleteHook(void (*handler)(char *, long) )
570 DeleteFunctionHook *cur, *p, *last;
573 cur = DeleteHookTable;
574 while (cur != NULL) {
575 if (handler == cur->h_function_pointer )
577 syslog(LOG_DEBUG, "extensions: unregistered delete function");
596 void CtdlRegisterFixedOutputHook(char *content_type, void (*handler)(char *, int) )
598 FixedOutputHook *newfcn;
600 newfcn = (FixedOutputHook *)
601 malloc(sizeof(FixedOutputHook));
602 newfcn->next = FixedOutputTable;
603 newfcn->h_function_pointer = handler;
604 safestrncpy(newfcn->content_type, content_type, sizeof newfcn->content_type);
605 FixedOutputTable = newfcn;
607 syslog(LOG_DEBUG, "extensions: registered a new fixed output function for %s", newfcn->content_type);
611 void CtdlUnregisterFixedOutputHook(char *content_type)
613 FixedOutputHook *cur, *p, *last;
616 cur = FixedOutputTable;
617 while (cur != NULL) {
618 /* This will also remove duplicates if any */
619 if (!strcasecmp(content_type, cur->content_type)) {
620 syslog(LOG_DEBUG, "extensions: unregistered fixed output function for %s", content_type);
627 FixedOutputTable = p;
640 /* returns nonzero if we found a hook and used it */
641 int PerformFixedOutputHooks(char *content_type, char *content, int content_length)
643 FixedOutputHook *fcn;
645 for (fcn = FixedOutputTable; fcn != NULL; fcn = fcn->next) {
646 if (!strcasecmp(content_type, fcn->content_type)) {
647 (*fcn->h_function_pointer) (content, content_length);
655 void CtdlRegisterXmsgHook(int (*fcn_ptr) (char *, char *, char *, char *), int order)
658 XmsgFunctionHook *newfcn;
660 newfcn = (XmsgFunctionHook *) malloc(sizeof(XmsgFunctionHook));
661 newfcn->next = XmsgHookTable;
662 newfcn->order = order;
663 newfcn->h_function_pointer = fcn_ptr;
664 XmsgHookTable = newfcn;
665 syslog(LOG_DEBUG, "extensions: registered a new x-msg function (priority %d)", order);
669 void CtdlUnregisterXmsgHook(int (*fcn_ptr) (char *, char *, char *, char *), int order)
671 XmsgFunctionHook *cur, *p, *last;
675 while (cur != NULL) {
676 /* This will also remove duplicates if any */
677 if (fcn_ptr == cur->h_function_pointer &&
678 order == cur->order) {
679 syslog(LOG_DEBUG, "extensions: unregistered x-msg function (priority %d)", order);
699 void CtdlRegisterServiceHook(int tcp_port,
701 void (*h_greeting_function) (void),
702 void (*h_command_function) (void),
703 void (*h_async_function) (void),
704 const char *ServiceName)
706 ServiceFunctionHook *newfcn;
709 newfcn = (ServiceFunctionHook *) malloc(sizeof(ServiceFunctionHook));
710 message = (char*) malloc (SIZ + SIZ);
712 newfcn->next = ServiceHookTable;
713 newfcn->tcp_port = tcp_port;
714 newfcn->sockpath = sockpath;
715 newfcn->h_greeting_function = h_greeting_function;
716 newfcn->h_command_function = h_command_function;
717 newfcn->h_async_function = h_async_function;
718 newfcn->ServiceName = ServiceName;
720 if (sockpath != NULL) {
721 newfcn->msock = ctdl_uds_server(sockpath, CtdlGetConfigInt("c_maxsessions"));
722 snprintf(message, SIZ, "extensions: unix domain socket '%s': ", sockpath);
724 else if (tcp_port <= 0) { /* port -1 to disable */
725 syslog(LOG_INFO, "extensions: service %s has been manually disabled, skipping", ServiceName);
731 newfcn->msock = ctdl_tcp_server(CtdlGetConfigStr("c_ip_addr"), tcp_port, CtdlGetConfigInt("c_maxsessions"));
732 snprintf(message, SIZ, "extensions: TCP port %s:%d: (%s) ",
733 CtdlGetConfigStr("c_ip_addr"), tcp_port, ServiceName);
736 if (newfcn->msock > 0) {
737 ServiceHookTable = newfcn;
738 strcat(message, "registered.");
739 syslog(LOG_INFO, "%s", message);
742 AddPortError(message, "failed");
743 strcat(message, "FAILED.");
744 syslog(LOG_ERR, "%s", message);
751 void CtdlUnregisterServiceHook(int tcp_port, char *sockpath,
752 void (*h_greeting_function) (void),
753 void (*h_command_function) (void),
754 void (*h_async_function) (void)
757 ServiceFunctionHook *cur, *p, *last;
760 cur = ServiceHookTable;
761 while (cur != NULL) {
762 /* This will also remove duplicates if any */
763 if (h_greeting_function == cur->h_greeting_function &&
764 h_command_function == cur->h_command_function &&
765 h_async_function == cur->h_async_function &&
766 tcp_port == cur->tcp_port &&
767 !(sockpath && cur->sockpath && strcmp(sockpath, cur->sockpath)) )
772 syslog(LOG_INFO, "extensions: closed UNIX domain socket %s", sockpath);
774 } else if (tcp_port) {
775 syslog(LOG_INFO, "extensions: closed TCP port %d", tcp_port);
777 syslog(LOG_INFO, "extensions: unregistered service \"%s\"", cur->ServiceName);
784 ServiceHookTable = p;
795 void CtdlShutdownServiceHooks(void)
797 /* sort of a duplicate of close_masters() but called earlier */
798 ServiceFunctionHook *cur;
800 cur = ServiceHookTable;
803 if (cur->msock != -1)
807 if (cur->sockpath != NULL){
808 syslog(LOG_INFO, "extensions: [%s] Closed UNIX domain socket %s", cur->ServiceName, cur->sockpath);
809 unlink(cur->sockpath);
811 syslog(LOG_INFO, "extensions: [%s] closing service", cur->ServiceName);
819 void CtdlRegisterSearchFuncHook(void (*fcn_ptr)(int *, long **, const char *), char *name)
821 SearchFunctionHook *newfcn;
823 if (!name || !fcn_ptr) {
827 newfcn = (SearchFunctionHook *)
828 malloc(sizeof(SearchFunctionHook));
829 newfcn->next = SearchFunctionHookTable;
831 newfcn->fcn_ptr = fcn_ptr;
832 SearchFunctionHookTable = newfcn;
834 syslog(LOG_DEBUG, "extensions: registered a new search function (%s)", name);
837 void CtdlUnregisterSearchFuncHook(void (*fcn_ptr)(int *, long **, const char *), char *name)
839 SearchFunctionHook *cur, *p, *last;
842 cur = SearchFunctionHookTable;
843 while (cur != NULL) {
845 (cur->fcn_ptr == fcn_ptr) &&
846 name && !strcmp(name, cur->name))
848 syslog(LOG_DEBUG, "extensions: unregistered search function(%s)", name);
854 SearchFunctionHookTable = p;
865 void CtdlModuleDoSearch(int *num_msgs, long **search_msgs, const char *search_string, const char *func_name)
867 SearchFunctionHook *fcn = NULL;
869 for (fcn = SearchFunctionHookTable; fcn != NULL; fcn = fcn->next) {
870 if (!func_name || !strcmp(func_name, fcn->name)) {
871 (*fcn->fcn_ptr) (num_msgs, search_msgs, search_string);
879 void PerformSessionHooks(int EventType)
881 SessionFunctionHook *fcn = NULL;
883 for (fcn = SessionHookTable; fcn != NULL; fcn = fcn->next) {
884 if (fcn->eventtype == EventType) {
885 if (EventType == EVT_TIMER) {
886 pthread_setspecific(MyConKey, NULL); /* for every hook */
888 (*fcn->h_function_pointer) ();
893 void PerformUserHooks(ctdluser *usbuf, int EventType)
895 UserFunctionHook *fcn = NULL;
897 for (fcn = UserHookTable; fcn != NULL; fcn = fcn->next) {
898 if (fcn->eventtype == EventType) {
899 (*fcn->h_function_pointer) (usbuf);
904 int PerformMessageHooks(struct CtdlMessage *msg, recptypes *recps, int EventType)
906 MessageFunctionHook *fcn = NULL;
907 int total_retval = 0;
909 /* Other code may elect to protect this message from server-side
910 * handlers; if this is the case, don't do anything.
912 if (msg->cm_flags & CM_SKIP_HOOKS) {
916 /* Otherwise, run all the hooks appropriate to this event type.
918 for (fcn = MessageHookTable; fcn != NULL; fcn = fcn->next) {
919 if (fcn->eventtype == EventType) {
920 total_retval = total_retval + (*fcn->h_function_pointer) (msg, recps);
924 /* Return the sum of the return codes from the hook functions. If
925 * this is an EVT_BEFORESAVE event, a nonzero return code will cause
926 * the save operation to abort.
932 int PerformRoomHooks(struct ctdlroom *target_room)
934 RoomFunctionHook *fcn;
935 int total_retval = 0;
937 syslog(LOG_DEBUG, "extensions: performing room hooks for <%s>", target_room->QRname);
939 for (fcn = RoomHookTable; fcn != NULL; fcn = fcn->next) {
940 total_retval = total_retval + (*fcn->fcn_ptr) (target_room);
943 /* Return the sum of the return codes from the hook functions.
949 void PerformDeleteHooks(char *room, long msgnum)
951 DeleteFunctionHook *fcn;
953 for (fcn = DeleteHookTable; fcn != NULL; fcn = fcn->next) {
954 (*fcn->h_function_pointer) (room, msgnum);
959 int PerformXmsgHooks(char *sender, char *sender_email, char *recp, char *msg)
961 XmsgFunctionHook *fcn;
965 for (p=0; p<MAX_XMSG_PRI; ++p) {
966 for (fcn = XmsgHookTable; fcn != NULL; fcn = fcn->next) {
967 if (fcn->order == p) {
969 (*fcn->h_function_pointer)
970 (sender, sender_email, recp, msg);
973 /* Break out of the loop if a higher-priority function
974 * successfully delivered the message. This prevents duplicate
975 * deliveries to local users simultaneously signed onto
978 if (total_sent) break;
985 * Dirty hack until we impliment a hook mechanism for this
987 void CtdlModuleStartCryptoMsgs(char *ok_response, char *nosup_response, char *error_response)
990 CtdlStartTLS (ok_response, nosup_response, error_response);
995 CTDL_MODULE_INIT(modules)