data = file(options.unpack).read()
        decoded = cs.decode(data)
        print "Unpacking %s..." % options.unpack
        cs.unpackdir(decoded, options.campaigns_dir, verbose=True)

    elif options.remove:
        cs = CampaignClient(address)
        campaign_list = cs.list_campaigns()
        fetchlist = search_addons(campaign_list, options.remove)

        if len(fetchlist) == 0:
            print "No addon found"

        for id, name, version, uploads in fetchlist:
            print "Trying to remove addon name:", name
            data = cs.delete_campaign(id, options.login, options.password)
            for message in data.find_all("message", "error"):
                print message.get_text_val("message")

    elif options.upload:
        cs = CampaignClient(address)

        if os.path.isdir(options.upload):
            # New style with _server.pbl
            pblfile = os.path.join(options.upload, "_server.pbl")
            name = os.path.basename(options.upload)
            wmldir = options.upload
            cfgfile = None  # _main.cfg will be uploaded with the rest
            ignfile = os.path.join(options.upload, "_server.ign")
        else:
            # Old style with external .pbl file
                        "as the version already is", local_version, \
                        "(The add-on got re-uploaded.)"
            else:
                if options.verbose:
                    print "Not downloading", name, \
                        "because it is already up-to-date."
                        
    elif options.unpack:
        cs = CampaignClient(address)
        data = file(options.unpack).read()
        decoded = cs.decode(data)
        print "Unpacking %s..." % options.unpack
        cs.unpackdir(decoded, options.campaigns_dir,  verbose = True)
    elif options.remove:
        cs = CampaignClient(address)
        m = cs.delete_campaign(options.remove, options.login, options.password)
        #for message in data.find_all("message", "error"):
        #    print message.get_text_val("message")

    elif options.change_passphrase:
        cs = CampaignClient(address)
        data = cs.change_passphrase(*options.change_passphrase)
        for message in data.find_all("message", "error"):
            print message.get_text_val("message")

    elif options.upload:
        cs = CampaignClient(address)
        if os.path.isdir(options.upload):
            # New style with _server.pbl
            pblfile = os.path.join(options.upload, "_server.pbl")
            name = os.path.basename(options.upload)