/* helpfile.h - Help file loading and display
* Copyright 2000-2004 srvx Development Team
*
- * This program is free software; you can redistribute it and/or modify
+ * This file is part of srvx.
+ *
+ * srvx is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version. Important limitations are
- * listed in the COPYING file that accompanies this software.
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, email srvx-maintainers@srvx.net.
+ * along with srvx; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
#if !defined(HELPFILE_H)
extern struct userNode *message_dest; /* message destination; useful in expansion callbacks */
-#define MIN_LINE_SIZE 40
-#define MAX_LINE_SIZE 450
+#define MIN_LINE_SIZE 40
+#define MAX_LINE_SIZE 450
#define TABLE_REPEAT_HEADERS 0x0001 /* repeat the headers for each columnset? */
#define TABLE_PAD_LEFT 0x0002 /* pad cells on the left? */
extern struct language *lang_C;
extern struct dict *languages;
+#define MSG_TYPE_NOTICE 0
+#define MSG_TYPE_PRIVMSG 1
+#define MSG_TYPE_WALLCHOPS 2
+#define MSG_TYPE_NOXLATE 4
+#define MSG_TYPE_MULTILINE 8
+
int send_message(struct userNode *dest, struct userNode *src, const char *message, ...);
int send_message_type(int msg_type, struct userNode *dest, struct userNode *src, const char *message, ...);
int send_target_message(int msg_type, const char *dest, struct userNode *src, const char *format, ...);
const char *language_find_message(struct language *lang, const char *msgid);
#define handle_find_message(HANDLE, MSGID) language_find_message((HANDLE) ? (HANDLE)->language : lang_C, (MSGID))
#define user_find_message(USER, MSGID) language_find_message((USER)->handle_info ? (USER)->handle_info->language : lang_C, (MSGID))
+void helpfile_init(void);
void helpfile_finalize(void);
struct helpfile *open_helpfile(const char *fname, expand_func_t expand);