'Resolves offset specifications to a numeric offset. Returns a copy
of the action object.'

def resolve(self, settings, msg):

    c = copy.copy(self)
    l = msg.length(settings)
    if (c.offset == 'r'):
        c.offset = random.randrange(l)
    elif (c.offset == 'a'):
        c.offset = (l + 1)
    return c
