def func(self):
        "implement the offer"

        caller = self.caller
        if not self.args:
            caller.msg("Usage: offer <object> [, object2, ...] [:emote]")
            return
        if not self.trade_started:
            caller.msg("Wait until the other party has accepted to trade with you.")
            return

        # gather all offers
        offers = [part.strip() for part in self.args.split(',')]
        offerobjs = []
        for offername in offers:
            obj = caller.search(offername)
            if not obj:
                return
            offerobjs.append(obj)
        self.tradehandler.offer(self.caller, *offerobjs)

        # output
        if len(offerobjs) > 1:
            objnames = ", ".join("{w%s{n" % obj.key for obj in offerobjs[:-1]) + offerobjs[-1].key % " and {w%s{n"
        else:
            objnames = "{w%s{n" % offerobjs[0].key

        caller.msg(self.str_caller % ("You offer %s" % objnames))
        self.msg_other(caller, self.str_other % ("They offer %s" % objnames))


# accept
dataset/ETHPy150Open evennia/evennia/evennia/contrib/barter.py/CmdOffer.func/swapped operands of `%`