diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-08-09 01:57:42 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-08-09 01:57:42 +0200 |
commit | 1e74680172e4ff43fb109557bea87d090d8376c2 (patch) | |
tree | 80aad05916b1bf3520f250ce5d886a6bb6d20c45 /src/common | |
parent | c000073225cafe8f2ed6d30ff4b9ba5351dfbb6b (diff) |
add option to auto-open a new tab when sending /msg (openSUSE)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cfgfiles.c | 1 | ||||
-rw-r--r-- | src/common/outbound.c | 6 | ||||
-rw-r--r-- | src/common/xchat.h | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index e3029df8..7948fe2c 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -423,6 +423,7 @@ const struct prefs vars[] = { {"gui_auto_open_chat", P_OFFINT (autoopendccchatwindow), TYPE_BOOL}, {"gui_auto_open_dialog", P_OFFINT (autodialog), TYPE_BOOL}, + {"gui_auto_open_msg", P_OFFINT (gui_auto_open_msg), TYPE_BOOL}, {"gui_auto_open_recv", P_OFFINT (autoopendccrecvwindow), TYPE_BOOL}, {"gui_auto_open_send", P_OFFINT (autoopendccsendwindow), TYPE_BOOL}, {"gui_dialog_height", P_OFFINT (dialog_height), TYPE_INT}, diff --git a/src/common/outbound.c b/src/common/outbound.c index df8eddbd..417ac323 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2605,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); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6856d949..3ec13e6b 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -205,6 +205,7 @@ struct xchatprefs unsigned int perc_ascii; unsigned int autosave; unsigned int autodialog; + unsigned int gui_auto_open_msg; unsigned int autosave_url; unsigned int autoreconnect; unsigned int autoreconnectonfail; |