mirror of
https://github.com/anope/anope.git
synced 2026-07-01 23:46:38 +02:00
Switch to using u->nc, courtesy of Rob, this means admin privs won't mysteriously vanish on changing nick.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2072 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -43,7 +43,7 @@ class CommandBSAssign : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (bi->flags & BI_PRIVATE && !u->na->nc->HasCommand("botserv/assign/private"))
|
||||
if (bi->flags & BI_PRIVATE && !u->nc->HasCommand("botserv/assign/private"))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
@@ -67,7 +67,7 @@ class CommandBSAssign : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if ((ci->botflags & BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->na->nc->HasCommand("botserv/administration")))
|
||||
if ((ci->botflags & BS_NOBOT) || (!check_access(u, ci, CA_ASSIGN) && !u->nc->HasCommand("botserv/administration")))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
|
||||
@@ -261,7 +261,7 @@ class CommandBSBadwords : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->na->nc->HasCommand("botserv/administration")))
|
||||
if (!check_access(u, ci, CA_BADWORDS) && (!need_args || !u->nc->HasCommand("botserv/administration")))
|
||||
{
|
||||
notice_lang(s_BotServ, u, ACCESS_DENIED);
|
||||
return MOD_CONT;
|
||||
|
||||
+3
-3
@@ -361,7 +361,7 @@ class CommandBSBot : public Command
|
||||
if (!stricmp(cmd, "ADD"))
|
||||
{
|
||||
// ADD nick user host real - 5
|
||||
if (!u->na->nc->HasCommand("botserv/bot/add"))
|
||||
if (!u->nc->HasCommand("botserv/bot/add"))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
@@ -383,7 +383,7 @@ class CommandBSBot : public Command
|
||||
{
|
||||
// CHANGE oldn newn user host real - 6
|
||||
// but only oldn and newn are required
|
||||
if (!u->na->nc->HasCommand("botserv/bot/change"))
|
||||
if (!u->nc->HasCommand("botserv/bot/change"))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
@@ -400,7 +400,7 @@ class CommandBSBot : public Command
|
||||
else if (!stricmp(cmd, "DEL"))
|
||||
{
|
||||
// DEL nick
|
||||
if (!u->na->nc->HasCommand("botserv/bot/del"))
|
||||
if (!u->nc->HasCommand("botserv/bot/del"))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
|
||||
@@ -46,7 +46,7 @@ class CommandBSBotList : public Command
|
||||
}
|
||||
}
|
||||
|
||||
if (u->na->nc->HasCommand("botserv/botlist") && count < nbots) {
|
||||
if (u->nc->HasCommand("botserv/botlist") && count < nbots) {
|
||||
notice_lang(s_BotServ, u, BOT_BOTLIST_PRIVATE_HEADER);
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
|
||||
+2
-2
@@ -80,12 +80,12 @@ class CommandBSInfo : public Command
|
||||
BOT_INFO_OPT_NONE));
|
||||
notice_lang(s_BotServ, u, BOT_INFO_BOT_USAGE, bi->chancount);
|
||||
|
||||
if (u->na->nc->HasCommand("botserv/administration"))
|
||||
if (u->nc->HasCommand("botserv/administration"))
|
||||
this->send_bot_channels(u, bi);
|
||||
}
|
||||
else if ((ci = cs_findchan(query)))
|
||||
{
|
||||
if (!is_founder(u, ci) && !u->na->nc->HasCommand("botserv/administration"))
|
||||
if (!is_founder(u, ci) && !u->nc->HasCommand("botserv/administration"))
|
||||
{
|
||||
notice_lang(s_BotServ, u, PERMISSION_DENIED);
|
||||
return MOD_CONT;
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ class CommandBSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
if (u->na->nc->HasCommand("botserv/set/private") && !stricmp(option, "PRIVATE"))
|
||||
if (u->nc->HasCommand("botserv/set/private") && !stricmp(option, "PRIVATE"))
|
||||
{
|
||||
BotInfo *bi;
|
||||
|
||||
@@ -66,7 +66,7 @@ class CommandBSSet : public Command
|
||||
notice_lang(s_BotServ, u, CHAN_X_NOT_REGISTERED, chan);
|
||||
else if (ci->flags & CI_FORBIDDEN)
|
||||
notice_lang(s_BotServ, u, CHAN_X_FORBIDDEN, chan);
|
||||
else if (!u->na->nc->HasCommand("botserv/administration") && !check_access(u, ci, CA_SET))
|
||||
else if (!u->nc->HasCommand("botserv/administration") && !check_access(u, ci, CA_SET))
|
||||
notice_lang(s_BotServ, u, ACCESS_DENIED);
|
||||
else {
|
||||
if (!stricmp(option, "DONTKICKOPS")) {
|
||||
@@ -117,7 +117,7 @@ class CommandBSSet : public Command
|
||||
syntax_error(s_BotServ, u, "SET GREET",
|
||||
BOT_SET_GREET_SYNTAX);
|
||||
}
|
||||
} else if (u->na->nc->HasCommand("botserv/set/nobot") && !stricmp(option, "NOBOT")) {
|
||||
} else if (u->nc->HasCommand("botserv/set/nobot") && !stricmp(option, "NOBOT")) {
|
||||
if (!stricmp(value, "ON")) {
|
||||
ci->botflags |= BS_NOBOT;
|
||||
if (ci->bi)
|
||||
|
||||
@@ -36,7 +36,7 @@ class CommandBSUnassign : public Command
|
||||
notice_lang(s_BotServ, u, CHAN_X_NOT_REGISTERED, chan);
|
||||
else if (ci->flags & CI_FORBIDDEN)
|
||||
notice_lang(s_BotServ, u, CHAN_X_FORBIDDEN, chan);
|
||||
else if (!u->na->nc->HasCommand("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
|
||||
else if (!u->nc->HasCommand("botserv/administration") && !check_access(u, ci, CA_ASSIGN))
|
||||
notice_lang(s_BotServ, u, ACCESS_DENIED);
|
||||
else if (!ci->bi)
|
||||
notice_help(s_BotServ, u, BOT_NOT_ASSIGNED);
|
||||
|
||||
Reference in New Issue
Block a user