#include "botapp.h" #include "mainwindow.h" #include "ircbot.h" #include "socketirc.h" BotApp::BotApp(int argc, char** argv) : nogui(false), server("irc.freenode.net"), port(6667), nick("SparrowBotDebug"), chan("epicsparrow") { // parsing arguments for(int i=1; igetConsole(), SLOT(append(QString))); QObject::connect(bot, SIGNAL(sendMsg(QString)), (QObject*)window->getConsole(), SLOT(append(QString))); QObject::connect((QObject*)window->getPrompt(), SIGNAL(sendMsg(QString)), sock, SLOT(sendMsg(QString))); QObject::connect((QObject*)window->getPrompt(), SIGNAL(returnPressed()), (QObject*)window->getPrompt(), SLOT(confirmationPerformed())); window->show(); } return sock->connectToServer(coreApp); } void BotApp::addModule(Module* module) { bot->addModule(module); }