Mercurial > pidgin.yaz
diff src/protocols/irc/irc.c @ 11073:634fec5ed0f2
[gaim-migrate @ 13082]
sf patch #1235304, from Lalo Martins
Allow for custom IRC quit messages. I hope Ethan doesn't kill me.
Also, I couldn't get quit messages to work for me before OR after
this patch. I tried using "/quit" and Buddies->Quit in the buddy
list. What was I doing wrong?
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 09 Jul 2005 19:19:53 +0000 |
parents | 50224ac8184d |
children | b2ace57224e2 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Sat Jul 09 18:54:43 2005 +0000 +++ b/src/protocols/irc/irc.c Sat Jul 09 19:19:53 2005 +0000 @@ -715,6 +715,27 @@ } } +static GaimPluginPrefFrame * +irc_pref_frame(GaimPlugin *plugin) { + GaimPluginPrefFrame *frame; + GaimPluginPref *ppref; + + frame = gaim_plugin_pref_frame_new(); + + ppref = gaim_plugin_pref_new_with_label(_("IRC")); + gaim_plugin_pref_frame_add(frame, ppref); + + ppref = gaim_plugin_pref_new_with_name_and_label("/plugins/prpl/irc/quitmsg", + _("Quit message")); + gaim_plugin_pref_frame_add(frame, ppref); + + return frame; +} + +static GaimPluginUiInfo prefs_info = { + irc_pref_frame +}; + static GaimPluginProtocolInfo prpl_info = { OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL, @@ -803,7 +824,7 @@ NULL, /**< ui_info */ &prpl_info, /**< extra_info */ - NULL, + &prefs_info, /**< prefs_info */ irc_actions }; @@ -834,6 +855,9 @@ _irc_plugin = plugin; + gaim_prefs_add_none("/plugins/prpl/irc"); + gaim_prefs_add_string("/plugins/prpl/irc/quitmsg", IRC_DEFAULT_QUIT); + irc_register_commands(); }