reop and handle guard violations.

def do_mode(self, target, msg, nick, send):
        """reop and handle guard violations."""
        mode_changes = irc.modes.parse_channel_modes(msg)
        with self.data_lock:
            for change in mode_changes:
                if change[1] == 'v':
                    self.voiced[target][change[2]] = True if change[0] == '+' else False
                if change[1] == 'o':
                    self.opers[target][change[2]] = True if change[0] == '+' else False
        # reop
        # FIXME: handle -o+o msbobBot msbobBot
        if [x for x in mode_changes if self.check_mode(x)]:
            send("%s: :(" % nick, target=target)
            # Assume bot admins know what they're doing.
            if not self.is_admin(None, nick):
                send("OP %s" % target, target='ChanServ')
                send("UNBAN %s" % target, target='ChanServ')

        if len(self.guarded) > 0:
            # if user is guarded and quieted, devoiced, or deopped, fix that
            regex = r"(.*(-v|-o|\+q|\+b)[^ ]*) (%s)" % "|".join(self.guarded)
            match = re.search(regex, msg)
            if match and nick not in [match.group(3), self.connection.real_nickname]:
                modestring = "+voe-qb %s" % (" ".join([match.group(3)] * 5))
                self.connection.mode(target, modestring)
                send('Mode %s on %s by the guard system' % (modestring, target), target=self.config['core']['ctrlchan'])