aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-07-03 13:58:34 +0100
committerGravatar Sadie Powell2021-07-03 13:58:34 +0100
commit4350050a82df2c90db4a2ca4fe3ae75a8a343e08 (patch)
tree0c2d4f450b8ab975ef17b04de0dbeb78946ca5bf /src/modules
parentUpdate the IRCCloud example config for the latest host changes. (diff)
Fix some "targ" usages which were missed in the earlier commit.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_callerid.cpp11
-rw-r--r--src/modules/m_censor.cpp6
-rw-r--r--src/modules/m_check.cpp50
-rw-r--r--src/modules/m_services_account.cpp8
4 files changed, 37 insertions, 38 deletions
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 361e2bdda..459f51739 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -140,15 +140,14 @@ struct CallerIDExtInfo : public ExtensionItem
// We need to walk the list of users on our accept list, and remove ourselves from their wholistsme.
for (callerid_data::UserSet::iterator it = dat->accepting.begin(); it != dat->accepting.end(); ++it)
{
- callerid_data *targ = this->get(*it, false);
-
- if (!targ)
+ callerid_data* target = this->get(*it, false);
+ if (!target)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (1)");
continue; // shouldn't happen, but oh well.
}
- if (!stdalgo::vector::swaperase(targ->wholistsme, dat))
+ if (!stdalgo::vector::swaperase(target->wholistsme, dat))
ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (2)");
}
delete dat;
@@ -292,8 +291,8 @@ public:
}
// Now, look them up, and add me to their list
- callerid_data *targ = extInfo.get(whotoadd, true);
- targ->wholistsme.push_back(dat);
+ callerid_data* target = extInfo.get(whotoadd, true);
+ target->wholistsme.push_back(dat);
user->WriteNotice(whotoadd->nick + " is now on your accept list");
return true;
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index e369f71a9..27ffbbd69 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -63,11 +63,11 @@ class ModuleCensor : public Module
case MessageTarget::TYPE_CHANNEL:
{
- Channel* targchan = target.Get<Channel>();
- if (!targchan->IsModeSet(cc))
+ Channel* targetchan = target.Get<Channel>();
+ if (!targetchan->IsModeSet(cc))
return MOD_RES_PASSTHRU;
- ModResult result = CheckExemption::Call(exemptionprov, user, targchan, "censor");
+ ModResult result = CheckExemption::Call(exemptionprov, user, targetchan, "censor");
if (result == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;
break;
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 87e601913..74159611c 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -170,10 +170,10 @@ class CommandCheck : public Command
return CMD_SUCCESS;
User *targetuser;
- Channel *targchan;
+ Channel *targetchan;
targetuser = ServerInstance->FindNick(parameters[0]);
- targchan = ServerInstance->FindChan(parameters[0]);
+ targetchan = ServerInstance->FindChan(parameters[0]);
/*
* Syntax of a /check reply:
@@ -187,7 +187,7 @@ class CommandCheck : public Command
if (targetuser)
{
- LocalUser* loctarg = IS_LOCAL(targetuser);
+ LocalUser* localtarget = IS_LOCAL(targetuser);
/* /check on a user */
context.Write("nuh", targetuser->GetFullHost());
context.Write("realnuh", targetuser->GetFullRealHost());
@@ -198,8 +198,8 @@ class CommandCheck : public Command
context.Write("uid", targetuser->uuid);
context.Write("signon", targetuser->signon);
context.Write("nickts", targetuser->age);
- if (loctarg)
- context.Write("lastmsg", loctarg->idle_lastmsg);
+ if (localtarget)
+ context.Write("lastmsg", localtarget->idle_lastmsg);
if (targetuser->IsAway())
{
@@ -213,26 +213,26 @@ class CommandCheck : public Command
OperInfo* oper = targetuser->oper;
/* user is an oper of type ____ */
context.Write("opertype", oper->name);
- if (loctarg)
+ if (localtarget)
{
- context.Write("chanmodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_CHANNEL));
- context.Write("usermodeperms", GetAllowedOperOnlyModes(loctarg, MODETYPE_USER));
- context.Write("snomaskperms", GetAllowedOperOnlySnomasks(loctarg));
+ context.Write("chanmodeperms", GetAllowedOperOnlyModes(localtarget, MODETYPE_CHANNEL));
+ context.Write("usermodeperms", GetAllowedOperOnlyModes(localtarget, MODETYPE_USER));
+ context.Write("snomaskperms", GetAllowedOperOnlySnomasks(localtarget));
context.Write("commandperms", oper->AllowedOperCommands.ToString());
context.Write("permissions", oper->AllowedPrivs.ToString());
}
}
- if (loctarg)
+ if (localtarget)
{
- context.Write("clientaddr", loctarg->client_sa.str());
- context.Write("serveraddr", loctarg->server_sa.str());
+ context.Write("clientaddr", localtarget->client_sa.str());
+ context.Write("serveraddr", localtarget->server_sa.str());
- std::string classname = loctarg->GetClass()->name;
+ std::string classname = localtarget->GetClass()->name;
if (!classname.empty())
context.Write("connectclass", classname);
- context.Write("exempt", loctarg->exempt ? "yes" : "no");
+ context.Write("exempt", localtarget->exempt ? "yes" : "no");
}
else
context.Write("onip", targetuser->GetIPString());
@@ -248,25 +248,25 @@ class CommandCheck : public Command
context.DumpExt(targetuser);
}
- else if (targchan)
+ else if (targetchan)
{
/* /check on a channel */
- context.Write("createdat", targchan->age);
+ context.Write("createdat", targetchan->age);
- if (!targchan->topic.empty())
+ if (!targetchan->topic.empty())
{
/* there is a topic, assume topic related information exists */
- context.Write("topic", targchan->topic);
- context.Write("topic_setby", targchan->setby);
- context.Write("topic_setat", targchan->topicset);
+ context.Write("topic", targetchan->topic);
+ context.Write("topic_setby", targetchan->setby);
+ context.Write("topic_setat", targetchan->topicset);
}
- context.Write("modes", targchan->ChanModes(true));
- context.Write("membercount", ConvToStr(targchan->GetUserCounter()));
+ context.Write("modes", targetchan->ChanModes(true));
+ context.Write("membercount", ConvToStr(targetchan->GetUserCounter()));
/* now the ugly bit, spool current members of a channel. :| */
- const Channel::MemberMap& ulist = targchan->GetUsers();
+ const Channel::MemberMap& ulist = targetchan->GetUsers();
/* note that unlike /names, we do NOT check +i vs in the channel */
for (Channel::MemberMap::const_iterator i = ulist.begin(); i != ulist.end(); ++i)
@@ -282,9 +282,9 @@ class CommandCheck : public Command
const ModeParser::ListModeList& listmodes = ServerInstance->Modes->GetListModes();
for (ModeParser::ListModeList::const_iterator i = listmodes.begin(); i != listmodes.end(); ++i)
- context.DumpListMode(*i, targchan);
+ context.DumpListMode(*i, targetchan);
- context.DumpExt(targchan);
+ context.DumpExt(targetchan);
}
else
{
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 0192e7e78..44e121cfd 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -215,16 +215,16 @@ class ModuleServicesAccount
{
case MessageTarget::TYPE_CHANNEL:
{
- Channel* targchan = target.Get<Channel>();
+ Channel* targetchan = target.Get<Channel>();
- if (!targchan->IsModeSet(regmoderatedmode) || is_registered)
+ if (!targetchan->IsModeSet(regmoderatedmode) || is_registered)
return MOD_RES_PASSTHRU;
- if (CheckExemption::Call(exemptionprov, user, targchan, "regmoderated") == MOD_RES_ALLOW)
+ if (CheckExemption::Call(exemptionprov, user, targetchan, "regmoderated") == MOD_RES_ALLOW)
return MOD_RES_PASSTHRU;
// User is messaging a +M channel and is not registered or exempt.
- user->WriteNumeric(ERR_NEEDREGGEDNICK, targchan->name, "You need to be identified to a registered account to message this channel");
+ user->WriteNumeric(ERR_NEEDREGGEDNICK, targetchan->name, "You need to be identified to a registered account to message this channel");
return MOD_RES_DENY;
break;
}