/* helpfile.h - Help file loading and display
* Copyright 2000-2004 srvx Development Team
*
- * This file is part of srvx.
+ * This file is part of x3.
*
- * srvx is free software; you can redistribute it and/or modify
+ * x3 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
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
#define TABLE_REPEAT_ROWS 0x0004 /* put more than one row on a line? */
#define TABLE_NO_FREE 0x0008 /* don't free the contents? */
#define TABLE_NO_HEADERS 0x0010 /* is there actually no header? */
+#define TABLE_NO_FOOTER 0x0020 /* Dont send a -----End---- footer */
struct helpfile_table {
unsigned int length : 16;
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, ...);
int send_help(struct userNode *dest, struct userNode *src, struct helpfile *hf, const char *topic);
+int send_help_brief(struct userNode *dest, struct userNode *src, struct helpfile *hf, const char *topic);
/* size is maximum line width (up to MAX_LINE_SIZE); 0 means figure it out.
* irc_send is either irc_privmsg or irc_notice; NULL means figure it out. */
void table_send(struct userNode *from, const char *to, unsigned int size, irc_send_func irc_send, struct helpfile_table table);
-#define send_channel_message(CHANNEL, ARGS...) send_target_message(5, (CHANNEL)->name, ARGS)
-#define send_channel_notice(CHANNEL, ARGS...) send_target_message(4, (CHANNEL)->name, ARGS)
-#define send_channel_wallchops(CHANNEL, ARGS...) send_target_message(6, (CHANNEL)->name, ARGS)
+#if defined(GCC_VARMACROS)
+# define send_channel_message(CHANNEL, ARGS...) send_target_message(5, (CHANNEL)->name, ARGS)
+# define send_channel_notice(CHANNEL, ARGS...) send_target_message(4, (CHANNEL)->name, ARGS)
+# define send_channel_wallchops(CHANNEL, ARGS...) send_target_message(6, (CHANNEL)->name, ARGS)
+#elif defined(C99_VARMACROS)
+# define send_channel_message(CHANNEL, ...) send_target_message(5, (CHANNEL)->name, __VA_ARGS__)
+# define send_channel_notice(CHANNEL, ...) send_target_message(4, (CHANNEL)->name, __VA_ARGS__)
+# define send_channel_wallchops(CHANNEL, ...) send_target_message(6, (CHANNEL)->name, __VA_ARGS__)
+#endif
struct message_entry
{
struct helpfile *open_helpfile(const char *fname, expand_func_t expand);
void close_helpfile(struct helpfile *hf);
+#ifdef HAVE_HELPSERV
+const char *get_helpserv_id(const char *nick, struct userNode *user);
+#endif
+
#endif