summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-04-03 18:10:14 -0400
committerTingPing <tingping@tingping.se>2013-04-03 18:10:14 -0400
commit86cf7de430ce9d1d255ec82476aca5ffd5146dd9 (patch)
tree786e034fa1ef8843eef289f6e52a1e1a96497b8f /src/common
parent477d7470c1da3fae092687d0dbf5dbab5d37633a (diff)
add %u to userlist popups for account
Diffstat (limited to 'src/common')
-rw-r--r--src/common/ctcp.c2
-rw-r--r--src/common/outbound.c6
-rw-r--r--src/common/outbound.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/common/ctcp.c b/src/common/ctcp.c
index d02355cf..ebfb604d 100644
--- a/src/common/ctcp.c
+++ b/src/common/ctcp.c
@@ -48,7 +48,7 @@ ctcp_reply (session *sess, char *nick, char *word[], char *word_eol[],
 	/* process %C %B etc */
 	check_special_chars (conf, TRUE);
 	auto_insert (tbuf, sizeof (tbuf), conf, word, word_eol, "", "", word_eol[5],
-					 server_get_network (sess->server, TRUE), "", "", nick);
+					 server_get_network (sess->server, TRUE), "", "", nick, "");
 	free (conf);
 	handle_command (sess, tbuf, FALSE);
 }
diff --git a/src/common/outbound.c b/src/common/outbound.c
index c3325f7c..082ba812 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -3856,7 +3856,7 @@ help (session *sess, char *tbuf, char *helpcmd, int quiet)
 int
 auto_insert (char *dest, int destlen, unsigned char *src, char *word[],
 				 char *word_eol[], char *a, char *c, char *d, char *e, char *h,
-				 char *n, char *s)
+				 char *n, char *s, char *u)
 {
 	int num;
 	char buf[32];
@@ -3953,6 +3953,8 @@ auto_insert (char *dest, int destlen, unsigned char *src, char *word[],
 					utf = ctime (&now);
 					utf[19] = 0;
 					break;
+				case 'u':
+					utf = u; break;
 				case 'v':
 					utf = PACKAGE_VERSION; break;
 					break;
@@ -4172,7 +4174,7 @@ user_command (session * sess, char *tbuf, char *cmd, char *word[],
 {
 	if (!auto_insert (tbuf, 2048, cmd, word, word_eol, "", sess->channel, "",
 							server_get_network (sess->server, TRUE), "",
-							sess->server->nick, ""))
+							sess->server->nick, "", ""))
 	{
 		PrintText (sess, _("Bad arguments for user command.\n"));
 		return;
diff --git a/src/common/outbound.h b/src/common/outbound.h
index 6f45b121..7dc1ba97 100644
--- a/src/common/outbound.h
+++ b/src/common/outbound.h
@@ -24,7 +24,7 @@ extern const struct commands xc_cmds[];
 extern GSList *menu_list;
 
 int auto_insert (char *dest, int destlen, unsigned char *src, char *word[], char *word_eol[],
-				 char *a, char *c, char *d, char *e, char *h, char *n, char *s);
+				 char *a, char *c, char *d, char *e, char *h, char *n, char *s, char *u);
 int handle_command (session *sess, char *cmd, int check_spch);
 void process_data_init (char *buf, char *cmd, char *word[], char *word_eol[], gboolean handle_quotes, gboolean allow_escape_quotes);
 void handle_multiline (session *sess, char *cmd, int history, int nocommand);