1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:28:10 +00:00

IRCClient: Start working on a simple graphical IRC client.

This will be a nice way to exercise both LibGUI and the TCP/IP support. :^)
This commit is contained in:
Andreas Kling 2019-03-15 12:14:23 +01:00
parent f87dec1cbf
commit aa19735c5a
18 changed files with 779 additions and 1 deletions

View file

@ -0,0 +1,32 @@
#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();
}