+ void SendHistory(LocalUser* user, Channel* channel, HistoryList* list, time_t mintime)
+ {
+ if (batchmanager)
+ {
+ batchmanager->Start(batch);
+ batch.GetBatchStartMessage().PushParamRef(channel->name);
+ }
+
+ for(std::deque<HistoryItem>::iterator i = list->lines.begin(); i != list->lines.end(); ++i)
+ {
+ const HistoryItem& item = *i;
+ if (item.ts >= mintime)
+ {
+ ClientProtocol::Messages::Privmsg msg(ClientProtocol::Messages::Privmsg::nocopy, item.sourcemask, channel, item.text);
+ if (servertimemanager)
+ servertimemanager->Set(msg, item.ts);
+ batch.AddToBatch(msg);
+ user->Send(ServerInstance->GetRFCEvents().privmsg, msg);
+ }
+ }
+
+ if (batchmanager)
+ batchmanager->End(batch);
+ }
+