summary refs log tree commit diff stats
path: root/src/common/outbound.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-08-10 16:51:56 -0400
committerTingPing <tingping@tingping.se>2013-08-10 16:51:56 -0400
commitb2d2187b20c95e8583c53c79cb2830ab22094472 (patch)
treeeadbd10eb398bd1d87cf8548e5318e96bef0a84a /src/common/outbound.c
parent1c30e0c124a5ecbec4ccf86be32e9a234efe5822 (diff)
Only replace variables in connect commands
Diffstat (limited to 'src/common/outbound.c')
-rw-r--r--src/common/outbound.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/common/outbound.c b/src/common/outbound.c
index 91188a8a..0141cccc 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -4551,7 +4551,6 @@ handle_command (session *sess, char *cmd, int check_spch)
 	char tbuf_static[TBUFSIZE];
 	char *pdibuf;
 	char *tbuf;
-	char *cmd_vars;
 	int len;
 	int ret = TRUE;
 
@@ -4563,9 +4562,7 @@ handle_command (session *sess, char *cmd, int check_spch)
 	command_level++;
 	/* anything below MUST DEC command_level before returning */
 
-	cmd_vars = command_insert_vars (sess, cmd);
-
-	len = strlen (cmd_vars);
+	len = strlen (cmd);
 	if (len >= sizeof (pdibuf_static))
 	{
 		pdibuf = malloc (len + 1);
@@ -4585,7 +4582,7 @@ handle_command (session *sess, char *cmd, int check_spch)
 	}
 
 	/* split the text into words and word_eol */
-	process_data_init (pdibuf, cmd_vars, word, word_eol, TRUE, TRUE);
+	process_data_init (pdibuf, cmd, word, word_eol, TRUE, TRUE);
 
 	/* ensure an empty string at index 32 for cmd_deop etc */
 	/* (internal use only, plugins can still only read 1-31). */
@@ -4596,12 +4593,12 @@ handle_command (session *sess, char *cmd, int check_spch)
 	/* redo it without quotes processing, for some commands like /JOIN */
 	if (int_cmd && !int_cmd->handle_quotes)
 	{
-		process_data_init (pdibuf, cmd_vars, word, word_eol, FALSE, FALSE);
+		process_data_init (pdibuf, cmd, word, word_eol, FALSE, FALSE);
 	}
 
 	if (check_spch && prefs.hex_input_perc_color)
 	{
-		check_special_chars (cmd_vars, prefs.hex_input_perc_ascii);
+		check_special_chars (cmd, prefs.hex_input_perc_ascii);
 	}
 
 	if (plugin_emit_command (sess, word[1], word, word_eol))
@@ -4668,7 +4665,7 @@ handle_command (session *sess, char *cmd, int check_spch)
 		}
 		else
 		{
-			sess->server->p_raw (sess->server, cmd_vars);
+			sess->server->p_raw (sess->server, cmd);
 		}
 	}
 
@@ -4685,8 +4682,6 @@ xit:
 		free (tbuf);
 	}
 
-	g_free (cmd_vars);
-
 	return ret;
 }