diff --git a/EasyXdcc.tar.bz2 b/EasyXdcc-1.0.tar.bz2 similarity index 100% rename from EasyXdcc.tar.bz2 rename to EasyXdcc-1.0.tar.bz2 diff --git a/EasyXdcc.py b/EasyXdcc.py index af18cc9..5c0c49c 100644 --- a/EasyXdcc.py +++ b/EasyXdcc.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- __module_name__ = "EasyXdcc" -__module_version__ = "1.2" +__module_version__ = "1.3" __module_description__ = "Xdcc Queues" __module_author__ = "Bouliere Tristan " __module_contributor__ = "Ultrabenosaurus " @@ -146,13 +146,17 @@ def load(self,file_name): pass def delqueue(self,file_name): - self.bots = [] if (type(file_name) == str): try: os.remove(file_name) except OSError: pass + def purgequeue(self, file_name): + self.bots = [] + delqueue(self, file_name) + + def connect(self): servchan=[] for bot in self.bots: @@ -173,7 +177,7 @@ def get_bot_current_chan(bot_name): global queue if (type(bot_name) != str): return None - serv = xchat.get_info("server"); + serv = xchat.get_info("host"); chan = xchat.get_info("channel"); if serv is None or chan is None: print "Not Connected!" @@ -188,7 +192,7 @@ def search_bot_current_chan(bot_name): global queue if (type(bot_name) != str): return None - serv = xchat.get_info("server"); + serv = xchat.get_info("host"); chan = xchat.get_info("channel"); if serv is None or chan is None: print "Not Connected!" @@ -269,7 +273,7 @@ def idx_EasyXdcc(word, word_eol, userdata): elif word[1] == "help": return help() elif word[1] == "purge": - return delqueue() + return purgequeue() elif word[1] == "auto": return show_auto() elif argc == 3: @@ -426,7 +430,7 @@ def save(): def load(): global queue,sav_file queue.load(sav_file) - # queue.connect() + queue.connect() print "Queue(s) state loaded" return xchat.EAT_ALL diff --git a/README.md b/README.md index 305bf4f..d884aed 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ EasyXdcc XDCC download manager with support for simultaneous queues on different channels, servers and bots, as well as saving/loading queue state. +__Current Version: 1.3__ ([changelog](#changelog)) + ## Credit This is not my work, I just found it and made some modifications. The site seems to be down even though the file is still accessible and searching for an hour today looking for an updated version returned nothing helpful, so I decided to host it here. @@ -15,6 +17,8 @@ Simply copy `EasyXdcc.py` to your IRC client's plugins folder. Original version Confirm it is loaded and active in your client's plugin manager. +:shipit: + ## Usage Make sure you have joined a channel with access to the bot you want files from, then use one of the following commands: @@ -83,9 +87,6 @@ The start/stop/auto-start and load/save/show queue functions are also available ## TODO -* make a changelog -* handle having packs queued on a server you're not currently connected to - * sometimes connecting to the same network doesn't mean the same server, which breaks the queue * use JSON for queue file * I hope python knows how to do JSON natively... * refactor for latest HexChat python interface guidelines @@ -93,3 +94,27 @@ The start/stop/auto-start and load/save/show queue functions are also available * make it smarter * file transfer status * automatic retry of failed transfers + +## Changelog + +### 1.3 + +* auto-start feature + * help text + * menu item +* handle loss of connection +* fix queue deletion to include in-memory queue + +### 1.2 + +* auto-load queue file when plugin loads +* OS detection for paths +* create paths if they don't exist + +### 1.1 + +* normalise indentation +* non-sequential pack list add/remove +* queue deletion +* menu entry for help text +* Windows path for queue file