mirror of
https://github.com/anope/anope.git
synced 2026-06-28 15:36:38 +02:00
Unbreak bot assigning, also call event in the unassign function, rather than elsewherel. This will be needed for third party module devs.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1235 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -60,6 +60,8 @@ void BotInfo::Assign(User *u, ChannelInfo *ci)
|
||||
this->chancount++;
|
||||
if (ci->c && ci->c->usercount >= BSMinUsers)
|
||||
bot_join(ci);
|
||||
|
||||
send_event(EVENT_BOT_ASSIGN, 2, ci->name, this->nick);
|
||||
}
|
||||
|
||||
void BotInfo::UnAssign(User *u, ChannelInfo *ci)
|
||||
|
||||
@@ -88,9 +88,8 @@ int do_assign(User * u)
|
||||
|| (!check_access(u, ci, CA_ASSIGN) && !is_services_admin(u)))
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
else {
|
||||
|
||||
bi->Assign(u, ci);
|
||||
notice_lang(s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick, ci->name);
|
||||
send_event(EVENT_BOT_ASSIGN, 2, ci->name, bi->nick);
|
||||
}
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user