mirror of
https://github.com/correl/mercenary.git
synced 2024-11-23 19:19:51 +00:00
Correl Roush
0381859219
that will eventually be integrated into it git-svn-id: file:///srv/svn/ircclient/trunk@1 a9804ffe-773b-11dd-bd7c-89c3ef1d2733
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#include "testapp.h"
|
|
|
|
TestApp::TestApp( int argc, char *argv[] ) : QCoreApplication( argc, argv ) {
|
|
irc = new IRCClient();
|
|
connect( irc->conn, SIGNAL( connected() ), this, SLOT( connected() ) );
|
|
connect( irc->conn, SIGNAL( disconnected() ), this, SLOT( disconnected() ) );
|
|
connect( irc, SIGNAL( registered() ), this, SLOT( registered() ) );
|
|
connect( irc, SIGNAL( sentRAW( QString ) ), this, SLOT( sent( QString ) ) );
|
|
connect( irc, SIGNAL( rcvdRAW( QString ) ), this, SLOT( rcvd( QString ) ) );
|
|
connect( irc, SIGNAL( debug( QString ) ), this, SLOT( debug( QString ) ) );
|
|
|
|
irc->connectAndRegister( argc > 1 ? argv[1] : "dev1", 6667, argc > 2 ? argv[2] : "Test", "correlr", "Correl Roush" );
|
|
}
|
|
|
|
void TestApp::connected() {
|
|
printf( "Connected!\n" );
|
|
}
|
|
|
|
void TestApp::registered() {
|
|
irc->join( "#pinet" );
|
|
}
|
|
|
|
void TestApp::disconnected() {
|
|
printf( "Disconnected.\n" );
|
|
}
|
|
|
|
void TestApp::sent( QString text ) {
|
|
printf( ">>> %s", (const char*)text.toLatin1() );
|
|
}
|
|
|
|
void TestApp::rcvd( QString text ) {
|
|
printf( "<<< %s", (const char*)text.toLatin1() );
|
|
}
|
|
|
|
void TestApp::debug( QString text ) {
|
|
printf( "DEBUG: %s\n", (const char*)text.toLatin1() );
|
|
}
|
|
|