if(!bot) //no opped bots present... channel can't be recovered
return;
struct ClientSocket *target;
+ struct ModeBuffer *modeBuf;
+ modeBuf = initModeBuffer(bot, chan);
for(target = getBots(SOCKET_FLAG_READY, NULL); target; target = getBots(SOCKET_FLAG_READY, target)) {
if((target->flags & SOCKET_FLAG_REQUEST_OP) && (chanuser = getChanUser(target->user, chan)) && !(chanuser->flags & CHANUSERFLAG_OPPED)) {
- putsock(bot, "MODE %s +o %s", chan->name, target->user->nick);
+ modeBufferOp(modeBuf, target->user->nick);
}
}
+ freeModeBuffer(modeBuf);
}
static void neonbackup_event_join(struct ChanUser *chanuser) {
//someone deopped the bot???
if(!neonserv_cmd_mode_botwar_detect(client, user, chan, &botwar_detect_executed))
requestOp(client->user, chan);
+ } else if(modes[i] == 'o' && add && isBot(cuser)) {
+ //someone opped a bot
+ if(!neonserv_cmd_mode_botwar_detect(client, user, chan, &botwar_detect_executed))
+ module_neonbackup_recover_chan(chan);
}
if((modes[i] == 'o' || (modes[i] == 'h' && !with_halfops)) && !(add && isBot(cuser))) {
if(uaccess < db_canop) {