def handlePacket_CH(self, ad, data):
        # Broadcast: Chat message

        osm = self.main.osm

        def check_cb(src_n, src_ipp, rest):

            (pktnum, nhash, flags, rest
             ) = self.decodePacket('!I4sB+', rest)

            text, rest = self.decodeString2(rest)
            if rest:
                raise BadPacketError("Extra data")

            if src_ipp == osm.me.ipp:
                # Possibly a spoofed chat from me
                if nhash == osm.me.nickHash():
                    dch = self.main.getOnlineDCH()
                    if dch:
                        dch.pushStatus(
                            "*** Chat spoofing detected: %s" % text)
                raise BadBroadcast("Spoofed chat")

            if not osm.syncd:
                # Not syncd, forward blindly
                return

            if osm.isModerated():
                # Note: this may desync the sender's chat_pktnum, causing
                # their next valid message to be delayed by 2 seconds, but
                # it's better than broadcasting useless traffic.
                raise BadBroadcast("Chat is moderated")

            elif src_n and nhash == src_n.nickHash():
                osm.cms.addMessage(
                    src_n, pktnum, src_n.nick, text, flags)

            else:
                raise Reject

        self.handleBroadcast(ad, data, check_cb)