Skip to content

Commit

Permalink
fix some stuff, make changelog, rename archive
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultrabenosaurus committed Feb 20, 2016
1 parent 1b52bcc commit 1e3eb80
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
File renamed without changes.
16 changes: 10 additions & 6 deletions EasyXdcc.py
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"
__module_contributor__ = "Ultrabenosaurus <https://github.com/Ultrabenosaurus/EasyXdcc>"
Expand Down Expand Up @@ -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:
Expand All @@ -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!"
Expand All @@ -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!"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down Expand Up @@ -83,13 +87,34 @@ 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
* handle both XChat and HexChat interfaces or just go with HexChat now?
* 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

0 comments on commit 1e3eb80

Please sign in to comment.