ladybird/Applications/IRCClient/IRCQuery.cpp
Andreas Kling aa19735c5a IRCClient: Start working on a simple graphical IRC client.
This will be a nice way to exercise both LibGUI and the TCP/IP support. :^)
2019-03-15 12:14:23 +01:00

33 lines
629 B
C++

#include "IRCQuery.h"
#include "IRCClient.h"
#include <stdio.h>
#include <time.h>
IRCQuery::IRCQuery(IRCClient& client, const String& name)
: m_client(client)
, m_name(name)
, m_log(IRCLogBuffer::create())
{
}
IRCQuery::~IRCQuery()
{
}
Retained<IRCQuery> IRCQuery::create(IRCClient& client, const String& name)
{
return adopt(*new IRCQuery(client, name));
}
void IRCQuery::dump() const
{
printf("IRCQuery{%p}: %s\n", this, m_name.characters());
log().dump();
}
void IRCQuery::add_message(char prefix, const String& name, const String& text)
{
log().add_message(prefix, name, text);
dump();
}