summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-26 03:24:36 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-26 03:24:36 +0000
commit7ef53cbe0d9f13e9e9b21c367c194cc1efe0d49e (patch)
treea48cfd67da8f9fb3559ea06309c857347bc3b06d /src
parent09f353807367961cd65dea8e6f193334014997a6 (diff)
downloadirssi-7ef53cbe0d9f13e9e9b21c367c194cc1efe0d49e.zip
/SET part_message - default message with /PART
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@877 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/irc-commands.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c
index 65336b81..38fc8bc2 100644
--- a/src/irc/core/irc-commands.c
+++ b/src/irc/core/irc-commands.c
@@ -284,6 +284,7 @@ static void cmd_part(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item
return;
if (*channame == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS);
+ if (*msg == '\0') msg = (char *) settings_get_str("part_message");
irc_send_cmdv(server, *msg == '\0' ? "PART %s" : "PART %s :%s",
channame, msg);
@@ -1026,6 +1027,7 @@ void irc_commands_init(void)
tmpstr = g_string_new(NULL);
settings_add_str("misc", "quit_message", "leaving");
+ settings_add_str("misc", "part_message", "");
settings_add_int("misc", "knockout_time", 300);
settings_add_str("misc", "wall_format", "[Wall/$0] $1-");