             Chat.tasks[task._id.toString()] = task
             Chat.length++
 
-            Database.db.collection('Chat._queue').insert task, callback
+            Database.db.collection('chat_queue').insert task, callback
 
         , ->
 
-            Database.db.collection('Chat._data').update
+            Database.db.collection('chat_data').update
                 _id: 'last_task'
             ,    
                 $set:
-                    timestamp: timestampMax
+                    'timestamp_' + type: timestampMax
             ,
                 upsert: true
             , (err) ->
 
-                logger.info "[Broadcasts] Created #{preparedTasks.length} tasks (all #{Chat.length} tasks)."
+                logger.info "[Broadcasts.#{type}] Created #{preparedTasks.length} tasks (all #{Chat.length} tasks)."
                 callback && callback()
     
-    prepareFromDatabase: (callback) ->
-
-        logger.info "[Broadcasts] Continue: [#{Config.Region.SouthWest.Lat},#{Config.Region.SouthWest.Lng}]-[#{Config.Region.NorthEast.Lat},#{Config.Region.NorthEast.Lng}]"
+    prepareFromDatabase: (type, callback) ->
+
+        logger.info "[Broadcasts.#{type}] Continue: [#{Config.Region.SouthWest.Lat},#{Config.Region.SouthWest.Lng}]-[#{Config.Region.NorthEast.Lat},#{Config.Region.NorthEast.Lng}]"
         
         # TODO: Maybe should take TimeOffset into consideration?
         timestampMin    = new Date().getTime() - Config.Chat.TraceTimespanMS


, Config.Database.MaxParallel

insertMessage = (id, timestamp, data, _callback) ->

    main = ->

        insertCount++

        data2 = data.plext

        # parse markup
        markup = {}
        count = {}

        for m in data.plext.markup
            count[m[0]] = 0 if not count[m[0]]?
            count[m[0]]++
            markup[m[0]+count[m[0]].toString()] = m[1]

        data2.markup = markup

        dbQueue.push (callback) ->

            doc = data2
            doc._id = id
            doc.time = timestamp

            async.series [

                (callback) ->
                
                    Database.db.collection('Chat').insert doc, callback

                , (callback) ->

                    # resove player names
                    if doc.markup.PLAYER1?

                        level = null

                        if doc.markup.TEXT1.plain is ' deployed an '
                            level = parseInt doc.markup.TEXT2.plain.substr(1)

                        Agent.resolved doc.markup.PLAYER1.plain,
                            team:  Agent.strToTeam(doc.markup.PLAYER1.team)
                            level: level
                        , callback

                    else

                        callback()
                    
            ], ->

                callback()
                _callback()

    # update count
    if insertCount % 100 is 0
        
        Database.db.collection('Chat').count {}, (err, count) ->
            messageCount = count
            main()

    else

        main()


                # get last timestamp

                Database.db.collection('chat_data').findOne {_id: 'last_task'}, (err, data) ->

                    timestampMin = data[type].timestamp + 1 if data?[type]?.timestamp?
                    timestampMin = timestampMinMax if timestampMin < timestampMinMax

                    callback()
