@@ -0,0 +1,1669 @@
+import hexchat%0A%0A__module_name__ = %22Persistent PM Tabs%22%0A__module_author__ = %22Poorchop%22%0A__module_version__ = %220.1%22%0A__module_description__ = %22Restore previously open private message tabs after launching HexChat%22%0A%0A%0Adef closedialog_cb(word, word_eol, userdata):%0A    #TODO: check for existing dialogs to same user on other networks%0A    if hexchat.get_info(%22channel%22)%5B0%5D != %22#%22:%0A        nick = hexchat.get_info(%22channel%22)%0A        hexchat.del_pluginpref(%22persistpm_%22 + nick)%0A%0A%0Adef incomingdialog_cb(word, word_eol, userdata):%0A    nick = word%5B0%5D%0A    network = hexchat.get_info(%22network%22)%0A    hexchat.set_pluginpref(%22persistpm_%22 + nick, network)%0A%0A%0Adef query_cb(word, word_eol, userdata):%0A    if len(word) %3E 1:%0A        nick = word%5B1%5D%0A        network = hexchat.get_info(%22network%22)%0A        hexchat.set_pluginpref(%22persistpm_%22 + nick, network)%0A%0A%0Adef loadpm_cb(word, word_eol, userdata):%0A    #TODO: save dialogs to a single user across multiple networks%0A    for pref in hexchat.list_pluginpref():%0A        if pref%5B:10%5D == %22persistpm_%22:%0A            saved_network = hexchat.get_pluginpref(pref)%0A            if saved_network == hexchat.get_info(%22network%22):%0A                saved_nick = pref%5B10:%5D%0A                network_context = hexchat.find_context(channel=saved_network)%0A                network_context.command(%22QUERY %7B%7D%22.format(saved_nick))%0A%0A%0Ahexchat.hook_print(%22Close Context%22, closedialog_cb)%0Ahexchat.hook_print(%22Private Action to Dialog%22, incomingdialog_cb)%0Ahexchat.hook_print(%22Private Message to Dialog%22, incomingdialog_cb)%0Ahexchat.hook_command(%22QUERY%22, query_cb)%0Ahexchat.hook_print(%22Motd%22, loadpm_cb)%0A%0Ahexchat.prnt(__module_name__ + %22 version %22 + __module_version__ + %22 loaded%22)%0A

Create persistent-pm.py