summary refs log tree commit diff stats
path: root/src/common/inbound.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-05-11 20:06:22 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-05-11 20:06:22 +0200
commitaf03fa3c7c78ce51017c9e71369e637d91f95208 (patch)
tree7e51e8f069dc5c2e4411069e5f921df1c99fec78 /src/common/inbound.c
parent4d30512e057f8f078e64542941fa1f9b4a24d470 (diff)
Fix connect commands
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r--src/common/inbound.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index 2383955e..4f23403f 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -1384,6 +1384,8 @@ inbound_nickserv_login (server *serv)
 void
 inbound_login_end (session *sess, char *text)
 {
+	GSList *cmdlist;
+	commandentry *cmd;
 	server *serv = sess->server;
 
 	if (!serv->end_of_motd)
@@ -1398,9 +1400,13 @@ inbound_login_end (session *sess, char *text)
 		if (serv->network)
 		{
 			/* there may be more than 1, separated by \n */
-			if (((ircnet *)serv->network)->command)
+
+			cmdlist = ((ircnet *)serv->network)->commandlist;
+			while (cmdlist)
 			{
-				token_foreach (((ircnet *)serv->network)->command, '\n', inbound_exec_eom_cmd, sess);
+				cmd = cmdlist->data;
+				inbound_exec_eom_cmd (cmd->command, sess);
+				cmdlist = cmdlist->next;
 			}
 
 			/* send nickserv password */