Index: dcc.c
===================================================================
--- dcc.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ dcc.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -214,5 +214,5 @@
 	                      df->ft->file_name, ipaddr, port, df->ft->file_size);
 
-	irc_send_msg_raw(iu, "PRIVMSG", iu->irc->user->nick, cmd, 0);
+	irc_send_msg_raw(iu, "PRIVMSG", iu->irc->user->nick, cmd);
 
 	g_free(cmd);
Index: irc.h
===================================================================
--- irc.h	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc.h	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -343,6 +343,6 @@
 void irc_send_whois(irc_user_t *iu);
 void irc_send_who(irc_t *irc, GSList *l, const char *channel);
-void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts);
-void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg);
+void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix);
+void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char *msg);
 void irc_send_msg_f(irc_user_t *iu, const char *type, const char *dst, const char *format, ...) G_GNUC_PRINTF(4, 5);
 void irc_send_nick(irc_user_t *iu, const char *new_nick);
@@ -352,4 +352,7 @@
 void irc_send_cap(irc_t *irc, char *subcommand, char *body);
 void irc_send_away_notify(irc_user_t *iu);
+
+G_GNUC_INTERNAL void irc_send_msg_ts(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts);
+G_GNUC_INTERNAL void irc_send_msg_raw_tags(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg);
 
 /* irc_user.c */
@@ -365,5 +368,5 @@
 char *set_eval_timezone(struct set *set, char *value);
 char *irc_format_timestamp(irc_t *irc, time_t msg_ts);
-char *irc_format_servertime(irc_t *irc, time_t msg_ts);
+G_GNUC_INTERNAL char *irc_format_servertime(irc_t *irc, time_t msg_ts);
 char *set_eval_self_messages(struct set *set, char *value);
 
Index: irc_channel.c
===================================================================
--- irc_channel.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc_channel.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -500,5 +500,5 @@
 	va_end(params);
 
-	irc_send_msg(ic->irc->root, "PRIVMSG", ic->name, text, NULL, 0);
+	irc_send_msg(ic->irc->root, "PRIVMSG", ic->name, text, NULL);
 	g_free(text);
 }
Index: irc_commands.c
===================================================================
--- irc_commands.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc_commands.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -524,5 +524,5 @@
 	   for lag checks, so try to support that. */
 	if (nick_cmp(NULL, cmd[1], irc->user->nick) == 0) {
-		irc_send_msg(irc->user, "NOTICE", irc->user->nick, cmd[2], NULL, 0);
+		irc_send_msg(irc->user, "NOTICE", irc->user->nick, cmd[2], NULL);
 	} else if ((iu = irc_user_by_name(irc, cmd[1]))) {
 		iu->f->privmsg(iu, cmd[2]);
@@ -825,5 +825,5 @@
 	int i;
 
-	irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS OK", 0);
+	irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS OK");
 
 	for (i = 0; root_commands[i].command; i++) {
@@ -839,5 +839,5 @@
 	}
 
-	irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS END", 0);
+	irc_send_msg_raw(irc->root, "NOTICE", irc->user->nick, "COMPLETIONS END");
 }
 
Index: irc_im.c
===================================================================
--- irc_im.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc_im.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -305,5 +305,5 @@
 
 	wrapped = word_wrap(msg, IRC_WORD_WRAP);
-	irc_send_msg(src_iu, message_type, dst, wrapped, prefix, sent_at);
+	irc_send_msg_ts(src_iu, message_type, dst, wrapped, prefix, sent_at);
 	g_free(wrapped);
 
@@ -347,5 +347,5 @@
 	g_string_append_c(msg, '\001');
 
-	irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL, 0);
+	irc_send_msg((irc_user_t *) bu->ui_data, "NOTICE", irc->user->nick, msg->str, NULL);
 
 	g_string_free(msg, TRUE);
@@ -707,5 +707,5 @@
 
 	wrapped = word_wrap(msg, IRC_WORD_WRAP);
-	irc_send_msg(iu, "PRIVMSG", ic->name, wrapped, ts, sent_at);
+	irc_send_msg_ts(iu, "PRIVMSG", ic->name, wrapped, ts, sent_at);
 	g_free(ts);
 	g_free(wrapped);
@@ -819,5 +819,5 @@
 	irc_send_msg_f(iu, "PRIVMSG", irc->user->nick, "<< \002BitlBee\002 - Invitation to chatroom %s >>", name);
 	if (msg) {
-		irc_send_msg(iu, "PRIVMSG", irc->user->nick, msg, NULL, 0);
+		irc_send_msg(iu, "PRIVMSG", irc->user->nick, msg, NULL);
 	}
 	if (chan) {
Index: irc_send.c
===================================================================
--- irc_send.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc_send.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -136,5 +136,5 @@
 
 	dst = irc_user_msgdest(iu);
-	irc_send_msg(iu, cmd, dst, text, NULL, 0);
+	irc_send_msg(iu, cmd, dst, text, NULL);
 }
 
@@ -363,5 +363,10 @@
 }
 
-void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts)
+void irc_send_msg(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix)
+{
+	irc_send_msg_ts(iu, type, dst, msg, prefix, 0);
+}
+
+void irc_send_msg_ts(irc_user_t *iu, const char *type, const char *dst, const char *msg, const char *prefix, time_t ts)
 {
 	char last = 0;
@@ -384,6 +389,7 @@
 		}
 		if (*s == 0 || *s == '\n') {
-			if (ts)
+			if (ts) {
 				tags = irc_format_servertime(iu->irc, ts);
+			}
 			if (g_strncasecmp(line, "/me ", 4) == 0 && (!prefix || !*prefix) &&
 			    g_strcasecmp(type, "PRIVMSG") == 0) {
@@ -391,5 +397,5 @@
 				strncat(raw_msg, line + 4, s - line - 4);
 				strcat(raw_msg, "\001");
-				irc_send_msg_raw(iu, type, dst, tags, raw_msg);
+				irc_send_msg_raw_tags(iu, type, dst, tags, raw_msg);
 			} else {
 				*raw_msg = '\0';
@@ -398,8 +404,9 @@
 				}
 				strncat(raw_msg, line, s - line);
-				irc_send_msg_raw(iu, type, dst, tags, raw_msg);
+				irc_send_msg_raw_tags(iu, type, dst, tags, raw_msg);
 			}
-			if (ts)
+			if (ts) {
 				g_free(tags);
+			}
 			line = s + 1;
 		}
@@ -408,5 +415,10 @@
 }
 
-void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg)
+void irc_send_msg_raw(irc_user_t *iu, const char *type, const char *dst, const char *msg)
+{
+	irc_send_msg_raw_tags(iu, type, dst, NULL, msg);
+}
+
+void irc_send_msg_raw_tags(irc_user_t *iu, const char *type, const char *dst, const char* tags, const char *msg)
 {
 	irc_write(iu->irc, "%s%s:%s!%s@%s %s %s :%s",
Index: irc_user.c
===================================================================
--- irc_user.c	(revision f7cc73457c8f1763c31fb8d62a89971b2431d9b9)
+++ irc_user.c	(revision 9767d0385bd3089b6f7200846f2956718f126130)
@@ -261,5 +261,5 @@
 static gboolean self_privmsg(irc_user_t *iu, const char *msg)
 {
-	irc_send_msg(iu, "PRIVMSG", iu->nick, msg, NULL, 0);
+	irc_send_msg(iu, "PRIVMSG", iu->nick, msg, NULL);
 
 	return TRUE;
