X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_botmode.cpp;h=2f9a3fafdbdb09e22823c4fe505f2438f393d4e7;hb=be36d92f3dcb0ac3772daebff43a5ecfe0a2d364;hp=1007fd4d9dd054193d473271a45aeff868af5604;hpb=3a554ef1e9be9dbcf3de3301a4a6c2938d643bea;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 1007fd4d9..2f9a3fafd 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -65,7 +65,8 @@ class ModuleBotMode : public Module { bm = new BotMode(ServerInstance); - ServerInstance->AddMode(bm, 'B'); + if (!ServerInstance->AddMode(bm, 'B')) + throw ModuleException("Could not add new modes!"); } void Implements(char* List) @@ -88,7 +89,7 @@ class ModuleBotMode : public Module { if (dst->IsModeSet('B')) { - ServerInstance->SendWhoisLine(src, dst, 335, std::string(src->nick)+" "+std::string(dst->nick)+" :is a \2bot\2 on "+ServerInstance->Config->Network); + ServerInstance->SendWhoisLine(src, dst, 335, std::string(src->nick)+" "+std::string(dst->nick)+" :is a bot on "+ServerInstance->Config->Network); } }