#include "botapp.h" #include "mainwindow.h" #include "ircbot.h" #include "socketirc.h" BotApp::BotApp(int argc, char** argv) : nogui(false) { QString server = QString("irc.freenode.net"); int port = 6667; QString nick = QString("SparrowBotDebug"); QString chan = QString("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); }