summary refs log tree commit diff stats
path: root/src/common/outbound.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/outbound.c')
-rw-r--r--src/common/outbound.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/common/outbound.c b/src/common/outbound.c
index 7c6e5e6a..3a4d379c 100644
--- a/src/common/outbound.c
+++ b/src/common/outbound.c
@@ -32,7 +32,6 @@
 #include <sys/wait.h>
 #endif
 
-#include <unistd.h>
 #include <time.h>
 #include <signal.h>
 #include <sys/stat.h>
@@ -2606,7 +2605,13 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 			}
 			newsess = find_dialog (sess->server, nick);
 			if (!newsess)
+			{
 				newsess = find_channel (sess->server, nick);
+				if (!newsess && prefs.gui_auto_open_msg)
+				{
+					newsess = new_ircwindow (sess->server, nick, SESS_DIALOG, 0);
+				}
+			}
 			if (newsess)
 				inbound_chanmsg (newsess->server, NULL, newsess->channel,
 									  newsess->server->nick, msg, TRUE, FALSE);
@@ -2882,6 +2887,14 @@ cmd_recv (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 }
 
 static int
+cmd_saveconf (struct session *sess, char *tbuf, char *word[], char *word_eol[])
+{
+	save_config ();
+
+	return TRUE;
+}
+
+static int
 cmd_say (struct session *sess, char *tbuf, char *word[], char *word_eol[])
 {
 	char *speech = word_eol[2];
@@ -3633,6 +3646,7 @@ const struct commands xc_cmds[] = {
 #endif
 	{"RECV", cmd_recv, 1, 0, 1, N_("RECV <text>, send raw data to xchat, as if it was received from the irc server")},
 
+	{"SAVECONF", cmd_saveconf, 0, 0, 1, N_("SAVECONF, saves the current settings to disk")},
 	{"SAY", cmd_say, 0, 0, 1,
 	 N_("SAY <text>, sends the text to the object in the current window")},
 	{"SEND", cmd_send, 0, 0, 1, N_("SEND <nick> [<file>]")},