From 0014f08700589dd53e8a247a9578e7a69f22d4d6 Mon Sep 17 00:00:00 2001 From: Anselme Date: Sat, 30 May 2015 23:29:43 +0200 Subject: [PATCH] fixed small bug --- app/main.cpp | 2 ++ ircbot/basemodule.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/main.cpp b/app/main.cpp index 9df15da..2291914 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -1,6 +1,7 @@ #include "botapp.h" #include "module.h" #include "message.h" +#include "basemodule.h" class CustomModule : public Module { @@ -12,6 +13,7 @@ public : if(msg.args.compare("plop ?") == 0) { answer = say("coucou"); + return true; } return false; diff --git a/ircbot/basemodule.cpp b/ircbot/basemodule.cpp index b67b9cd..2f893a7 100644 --- a/ircbot/basemodule.cpp +++ b/ircbot/basemodule.cpp @@ -153,8 +153,8 @@ bool BaseModule::onChanHandler(Message msg) QStringList names = msg.args.split(' '); for(QString s : names) { - users.getOrAdd(s); - answer += whois(s); + User* u = users.getOrAdd(s); + answer += whois(u->getNick()); ret = true; } }