- Srv->Log(DEFAULT,"*** m_botmode: ERROR, failed to allocate user mode +B!");
- printf("Could not claim usermode +B for this module!");
- exit(0);
- }
- }
-
- virtual ~ModuleBotMode()
- {
- delete Srv;
- }
-
- virtual Version GetVersion()
- {
- return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
- }
-
- virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
- {
- if ((modechar == 'B') && (type == MT_CLIENT))
- {
- return 1;
+ if (!dest->IsModeSet('B'))
+ {
+ dest->SetMode('B',true);
+ return MODEACTION_ALLOW;
+ }