1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
16 /* $ModDesc: Provides support for unreal-style umode +B */
18 /** Handles user mode +B
20 class BotMode : public SimpleUserModeHandler
23 BotMode(Module* Creator) : SimpleUserModeHandler(Creator, "bot", 'B') { }
26 class ModuleBotMode : public Module
33 if (!ServerInstance->Modes->AddMode(&bm))
34 throw ModuleException("Could not add new modes!");
35 Implementation eventlist[] = { I_OnWhois };
36 ServerInstance->Modules->Attach(eventlist, this, 1);
40 virtual ~ModuleBotMode()
44 virtual Version GetVersion()
46 return Version("Provides support for unreal-style umode +B",VF_COMMON|VF_VENDOR);
49 virtual void OnWhois(User* src, User* dst)
51 if (dst->IsModeSet('B'))
53 ServerInstance->SendWhoisLine(src, dst, 335, std::string(src->nick)+" "+std::string(dst->nick)+" :is a bot on "+ServerInstance->Config->Network);
60 MODULE_INIT(ModuleBotMode)