summary refs log tree commit diff stats
path: root/src/common/text.h
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-06-22 00:13:36 +0100
committerDiogo Sousa <diogogsousa@gmail.com>2013-06-28 16:03:12 +0100
commit94186f7888d5a730e52e433a21698154dfcc4e2e (patch)
treec7ec4e195a92f0e81d130d1cfe47442e75a5637b /src/common/text.h
parentac5771377ea95287a99bfd5c8c99ec65e9bb069d (diff)
First step towards message tags extension support
(see http://ircv3.atheme.org/specification/message-tags-3.2).

In particular this commit implements a (very) dummy implementation
sketch of the server-time extension
(see http://ircv3.atheme.org/specification/message-tags-3.2 and #499).
Diffstat (limited to 'src/common/text.h')
-rw-r--r--src/common/text.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/text.h b/src/common/text.h
index 52cc8ea9..dc5e5f72 100644
--- a/src/common/text.h
+++ b/src/common/text.h
@@ -17,12 +17,17 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+#include <time.h>
 #include "textenums.h"
 
 #ifndef HEXCHAT_TEXT_H
 #define HEXCHAT_TEXT_H
 
-#define EMIT_SIGNAL(i, sess, a, b, c, d, e) text_emit(i, sess, a, b, c, d)
+/* timestamp is non-zero if we are using server-time */
+#define EMIT_SIGNAL_TIMESTAMP(i, sess, a, b, c, d, e, timestamp) \
+	text_emit(i, sess, a, b, c, d, timestamp)
+#define EMIT_SIGNAL(i, sess, a, b, c, d, e) \
+	text_emit(i, sess, a, b, c, d, 0)
 
 struct text_event
 {
@@ -46,7 +51,8 @@ int pevt_build_string (const char *input, char **output, int *max_arg);
 int pevent_load (char *filename);
 void pevent_make_pntevts (void);
 int text_color_of (char *name);
-void text_emit (int index, session *sess, char *a, char *b, char *c, char *d);
+void text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
+		time_t timestamp);
 int text_emit_by_name (char *name, session *sess, char *a, char *b, char *c, char *d);
 char *text_validate (char **text, int *len);
 int get_stamp_str (char *fmt, time_t tim, char **ret);