CINXE.COM

FAQ :: Pidgin, the universal chat client

<!DOCTYPE html> <html lang="en" class="js csstransforms3d"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="Hugo 0.80.0" /> <!-- Hugo: 2025-03-27T16:01:26 &#43;0000 - Job: n/a 2025-03-27T16:00:14 &#43;0000 - Commit: 8400662befb32a2e9d13fb54769492065ef83666 - production //--> <meta name="description" content="Pidgin is a universal chat client, allowing you to consolidate all your different messaging apps into a single tool."> <meta property="og:title" content="FAQ" /> <meta property="og:description" content="The following is a list of Frequently Asked Questions (FAQs), with answers, and notes related to development using LibPurple. Accounts I created an account, but it&rsquo;s not being saved! You need to use purple_accounts_add() to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call purple_accounts_add() after creating an account." /> <meta property="og:type" content="article" /> <meta property="og:url" content="https://pidgin.im/development/faq/" /> <meta property="og:image" content="https://pidgin.im/images/pidgin-circle-256.png" /> <meta property="article:published_time" content="2017-09-19T03:57:30+00:00" /> <meta property="article:modified_time" content="2019-08-23T02:53:18+00:00" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="https://pidgin.im/images/pidgin-circle-256.png" /> <meta name="twitter:title" content="FAQ" /> <meta name="twitter:description" content="The following is a list of Frequently Asked Questions (FAQs), with answers, and notes related to development using LibPurple. Accounts I created an account, but it&rsquo;s not being saved! You need to use purple_accounts_add() to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call purple_accounts_add() after creating an account." /> <link rel="shortcut icon" href="/favicon/favicon.ico"> <link rel="icon" sizes="16x16 32x32 64x64" href="/favicon/favicon.ico"> <link rel="icon" type="image/png" sizes="196x196" href="/favicon/favicon-192.png"> <link rel="icon" type="image/png" sizes="160x160" href="/favicon/favicon-160.png"> <link rel="icon" type="image/png" sizes="96x96" href="/favicon/favicon-96.png"> <link rel="icon" type="image/png" sizes="64x64" href="/favicon/favicon-64.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32.png"> <link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16.png"> <link rel="apple-touch-icon" href="/favicon/favicon-57.png"> <link rel="apple-touch-icon" sizes="114x114" href="/favicon/favicon-114.png"> <link rel="apple-touch-icon" sizes="72x72" href="/favicon/favicon-72.png"> <link rel="apple-touch-icon" sizes="144x144" href="/favicon/favicon-144.png"> <link rel="apple-touch-icon" sizes="60x60" href="/favicon/favicon-60.png"> <link rel="apple-touch-icon" sizes="120x120" href="/favicon/favicon-120.png"> <link rel="apple-touch-icon" sizes="76x76" href="/favicon/favicon-76.png"> <link rel="apple-touch-icon" sizes="152x152" href="/favicon/favicon-152.png"> <link rel="apple-touch-icon" sizes="180x180" href="/favicon/favicon-180.png"> <meta name="msapplication-TileColor" content="#8451A1"> <meta name="msapplication-TileImage" content="/favicon/favicon-144.png"> <meta name="msapplication-config" content="favicon/browserconfig.xml"> <title>FAQ :: Pidgin, the universal chat client</title> <link href="/css/nucleus.css?1743091286" rel="stylesheet"> <link href="/css/fontawesome-all.min.css?1743091286" rel="stylesheet"> <link href="/css/hybrid.css?1743091286" rel="stylesheet"> <link href="/css/featherlight.min.css?1743091286" rel="stylesheet"> <link href="/css/perfect-scrollbar.min.css?1743091286" rel="stylesheet"> <link href="/css/auto-complete.css?1743091286" rel="stylesheet"> <link href="/css/atom-one-dark-reasonable.css?1743091286" rel="stylesheet"> <link href="/css/theme.css?1743091286" rel="stylesheet"> <link href="/css/hugo-theme.css?1743091286" rel="stylesheet"> <link href="/css/theme-pidgin.css?1743091286" rel="stylesheet"> <link href="/css/custom.css?1743091286" rel="stylesheet"> <script src="/js/jquery-3.3.1.min.js?1743091286"></script> <style> :root #header + #content > #left > #rlblock_left{ display:none !important; } </style> </head> <body class="" data-url="/development/faq/"> <nav id="sidebar" class=""> <div id="header-wrapper"> <div id="header"> <a href="/"><img src="/images/logo.png" alt="pidgin logo"></a> </div> <div class="searchbox"> <label for="search-by"><i class="fas fa-search"></i></label> <input data-search-input id="search-by" type="search" placeholder="Search..."> <span data-search-clear=""><i class="fas fa-times"></i></span> </div> <script type="text/javascript" src="/js/lunr.min.js?1743091286"></script> <script type="text/javascript" src="/js/auto-complete.js?1743091286"></script> <script type="text/javascript"> var baseurl = "https:\/\/pidgin.im\/"; </script> <script type="text/javascript" src="/js/search.js?1743091286"></script> </div> <div class="highlightable"> <ul class="topics"> <li data-nav-id="/install/" title="Install" class="dd-item "> <a href="/install/"> Install </a> </li> <li data-nav-id="/plugins/" title="Plugins" class="dd-item "> <a href="/plugins/"> Plugins </a> </li> <li data-nav-id="/about/" title="About" class="dd-item "> <a href="/about/"> About </a> <ul> <li data-nav-id="/about/pidginchat/" title="Pidgin Chat" class="dd-item "> <a href="/about/pidginchat/"> Pidgin Chat </a> </li> <li data-nav-id="/about/philosophy/" title="Philosophy and Goals" class="dd-item "> <a href="/about/philosophy/"> Philosophy and Goals </a> </li> <li data-nav-id="/about/supported-languages/" title="Supported Languages" class="dd-item "> <a href="/about/supported-languages/"> Supported Languages </a> </li> <li data-nav-id="/about/security/" title="Security" class="dd-item "> <a href="/about/security/"> Security </a> <ul> <li data-nav-id="/about/security/advisories/" title="Advisories" class="dd-item "> <a href="/about/security/advisories/"> Advisories </a> <ul> <li data-nav-id="/about/security/advisories/cve-2022-26491/" title="cve-2022-26491-00" class="dd-item "> <a href="/about/security/advisories/cve-2022-26491/"> cve-2022-26491-00 </a> </li> </ul> </li> </ul> </li> </ul> </li> <li data-nav-id="/help/" title="Help" class="dd-item "> <a href="/help/"> Help </a> <ul> <li data-nav-id="/help/protocols/" title="Services (Protocols)" class="dd-item "> <a href="/help/protocols/"> Services (Protocols) </a> <ul> <li data-nav-id="/help/protocols/bonjour/" title="Bonjour" class="dd-item "> <a href="/help/protocols/bonjour/"> Bonjour </a> </li> <li data-nav-id="/help/protocols/gadugadu/" title="Gadu-Gadu" class="dd-item "> <a href="/help/protocols/gadugadu/"> Gadu-Gadu </a> </li> <li data-nav-id="/help/protocols/groupwise/" title="GroupWise" class="dd-item "> <a href="/help/protocols/groupwise/"> GroupWise </a> </li> <li data-nav-id="/help/protocols/irc/" title="IRC" class="dd-item "> <a href="/help/protocols/irc/"> IRC </a> </li> <li data-nav-id="/help/protocols/sametime/" title="Sametime" class="dd-item "> <a href="/help/protocols/sametime/"> Sametime </a> </li> <li data-nav-id="/help/protocols/silc/" title="SILC" class="dd-item "> <a href="/help/protocols/silc/"> SILC </a> </li> <li data-nav-id="/help/protocols/xmpp/" title="XMPP (Jabber)" class="dd-item "> <a href="/help/protocols/xmpp/"> XMPP (Jabber) </a> <ul> <li data-nav-id="/help/protocols/xmpp/supportedxep/" title="Supported XEP&#39;s" class="dd-item "> <a href="/help/protocols/xmpp/supportedxep/"> Supported XEP&#39;s </a> </li> </ul> </li> <li data-nav-id="/help/protocols/zephyr/" title="Zephyr" class="dd-item "> <a href="/help/protocols/zephyr/"> Zephyr </a> </li> <li data-nav-id="/help/protocols/otherprotocols/" title="Other Protocols" class="dd-item "> <a href="/help/protocols/otherprotocols/"> Other Protocols </a> </li> </ul> </li> <li data-nav-id="/help/theming/" title="Theming Pidgin" class="dd-item "> <a href="/help/theming/"> Theming Pidgin </a> </li> <li data-nav-id="/help/windows/" title="Windows-Specific Questions" class="dd-item "> <a href="/help/windows/"> Windows-Specific Questions </a> </li> </ul> </li> <li data-nav-id="/development/" title="Development" class="dd-item parent "> <a href="/development/"> Development </a> <ul> <li data-nav-id="/development/building/" title="Building" class="dd-item "> <a href="/development/building/"> Building </a> <ul> <li data-nav-id="/development/building/3.0.0/" title="3.0.0" class="dd-item "> <a href="/development/building/3.0.0/"> 3.0.0 </a> </li> <li data-nav-id="/development/building/2.x.y/" title="2.x.y" class="dd-item "> <a href="/development/building/2.x.y/"> 2.x.y </a> <ul> <li data-nav-id="/development/building/2.x.y/windows/" title="Windows" class="dd-item "> <a href="/development/building/2.x.y/windows/"> Windows </a> </li> </ul> </li> </ul> </li> <li data-nav-id="/development/contributing/" title="Contributing" class="dd-item "> <a href="/development/contributing/"> Contributing </a> </li> <li data-nav-id="/development/gsoc/" title="Google Summer of Code" class="dd-item "> <a href="/development/gsoc/"> Google Summer of Code </a> <ul> <li data-nav-id="/development/gsoc/instructions/" title="GSoC Instructions" class="dd-item "> <a href="/development/gsoc/instructions/"> GSoC Instructions </a> </li> <li data-nav-id="/development/gsoc/ideas/" title="GSoC Ideas" class="dd-item "> <a href="/development/gsoc/ideas/"> GSoC Ideas </a> </li> </ul> </li> <li data-nav-id="/development/debugging/" title="Debugging" class="dd-item "> <a href="/development/debugging/"> Debugging </a> </li> <li data-nav-id="/development/voice-and-video/" title="Voice and Video" class="dd-item "> <a href="/development/voice-and-video/"> Voice and Video </a> <ul> <li data-nav-id="/development/voice-and-video/voice-and-video-api/" title="Voice and Video API" class="dd-item "> <a href="/development/voice-and-video/voice-and-video-api/"> Voice and Video API </a> </li> </ul> </li> <li data-nav-id="/development/i18n/" title="Internationalization" class="dd-item "> <a href="/development/i18n/"> Internationalization </a> </li> <li data-nav-id="/development/release-process/" title="Release Process" class="dd-item "> <a href="/development/release-process/"> Release Process </a> </li> <li data-nav-id="/development/faq/" title="FAQ" class="dd-item active"> <a href="/development/faq/"> FAQ </a> </li> <li data-nav-id="/development/design-guidelines/" title="Design Guidelines" class="dd-item "> <a href="/development/design-guidelines/"> Design Guidelines </a> </li> </ul> </li> <li data-nav-id="/contact/" title="Contact" class="dd-item "> <a href="/contact/"> Contact </a> </li> <li data-nav-id="/post/" title="Blog" class="dd-item "> <a href="/post/"> Blog </a> <ul> <li data-nav-id="/posts/2024-08-malicious-plugin/" title="Malicious Plugin" class="dd-item "> <a href="/posts/2024-08-malicious-plugin/"> Malicious Plugin </a> </li> <li data-nav-id="/posts/2024-02-2.14.13-released/" title="2.14.13 Released!" class="dd-item "> <a href="/posts/2024-02-2.14.13-released/"> 2.14.13 Released! </a> </li> <li data-nav-id="/posts/2024-02-state-of-the-bird-2023-q4/" title="State of the Bird 2023 Q4" class="dd-item "> <a href="/posts/2024-02-state-of-the-bird-2023-q4/"> State of the Bird 2023 Q4 </a> </li> <li data-nav-id="/posts/2023-11-state-of-the-bird-2023-q3/" title="State of the Bird 2023 Q3" class="dd-item "> <a href="/posts/2023-11-state-of-the-bird-2023-q3/"> State of the Bird 2023 Q3 </a> </li> <li data-nav-id="/posts/2023-08-facebook-republished/" title="Facebook Republished" class="dd-item "> <a href="/posts/2023-08-facebook-republished/"> Facebook Republished </a> </li> <li data-nav-id="/posts/2023-08-facebook-takedown/" title="Facebook Takedown" class="dd-item "> <a href="/posts/2023-08-facebook-takedown/"> Facebook Takedown </a> </li> <li data-nav-id="/posts/2023-07-state-of-the-bird-2023-q2/" title="State of the Bird 2023 Q2" class="dd-item "> <a href="/posts/2023-07-state-of-the-bird-2023-q2/"> State of the Bird 2023 Q2 </a> </li> <li data-nav-id="/posts/2023-01-state-of-the-bird-2022-q4/" title="State of the Bird 2022 Q4" class="dd-item "> <a href="/posts/2023-01-state-of-the-bird-2022-q4/"> State of the Bird 2022 Q4 </a> </li> <li data-nav-id="/posts/2022-12-2.14.12-released/" title="2.14.12 Released!" class="dd-item "> <a href="/posts/2022-12-2.14.12-released/"> 2.14.12 Released! </a> </li> <li data-nav-id="/posts/2022-10-state-of-the-bird-2022-q3/" title="State of the Bird 2022 Q3" class="dd-item "> <a href="/posts/2022-10-state-of-the-bird-2022-q3/"> State of the Bird 2022 Q3 </a> </li> <li data-nav-id="/posts/2022-09-digitalocean-sponsorship-renewed/" title="DigitalOcean Sponsorship Renewed" class="dd-item "> <a href="/posts/2022-09-digitalocean-sponsorship-renewed/"> DigitalOcean Sponsorship Renewed </a> </li> <li data-nav-id="/posts/2022-07-state-of-the-bird-2022-q2/" title="State of the Bird 2022 Q2" class="dd-item "> <a href="/posts/2022-07-state-of-the-bird-2022-q2/"> State of the Bird 2022 Q2 </a> </li> <li data-nav-id="/posts/2022-06-2.14.10-released/" title="2.14.10 Released!" class="dd-item "> <a href="/posts/2022-06-2.14.10-released/"> 2.14.10 Released! </a> </li> <li data-nav-id="/posts/2022-05-google-talk-shutdown/" title="Google Talk Shutdown" class="dd-item "> <a href="/posts/2022-05-google-talk-shutdown/"> Google Talk Shutdown </a> </li> <li data-nav-id="/posts/2022-04-2.14.9-released/" title="2.14.9 Released!" class="dd-item "> <a href="/posts/2022-04-2.14.9-released/"> 2.14.9 Released! </a> </li> <li data-nav-id="/posts/2022-04-state-of-the-bird-2022-q1/" title="State of the Bird 2022 Q1" class="dd-item "> <a href="/posts/2022-04-state-of-the-bird-2022-q1/"> State of the Bird 2022 Q1 </a> </li> <li data-nav-id="/posts/2022-02-libera-wallops/" title="Libera Wallops" class="dd-item "> <a href="/posts/2022-02-libera-wallops/"> Libera Wallops </a> </li> <li data-nav-id="/posts/2022-01-state-of-the-bird-2021-q4/" title="State of the Bird 2021 Q4" class="dd-item "> <a href="/posts/2022-01-state-of-the-bird-2021-q4/"> State of the Bird 2021 Q4 </a> </li> <li data-nav-id="/posts/2021-10-2.14.8-released/" title="2.14.8 Released!" class="dd-item "> <a href="/posts/2021-10-2.14.8-released/"> 2.14.8 Released! </a> </li> <li data-nav-id="/posts/2021-10-state-of-the-bird-2021-q3/" title="State of the Bird 2021 Q3" class="dd-item "> <a href="/posts/2021-10-state-of-the-bird-2021-q3/"> State of the Bird 2021 Q3 </a> </li> <li data-nav-id="/posts/2021-09-2.14.7-released/" title="2.14.7 Released!" class="dd-item "> <a href="/posts/2021-09-2.14.7-released/"> 2.14.7 Released! </a> </li> <li data-nav-id="/posts/2021-09-gsoc-2021-retrospective/" title="GSoC 2021 Retrospective" class="dd-item "> <a href="/posts/2021-09-gsoc-2021-retrospective/"> GSoC 2021 Retrospective </a> </li> <li data-nav-id="/posts/2021-07-2.14.6-released/" title="2.14.6 Released!" class="dd-item "> <a href="/posts/2021-07-2.14.6-released/"> 2.14.6 Released! </a> </li> <li data-nav-id="/posts/2021-06-irc-network-changes/" title="IRC Network Changes" class="dd-item "> <a href="/posts/2021-06-irc-network-changes/"> IRC Network Changes </a> </li> <li data-nav-id="/posts/2021-06-pidgin3-development-scripts/" title="Pidgin3 Development Scripts" class="dd-item "> <a href="/posts/2021-06-pidgin3-development-scripts/"> Pidgin3 Development Scripts </a> </li> <li data-nav-id="/posts/2021-06-hgkeeper-and-mercurial-5.8-issue/" title="HGKeeper and Mercurial 5.8 Issue" class="dd-item "> <a href="/posts/2021-06-hgkeeper-and-mercurial-5.8-issue/"> HGKeeper and Mercurial 5.8 Issue </a> </li> <li data-nav-id="/posts/2021-06-2.14.5-released/" title="2.14.5 Released!" class="dd-item "> <a href="/posts/2021-06-2.14.5-released/"> 2.14.5 Released! </a> </li> <li data-nav-id="/posts/2021-05-gsoc-2021/" title="Gsoc 2021" class="dd-item "> <a href="/posts/2021-05-gsoc-2021/"> Gsoc 2021 </a> </li> <li data-nav-id="/posts/2021-05-thank-you-steadfast/" title="Thank You, Steadfast" class="dd-item "> <a href="/posts/2021-05-thank-you-steadfast/"> Thank You, Steadfast </a> </li> <li data-nav-id="/posts/2021-05-digitalocean-sponsorship/" title="DigitalOcean Sponsorship" class="dd-item "> <a href="/posts/2021-05-digitalocean-sponsorship/"> DigitalOcean Sponsorship </a> </li> <li data-nav-id="/posts/2021-04-2.14.4-released/" title="2.14.4 Released!" class="dd-item "> <a href="/posts/2021-04-2.14.4-released/"> 2.14.4 Released! </a> </li> <li data-nav-id="/posts/2021-04-2.14.3-released/" title="2.14.3 Released!" class="dd-item "> <a href="/posts/2021-04-2.14.3-released/"> 2.14.3 Released! </a> </li> <li data-nav-id="/posts/2021-04-2.14.2-released/" title="2.14.2 Released!" class="dd-item "> <a href="/posts/2021-04-2.14.2-released/"> 2.14.2 Released! </a> </li> <li data-nav-id="/posts/2021-03-pidginchat/" title="Pidginchat" class="dd-item "> <a href="/posts/2021-03-pidginchat/"> Pidginchat </a> </li> <li data-nav-id="/posts/2021-02-libgnt-2.14.1-released/" title="libgnt 2.14.1 Released" class="dd-item "> <a href="/posts/2021-02-libgnt-2.14.1-released/"> libgnt 2.14.1 Released </a> </li> <li data-nav-id="/posts/2021-02-bintray-sunsetting/" title="Bintray Sunsetting" class="dd-item "> <a href="/posts/2021-02-bintray-sunsetting/"> Bintray Sunsetting </a> </li> <li data-nav-id="/posts/2020-06-2.14.1-released/" title="2.14.1 Released!" class="dd-item "> <a href="/posts/2020-06-2.14.1-released/"> 2.14.1 Released! </a> </li> <li data-nav-id="/posts/2020-06-2.14.0-released/" title="2.14.0 Released!" class="dd-item "> <a href="/posts/2020-06-2.14.0-released/"> 2.14.0 Released! </a> </li> <li data-nav-id="/posts/2020-01-nest-launch/" title="Nest Launch" class="dd-item "> <a href="/posts/2020-01-nest-launch/"> Nest Launch </a> </li> </ul> </li> </ul> <section id="shortcuts"> <h3></h3> <ul> <li> <a class="padding" href="https://issues.imfreedom.org/issues/PIDGIN"><i class='fas fa-fw fa-tasks'></i> Issue Tracker</a> </li> <li> <a class="padding" href="https://keep.imfreedom.org/pidgin/"><i class='fas fa-fw fa-code'></i> Repositories</a> </li> <li> <a class="padding" href="https://shop.spreadshirt.com/imfreedom"><i class='fas fa-fw fa-tshirt'></i> Merchandise</a> </li> <li> <a class="padding" rel=me href="https://fosstodon.org/@pidgin"><i class='fab fa-fw fa-mastodon'></i> Mastodon</a> </li> </ul> </section> <section id="prefooter"> <hr /> <ul> <li> <a class="padding"> <i class="fas fa-language fa-fw"></i> <div class="select-style"> <select id="select-language" onchange="location = this.value;"> <option id="en" value="https://pidgin.im/development/faq/" selected>English (US)</option> </select> <svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="255px" height="255px" viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve"> <g> <g id="arrow-drop-down"> <polygon points="0,63.75 127.5,191.25 255,63.75 " /> </g> </g> </svg> </div> </a> </li> </ul> </section> <section id="footer"> <a href="https://imfreedom.org/donate" class="donate-button"> <i class="fas fa-heart"></i> Donate </a> </section> </div> </nav> <section id="body"> <div id="overlay"></div> <div class="padding highlightable"> <div> <div id="top-bar"> <div id="top-github-link"> <a class="github-link" title='Edit this page' href="https://keep.imfreedom.org/pidgin/nest/file/default/hugo/content/development/faq.md" target="blank"> <i class="fas fa-code-branch"></i> <span id="top-github-link-text">Edit this page</span> </a> </div> <div id="breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"> <span id="sidebar-toggle-span"> <a href="#" id="sidebar-toggle" data-sidebar-toggle=""> <i class="fas fa-bars"></i> </a> </span> <span id="toc-menu"><i class="fas fa-list-alt"></i></span> <span class="links"> <a href='/'>Pidgin</a> > <a href='/development/'>Development</a> > FAQ </span> </div> <div class="progress"> <div class="wrapper"> <nav id="TableOfContents"> <ul> <li><a href="#accounts">Accounts</a> <ul> <li><a href="#i-created-an-account-but-its-not-being-saved">I created an account, but it&rsquo;s not being saved!</a></li> <li><a href="#how-do-i-get-online-with-an-account">How do I get online with an account?</a></li> </ul> </li> <li><a href="#conversations">Conversations</a> <ul> <li><a href="#how-can-i-create-a-conversation-with-someone">How can I create a conversation with someone?</a></li> <li><a href="#how-can-i-send-a-message-in-a-conversation">How can I send a message in a conversation?</a></li> <li><a href="#is-there-a-way-that-i-can-print-something-in-the-conversation-window-but-not-send-the-message">Is there a way that I can print something in the conversation window, but not send the message?</a></li> </ul> </li> <li><a href="#files-and-file-paths">Files and File Paths</a> <ul> <li><a href="#what-do-i-do-with-datadir-localedir-and-libdir">What do I do with <code>DATADIR</code>, <code>LOCALEDIR</code>, and <code>LIBDIR</code>?</a></li> <li><a href="#why-are-files-opened-with-mode-b">Why are files opened with mode <code>b</code>?</a></li> <li><a href="#why-are-g_dir_separator_s-and-g_dir_separator-used-everywhere">Why are <code>G_DIR_SEPARATOR_S</code> and <code>G_DIR_SEPARATOR</code> used everywhere?</a></li> </ul> </li> <li><a href="#general">General</a> <ul> <li><a href="#what-should-i-do-to-get-the-contents-of-an-environment-variable">What should I do to get the contents of an environment variable?</a></li> <li><a href="#should-i-use-snprintf-or-vsnprintf">Should I use <code>snprintf()</code> or <code>vsnprintf()</code>?</a></li> <li><a href="#how-do-i-get-the-settings-directory">How do I get the settings directory?</a></li> <li><a href="#what-is-the-versioning-scheme">What is the versioning scheme?</a></li> </ul> </li> <li><a href="#headers">Headers</a> <ul> <li><a href="#why-is-win32deph-causing-problems-for-me">Why is win32dep.h causing problems for me?</a></li> </ul> </li> <li><a href="#plugins-and-protocols">Plugins and Protocols</a> <ul> <li><a href="#how-should-i-handle-global-variables">How should I handle global variables?</a></li> <li><a href="#what-should-i-do-for-exported-functions">What should I do for &ldquo;exported&rdquo; functions?</a></li> </ul> </li> </ul> </nav> </div> </div> </div> </div> <div id="head-tags"> </div> <div id="body-inner"> <h1> FAQ </h1> <p>The following is a list of Frequently Asked Questions (FAQs), with answers, and notes related to development using LibPurple.</p> <h2 id="accounts">Accounts</h2> <h3 id="i-created-an-account-but-its-not-being-saved">I created an account, but it&rsquo;s not being saved!</h3> <p>You need to use <code>purple_accounts_add()</code> to add the account to the list of available accounts. This list of accounts is saved. Note that many of the functions require an account to be on that list. So you should always call <code>purple_accounts_add()</code> after creating an account.</p> <h3 id="how-do-i-get-online-with-an-account">How do I get online with an account?</h3> <p>There are two ways you can do this:</p> <ul> <li>If you have other accounts online, and you want the new account to have the same status as those, then call <code>purple_savedstatus_get_current()</code> to get the current status, and use <code>purple_savedstatus_activate_for_account()</code> for the account.</li> <li>Otherwise, you can simply do <code>purple_account_set_status()</code> to set the status of the account.</li> </ul> <p>An account needs to be enabled before it can be connected. So after doing either of the above, you need to enable the account by calling <code>purple_account_set_enabled()</code>.</p> <h2 id="conversations">Conversations</h2> <h3 id="how-can-i-create-a-conversation-with-someone">How can I create a conversation with someone?</h3> <p>Use <code>purple_conversation_new()</code>. Use <code>PURPLE_CONV_TYPE_IM</code> if the conversation is an IM (one-to-one person conversation), and use <code>PURPLE_CONV_TYPE_CHAT</code> if it&rsquo;s a multi-user conversation. One important thing to note here is that the name property of the <code>PurpleConversation</code> struct is the name of the buddy you are creating a conversation with (the documentation states that this is the name of the conversation itself, but it is in fact also the name of the receiving buddy). So a call to <code>purple_conversation_new()</code> takes the name of the buddy as its third argument.</p> <h3 id="how-can-i-send-a-message-in-a-conversation">How can I send a message in a conversation?</h3> <p>Use either <code>purple_conv_im_send()</code> or <code>purple_conv_chat_send()</code>. Note that the first parameter to either of these functions are <em><strong>not</strong></em> the conversation itself. Rather, it&rsquo;s the IM data or chat data of the conversation which you can get from <code>PURPLE_CONV_IM</code>/<code>PURPLE_CONV_CHAT</code>.</p> <h3 id="is-there-a-way-that-i-can-print-something-in-the-conversation-window-but-not-send-the-message">Is there a way that I can print something in the conversation window, but not send the message?</h3> <p>Yes. Use <code>purple_conv_im_write()</code> or <code>purple_conv_chat_write()</code>.</p> <h2 id="files-and-file-paths">Files and File Paths</h2> <h3 id="what-do-i-do-with-datadir-localedir-and-libdir">What do I do with <code>DATADIR</code>, <code>LOCALEDIR</code>, and <code>LIBDIR</code>?</h3> <p><code>DATADIR</code>, <code>LOCALEDIR</code>, and <code>LIBDIR</code> are defined as functions in the Windows build. Therefore, doing something like this will break the Windows build:</p> <pre><code> printf(&quot;File in DATADIR is: %s\n&quot;, DATADIR G_DIR_SEPARATOR_S &quot;pic.png&quot;) </code></pre> <p>Instead, it should be:</p> <pre><code> printf(&quot;File in DATADIR is: %s%s%s\n&quot;, DATADIR, G_DIR_SEPARATOR_S, &quot;pic.png&quot;); </code></pre> <h3 id="why-are-files-opened-with-mode-b">Why are files opened with mode <code>b</code>?</h3> <p>Without this, on Windows systems the opened files will use Windows default translation ( <!-- raw HTML omitted --> <!-- raw HTML omitted --> for newline, for example). This will cause errors due to newline format and the &ldquo;bytes read&rdquo; counts, which will be wrong when comparing the return value of <code>read()</code> to <code>stat()</code>.</p> <h3 id="why-are-g_dir_separator_s-and-g_dir_separator-used-everywhere">Why are <code>G_DIR_SEPARATOR_S</code> and <code>G_DIR_SEPARATOR</code> used everywhere?</h3> <p>This is a matter of maintaining cross-platform compatibility. Windows uses a backslash (&quot;\&quot;) for directory separators in paths, while UNIX-like systems use the forward slash (&quot;/&quot;). Other OSs may choose to use other separators&mdash;for example, prior to Mac OS X, it was common for the directory separator on Macs to be a colon (&quot;:&quot;).</p> <p>It is impractical to use preprocessor directives throughout the code to determine the path style to use, especially if a new OS were to appear and use a different directory separator. GLib, which we already use, provides the convenient separator macro, so we use this to reduce our code complexity and maintain cross-platform portability.</p> <h2 id="general">General</h2> <h3 id="what-should-i-do-to-get-the-contents-of-an-environment-variable">What should I do to get the contents of an environment variable?</h3> <p>Use <code>g_getenv()</code>.</p> <h3 id="should-i-use-snprintf-or-vsnprintf">Should I use <code>snprintf()</code> or <code>vsnprintf()</code>?</h3> <p>No. Use the GLib wrapper functions instead. They are <code>g_snprintf()</code> and <code>g_vsnprintf()</code>.</p> <h3 id="how-do-i-get-the-settings-directory">How do I get the settings directory?</h3> <p>Use <code>purple_home_dir()</code>. You should <em>not</em> use <code>g_get_home_dir()</code> or <code>getenv(&quot;HOME&quot;)</code>.</p> <h3 id="what-is-the-versioning-scheme">What is the versioning scheme?</h3> <p><strong>This is already defined elsewhere, we should probably just have a page for it&hellip; &ndash;grim</strong></p> <p>There are three fields in the version: <code>major.minor.micro</code>.</p> <ul> <li>If the <code>major</code> is changing, you can break plugins. That means both forward- and backward- compatibility. API can be added or removed or whatever you like.</li> <li>If only the <code>minor</code> is changing, you can break forward compatibility only. You may add API, but you can&rsquo;t remove it. You can mark API as deprecated instead.</li> <li>If only the <code>micro</code> is changing, you can&rsquo;t break the API at all.</li> </ul> <h2 id="headers">Headers</h2> <h3 id="why-is-win32deph-causing-problems-for-me">Why is win32dep.h causing problems for me?</h3> <p>You need to make sure it is the last header you include if you need to include it. Not doing so is asking for problems.</p> <p><strong>Why? &ndash;grim</strong></p> <h2 id="plugins-and-protocols">Plugins and Protocols</h2> <h3 id="how-should-i-handle-global-variables">How should I handle global variables?</h3> <p>Use <code>G_MODULE_IMPORT</code> for any global variable located outside your dynamic library. Not doing this will cause &ldquo;Memory Access Violation&rdquo; errors on Windows systems.</p> <h3 id="what-should-i-do-for-exported-functions">What should I do for &ldquo;exported&rdquo; functions?</h3> <p>If your plugin has functions that are to be accessed from outside the scope of its file (.dll or .so), <code>G_MODULE_EXPORT</code> those functions.</p> <footer class="footline"> </footer> </div> </div> <div id="navigation"> </div> </section> <div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"> <div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div> </div> <script src="/js/clipboard.min.js?1743091286"></script> <script src="/js/perfect-scrollbar.min.js?1743091286"></script> <script src="/js/perfect-scrollbar.jquery.min.js?1743091286"></script> <script src="/js/jquery.sticky.js?1743091286"></script> <script src="/js/featherlight.min.js?1743091286"></script> <script src="/js/highlight.pack.js?1743091286"></script> <script> hljs.initHighlightingOnLoad(); </script> <script src="/js/modernizr.custom-3.6.0.js?1743091286"></script> <script src="/js/learn.js?1743091286"></script> <script src="/js/hugo-learn.js?1743091286"></script> <link href="/mermaid/mermaid.css?1743091286" rel="stylesheet" /> <script src="/mermaid/mermaid.js?1743091286"></script> <script> mermaid.initialize({ startOnLoad: true }); </script> <footer id="footline"> <div class="footline-block"> Modified 2019-08-23 </div> <div class="footline-block footline-old-site-info"> This page was migrated from the old sites. This is what it replaces: <ul> <li> <a href="https://developer.pidgin.im/wiki/Development%20FAQ" rel="nofollow"> developer.pidgin.im/wiki/Development%20FAQ </a> </li> </ul> </div> <ul class="footline-block footline-columns"> <li> <a href="https://issues.imfreedom.org/issues/PIDGIN"><i class='fas fa-fw fa-tasks'></i> Issue Tracker</a> </li> <li> <a href="https://keep.imfreedom.org/pidgin/"><i class='fas fa-fw fa-code'></i> Repositories</a> </li> <li> <a href="https://shop.spreadshirt.com/imfreedom"><i class='fas fa-fw fa-tshirt'></i> Merchandise</a> </li> <li> <a href="https://fosstodon.org/@pidgin"><i class='fab fa-fw fa-mastodon'></i> Mastodon</a> </li> </ul> <div class="footline-block"> <section class="supporters"> <b>Our Supporters</b> <div> <a href="https://www.digitalocean.com/?refcode=b69e5dddf595&amp;utm_campaign=Referral_Invite&amp;utm_medium=Referral_Program&amp;utm_source=badge"> <img src="/images/badges/DO_Logo_horizontal_black.svg" alt="DigitalOcean" /> </a> <a href="https://sourceforge.net"> <img src="/images/badges/source-forge-logo.svg" alt="SourceForge" style="min-width:190px" /> </a> </div> </section> </div> <ul class="footline-block footline-columns copyright-text"> <li> &copy; Pidgin </li> <li> Content - GPL3 </li> <li> <a href="https://github.com/matcornic/hugo-theme-learn">Theme</a> - MIT </li> </ul> </footer> <script src="/js/js.cookie.min.js"></script> <div style="display:none;"> <div class="notices tip notification-bar"> <p> <span class="alert-bar-close-button"><i class="fas fa-times"></i></span> Looking to reach us via XMPP? Check out the new <a href='/about/pidginchat'>PidginChat</a> service! </p> </div> </div> <script> try { var code = "pidgin-chat-announcement"; } catch (e) { console.error("Error with cookie code", e); } if (code && code !== Cookies.get("hide-notification")) { var bar = $(".notification-bar"); $(".padding.highlightable").prepend(bar); $(".alert-bar-close-button").on("click", function(elem) { Cookies.set("hide-notification", code); bar.detach(); }); } </script> <style> .alert-bar-close-button { position: absolute; top: 2px; right: 10px; color: white; font-weight: bold; cursor: pointer; transition: 0.3s; } .alert-bar-close-button:hover { color: black; } </style> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10