Skip to content

Instantly share code, notes, and snippets.

@boamaod

boamaod/accounts.xml

Last active Jan 21, 2017
Embed
What would you like to do?
Real life Libpurple config using https://github.com/boamaod/rainbow-bridge
<?xml version='1.0' encoding='UTF-8' ?>
<account version='1.0'>
<account>
<protocol>prpl-irc</protocol>
<name>nyymse@irc.gitter.im</name>
<password>9202d80f36b7c2e85775210eabcf4ec8f30c6f64</password>
<statuses>
<status type='available' name='Available' active='false'>
<attributes/>
</status>
<status type='away' name='Away' active='true'>
<attributes>
<attribute id='message' value='I&apos;m not here right now'/>
</attributes>
</status>
<status type='offline' name='Offline' active='false'>
<attributes/>
</status>
</statuses>
<settings>
<setting name='encoding' type='string'>UTF-8</setting>
<setting name='port' type='int'>6667</setting>
<setting name='sasl' type='bool'>0</setting>
<setting name='check-mail' type='bool'>0</setting>
<setting name='auth_plain_in_clear' type='bool'>0</setting>
<setting name='autodetect_utf8' type='bool'>0</setting>
<setting name='ssl' type='bool'>1</setting>
</settings>
<settings ui='gnt-purple'>
<setting name='auto-login' type='bool'>1</setting>
</settings>
<current_error/>
</account>
<account>
<protocol>prpl-skypeweb</protocol>
<name>irc---</name>
<password>mypassword12345</password>
<alias>⚔</alias>
<statuses>
<status type='Online' name='Online' active='false'>
<attributes/>
</status>
<status type='Idle' name='Away' active='true'>
<attributes>
<attribute id='message' value='I&apos;m not here right now'/>
</attributes>
</status>
<status type='Away' name='Not Available' active='false'>
<attributes/>
</status>
<status type='Busy' name='Do Not Disturb' active='false'>
<attributes/>
</status>
<status type='Hidden' name='Invisible' active='false'>
<attributes/>
</status>
<status type='Offline' name='Offline' active='false'>
<attributes/>
</status>
</statuses>
<settings>
<setting name='show-typing-as-text' type='bool'>0</setting>
<setting name='show-typing-as-icon' type='bool'>0</setting>
<setting name='last_message_timestamp' type='int'>1484925404</setting>
<setting name='check-mail' type='bool'>0</setting>
<setting name='' type='bool'>0</setting>
<setting name='refresh-token' type='string'>75k3Fifai7D6YXIiCzqplrDuxkvbqWCvX5Ncio5rsjDKHLGQfsnPIApfkWJ8k0eJC1gmAH3NW9SubCvPmlObTzjNp1oLFy0zQb4NiEWW6GntbPKmw1n7hhxk27wfL3Ox0ks6zjVgt2mWW6A9kkBqPmICrbzIQ75yafE7qQDHuzjgKzztnmkXsQLTinkA97Q8wDYXXAMWmmhj3J9OpLwvu4nA4GUkT0l1oyOfL0atfiBiNkzxHxpaDEDIn0aJ2MYD3nzBGDkQxqy1TEpgQBO7CftO4rJKQi6ZKKBZsaL7s7e9EBxVwVEJoc1KzPgSk6jfmEXe0qk8w3Q5RYgCST8414HDyRGIbNougyP5fO8gUwR7TwTTGAopkfpShpcNyVGu2qvQ6TIvtWR3LNLxzVLpwRy7vg24</setting>
</settings>
<settings ui='gnt-purple'>
<setting name='auto-login' type='bool'>1</setting>
</settings>
<current_error/>
</account>
<account>
<protocol>prpl-irc</protocol>
<name>s-}@irc.freenode.net</name>
<password>mypassword12345</password>
<statuses>
<status type='available' name='Available' active='false'>
<attributes/>
</status>
<status type='away' name='Away' active='true'>
<attributes>
<attribute id='message' value='I&apos;m not here right now'/>
</attributes>
</status>
<status type='offline' name='Offline' active='false'>
<attributes/>
</status>
</statuses>
<settings>
<setting name='encoding' type='string'>UTF-8</setting>
<setting name='port' type='int'>6697</setting>
<setting name='sasl' type='bool'>0</setting>
<setting name='auth_plain_in_clear' type='bool'>0</setting>
<setting name='ssl' type='bool'>1</setting>
<setting name='autodetect_utf8' type='bool'>1</setting>
<setting name='check-mail' type='bool'>0</setting>
</settings>
<settings ui='gnt-purple'>
<setting name='auto-login' type='bool'>1</setting>
</settings>
<current_error/>
</account>
<account>
<protocol>prpl-irc</protocol>
<name>s-}@stockholm-se.pirateirc.net</name>
<password>mypassword12345</password>
<statuses>
<status type='available' name='Available' active='false'>
<attributes/>
</status>
<status type='away' name='Away' active='true'>
<attributes>
<attribute id='message' value='I&apos;m not here right now'/>
</attributes>
</status>
<status type='offline' name='Offline' active='false'>
<attributes/>
</status>
</statuses>
<settings>
<setting name='encoding' type='string'>UTF-8</setting>
<setting name='port' type='int'>6697</setting>
<setting name='sasl' type='bool'>0</setting>
<setting name='auth_plain_in_clear' type='bool'>0</setting>
<setting name='ssl' type='bool'>1</setting>
<setting name='autodetect_utf8' type='bool'>1</setting>
<setting name='check-mail' type='bool'>0</setting>
</settings>
<settings ui='gnt-purple'>
<setting name='auto-login' type='bool'>1</setting>
</settings>
<current_error/>
</account>
<account>
<protocol>prpl-facebook</protocol>
<name>nyymse</name>
<password>mypassword12345</password>
<alias>Anu</alias>
<statuses>
<status type='available' name='Available' active='false'>
<attributes/>
</status>
<status type='away' name='Away' active='true'>
<attributes/>
</status>
<status type='invisible' name='Invisible' active='false'>
<attributes/>
</status>
<status type='offline' name='Offline' active='false'>
<attributes/>
</status>
</statuses>
<settings>
<setting name='show-self' type='bool'>0</setting>
<setting name='stoken' type='string'>1723429760</setting>
<setting name='cid' type='string'>84B6DB9Vb1IPmicHt9eC</setting>
<setting name='check-mail' type='bool'>0</setting>
<setting name='did' type='string'>63f07997-feaa-e089-72f5-0ce02933ffc5</setting>
<setting name='show-unread' type='bool'>0</setting>
<setting name='token' type='string'>bxp3a01Rl39h0NiB1L6DGccjWWRIe4PQxDGSMr4SOylSEMXvoQaUaBYRV7RIRtJWEa6SHyK3aHBBBi2EzqyQyNYQt1i5NRLa1kfN2aDuyvLhgAWDnUeDrDD5cGh2VrVob1Ntshihq9KlPif0hImNCaqUkOykfWA2QvjJPekEjK3FSJ3fYoN4yo</setting>
<setting name='mid' type='string'>1064243984</setting>
<setting name='sync-interval' type='int'>30</setting>
<setting name='uid' type='string'>100012348478922</setting>
<setting name='group-chat-open' type='bool'>0</setting>
<setting name='mark-read' type='bool'>0</setting>
</settings>
<settings ui='gnt-purple'>
<setting name='auto-login' type='bool'>1</setting>
</settings>
<current_error/>
</account>
</account>
bridge_me = [
"#alvatal",
"19:I21paGtlbF90LyR2cHJpbnRzOzIxNmQyZTU0NDI2N2IwNmY=@p2p.thread.skype"
]
dont_announce = bridge_me
<?xml version='1.0' encoding='UTF-8' ?>
<purple version='1.0'>
<blist>
<group name='Chats'>
<setting name='collapsed' type='bool'>0</setting>
<chat proto='prpl-facebook' account='nyymse'>
<alias>ƒopenknowledge</alias>
<component name='name'>1304882506198347</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-facebook' account='nyymse'>
<alias>ƒpiraadipartei</alias>
<component name='name'>857429714372198</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-facebook' account='nyymse'>
<alias>ƒtalsinki</alias>
<component name='name'>971314366245255</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-skypeweb' account='irc---'>
<alias>$piraadipartei</alias>
<component name='chatname'>19:7404f921542f4a8ba96711c2b56f0371@thread.skype</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-skypeweb' account='irc---'>
<alias>$openknowledge</alias>
<component name='chatname'>19:07WltiRNgHazVU8VK4m5XKn8jPhOtJnZ@thread.skype</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-skypeweb' account='irc---'>
<alias>$h2kkerikoda</alias>
<component name='chatname'>19:I3p1cmd1dHQvJHN0aXJsaXR6O2FjZGVjM2M3MjJhM2EwYWU=@p2p.thread.skype</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-skypeweb' account='irc---'>
<alias>$estobuntu</alias>
<component name='chatname'>19:I3ZwcmludHMvJGp1aGFua29rcztkNjFiZTVmYjg4MGQzN2Iy@p2p.thread.skype</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-skypeweb' account='irc---'>
<alias>$alvatal</alias>
<component name='chatname'>19:I21paGtlbF90LyR2cHJpbnRzOzIxNmQyZTU0NDI2N2IwNmY=@p2p.thread.skype</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-irc' account='s-}@stockholm-se.pirateirc.net'>
<component name='channel'>#talsinki</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-irc' account='s-}@stockholm-se.pirateirc.net'>
<component name='channel'>#piraadipartei</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-irc' account='s-}@irc.freenode.net'>
<component name='channel'>#h2kkerikoda</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-irc' account='s-}@irc.freenode.net'>
<component name='channel'>#estobuntu</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
<chat proto='prpl-irc' account='s-}@irc.freenode.net'>
<component name='channel'>#alvatal</component>
<setting name='gnt-autojoin' type='bool'>1</setting>
</chat>
</group>
</blist>
<privacy>
<account proto='prpl-irc' name='nyymse@irc.gitter.im' mode='1'/>
<account proto='prpl-skypeweb' name='irc---' mode='1'/>
<account proto='prpl-irc' name='s-}@irc.freenode.net' mode='1'/>
<account proto='prpl-irc' name='s-}@stockholm-se.pirateirc.net' mode='1'/>
<account proto='prpl-facebook' name='nyymse' mode='1'/>
</privacy>
</purple>
bridge_me = [
"#piraadipartei",
"19:7404f921542f4a8ba96711c2b56f0371@thread.skype",
"857429714372198"
]
dont_announce = bridge_me
bridge_me = [
"#talsinki",
"971314366245255"
]
dont_announce = bridge_me
@boamaod

This comment has been minimized.

Copy link
Owner Author

@boamaod boamaod commented Jan 21, 2017

Basically from blist.xml you take contents of:

  • <component name='name'> for Facebook
  • <component name='channel'> for IRC
  • <component name='chatname'> for Skype

And put these in relevant *.conf files of relay bot script to be relayed (or write directly into code, if you want to create only one relay instance).

The XML file is generated by Pidgin/Finch if you run it to configure your accounts and chats to be joined and/or auto-joined, so first you run either of those applications (Pidgin for GUI, Finch for console), configure everything needed and then take the values from configuration (UI and XML files, both have these values) and use these in relay config to build bridges between whatever channels/chats whichever of your Libpurple compatible accounts is member of.

For example piraadipartei.conf relays IRC, Skype and Facebook. And dont_announce is to turn off announcements of joins/leaves, it's a list of channel names like the ones to be relayed defined in bridge_me, so we can just assign the same list, if we don't want join/leave messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.