# HG changeset patch # User Christian Hammond # Date 1054438999 0 # Node ID 6275ac11362217a164e6a6fa75c80dc0ae3a0c17 # Parent 73c9dc20e41acd12db8abd150b02af2ebec0961c [gaim-migrate @ 6033] The first prpl-specific prefs. No, there's no prefs page :) committer: Tailor Script diff -r 73c9dc20e41a -r 6275ac113622 src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Sun Jun 01 03:21:55 2003 +0000 +++ b/src/protocols/msn/msn.c Sun Jun 01 03:43:19 2003 +0000 @@ -22,6 +22,7 @@ #include "msn.h" #include "msg.h" #include "page.h" +#include "prefs.h" #include "session.h" #include "state.h" #include "utils.h" @@ -1223,6 +1224,10 @@ prpl_info.user_opts = g_list_append(prpl_info.user_opts, puo); my_protocol = plugin; + + gaim_prefs_add_none("/plugins/prpl/msn"); + gaim_prefs_add_bool("/plugins/prpl/msn/conv_close_notice", TRUE); + gaim_prefs_add_bool("/plugins/prpl/msn/conv_timeout_notice", TRUE); } GAIM_INIT_PLUGIN(msn, __init_plugin, info); diff -r 73c9dc20e41a -r 6275ac113622 src/protocols/msn/switchboard.c --- a/src/protocols/msn/switchboard.c Sun Jun 01 03:21:55 2003 +0000 +++ b/src/protocols/msn/switchboard.c Sun Jun 01 03:43:19 2003 +0000 @@ -20,6 +20,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "msn.h" +#include "prefs.h" #include "switchboard.h" #include "utils.h" @@ -117,17 +118,27 @@ else username = user; - if (param_count == 2 && atoi(params[1]) == 1) - g_snprintf(buf, sizeof(buf), - _("The conversation has become inactive " - "and timed out.")); - else - g_snprintf(buf, sizeof(buf), - _("%s has closed the conversation window."), username); + *buf = '\0'; - if ((conv = gaim_find_conversation(user)) != NULL) + if (param_count == 2 && atoi(params[1]) == 1) { + if (gaim_prefs_get_bool("/plugins/prpl/msn/conv_timeout_notice")) { + g_snprintf(buf, sizeof(buf), + _("The conversation has become inactive " + "and timed out.")); + } + } + else { + if (gaim_prefs_get_bool("/plugins/prpl/msn/conv_close_notice")) { + g_snprintf(buf, sizeof(buf), + _("%s has closed the conversation window."), + username); + } + } + + if (*buf != '\0' && (conv = gaim_find_conversation(user)) != NULL) { gaim_conversation_write(conv, NULL, buf, -1, WFLAG_SYSTEM, time(NULL)); + } msn_switchboard_destroy(swboard);