def cb():
            self.rebuild_bans_dcall = None
            osm = self.main.osm
            self.ban_matcher.clear()

            # Get all bans from bridges.
            if osm.bcm:
                for bridge in osm.bcm.bridges:
                    for b in bridge.bans.itervalues():
                        if b.enable:
                            self.ban_matcher.addRange(b.ipmask)

            # If I'm a bridge, get bans from IRC.
            if osm.bsm and self.main.ism:
                for ipmask in self.main.ism.bans:
                    self.ban_matcher.addRange(ipmask)

            self.enforceAllBans()