mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -05:00
aa19735c5a
This will be a nice way to exercise both LibGUI and the TCP/IP support. :^)
32 lines
629 B
C++
32 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();
|
|
}
|