65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
#include <iostream>
|
|
|
|
#include "botapp.h"
|
|
#include "module.h"
|
|
#include "message.h"
|
|
#include "basemodule.h"
|
|
#include "regismodule.h"
|
|
#include "sparrowmodule.h"
|
|
#include "poilaumodule.h"
|
|
#include "fourasmodule.h"
|
|
#include "todomodule.h"
|
|
#include "jankenmodule.h"
|
|
#include "rpgmodule.h"
|
|
#include "punishermodule.h"
|
|
#include "mmokobanmodule.h"
|
|
//
|
|
#include "janken.h"
|
|
|
|
class HelloWorldModule : public Module
|
|
{
|
|
public :
|
|
HelloWorldModule() : Module() {}
|
|
|
|
virtual bool messageHandler(Message msg)
|
|
{
|
|
if(msg.args.compare("plop ?") == 0)
|
|
{
|
|
answer = say("coucou " + msg.nick);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
virtual QString getName()
|
|
{
|
|
return "helloworld";
|
|
}
|
|
};
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
BotApp app = BotApp(argc, argv);
|
|
//app.addModule(new HelloWorldModule());
|
|
app.addModule(new RegisModule());
|
|
app.addModule(new SparrowModule());
|
|
app.addModule(new PoilAuModule());
|
|
app.addModule(new FourasModule());
|
|
app.addModule(new JankenModule());
|
|
app.addModule(new RPGModule());
|
|
app.addModule(new PunisherModule());
|
|
app.addModule(new MMOkobanModule());
|
|
//app.addModule(new TodoModule());
|
|
return app.exec();
|
|
|
|
/* Janken jk = Janken();
|
|
QString str;
|
|
jk.hasPlayed("Pierre");
|
|
int a = jk.pickMove();
|
|
switch(a){
|
|
case PIERRE:
|
|
std::cerr << QString("Pierre").toStdString() << std::endl;
|
|
break;
|
|
}*/
|
|
}
|