'This performs the actual command.'

def func(self):

    if (len(self.arglist) < 2):
        self.caller.msg('Usage:    cover    <worn    clothing>    [with]    <clothing    object>')
        return
    if ((self.arglist[1].lower() == 'with') and (len(self.arglist) > 2)):
        del self.arglist[1]
    to_cover = self.caller.search(self.arglist[0], candidates=self.caller.contents)
    cover_with = self.caller.search(self.arglist[1], candidates=self.caller.contents)
    if ((not to_cover) or (not cover_with)):
        return
    if (not to_cover.is_typeclass('evennia.contrib.clothing.Clothing')):
        self.caller.msg(("%s    isn't    clothes!" % to_cover.name))
        return
    if (not cover_with.is_typeclass('evennia.contrib.clothing.Clothing')):
        self.caller.msg(("%s    isn't    clothes!" % cover_with.name))
        return
    if cover_with.db.clothing_type:
        if (cover_with.db.clothing_type in CLOTHING_TYPE_CANT_COVER_WITH):
            self.caller.msg("You    can't    cover    anything    with    that!")
            return
    if (not to_cover.db.worn):
        self.caller.msg(("You're    not    wearing    %s!" % to_cover.name))
        return
    if (to_cover == cover_with):
        self.caller.msg("You    can't    cover    an    item    with    itself!")
        return
    if cover_with.db.covered_by:
        self.caller.msg(('%s    is    covered    by    something    else!' % cover_with.name))
        return
    if to_cover.db.covered_by:
        self.caller.msg(('%s    is    already    covered    by    %s.' % (cover_with.name, to_cover.db.covered_by.name)))
        return
    if (not cover_with.db.worn):
        cover_with.wear(self.caller, True)
    self.caller.location.msg_contents(('%s    covers    %s    with    %s.' % (self.caller, to_cover.name, cover_with.name)))
    to_cover.db.covered_by = cover_with
