mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
More -Wshadow fixes.. not really finished yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8893 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
5db1d322be
commit
25c8c8ba02
@ -29,10 +29,10 @@ class CommandSanick : public Command
|
||||
|
||||
CmdResult Handle (const char** parameters, int pcnt, User *user)
|
||||
{
|
||||
User* source = ServerInstance->FindNick(parameters[0]);
|
||||
if (source)
|
||||
User* target = ServerInstance->FindNick(parameters[0]);
|
||||
if (target)
|
||||
{
|
||||
if (ServerInstance->ULine(source->server))
|
||||
if (ServerInstance->ULine(target->server))
|
||||
{
|
||||
user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
|
||||
return CMD_FAILURE;
|
||||
@ -40,7 +40,7 @@ class CommandSanick : public Command
|
||||
std::string oldnick = user->nick;
|
||||
if (ServerInstance->IsNick(parameters[1]))
|
||||
{
|
||||
if (source->ForceNickChange(parameters[1]))
|
||||
if (target->ForceNickChange(parameters[1]))
|
||||
{
|
||||
ServerInstance->SNO->WriteToSnoMask('A', oldnick+" used SANICK to change "+std::string(parameters[0])+" to "+parameters[1]);
|
||||
return CMD_SUCCESS;
|
||||
|
@ -134,12 +134,12 @@ uint32_t sha256_k[64] =
|
||||
|
||||
class ModuleSHA256 : public Module
|
||||
{
|
||||
void SHA256Init(SHA256Context *ctx, const unsigned int* key)
|
||||
void SHA256Init(SHA256Context *ctx, const unsigned int* ikey)
|
||||
{
|
||||
if (key)
|
||||
if (ikey)
|
||||
{
|
||||
for (int i = 0; i < 8; i++)
|
||||
ctx->h[i] = key[i];
|
||||
ctx->h[i] = ikey[i];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -236,12 +236,12 @@ class ModuleSHA256 : public Module
|
||||
UNPACK32(ctx->h[i], &digest[i << 2]);
|
||||
}
|
||||
|
||||
void SHA256(const char *src, char *dest, int len, const char* hxc, const unsigned int* key = NULL)
|
||||
void SHA256(const char *src, char *dest, int len, const char* hxc, const unsigned int* ikey = NULL)
|
||||
{
|
||||
// Generate the hash
|
||||
unsigned char bytehash[SHA256_DIGEST_SIZE];
|
||||
SHA256Context ctx;
|
||||
SHA256Init(&ctx, key);
|
||||
SHA256Init(&ctx, ikey);
|
||||
SHA256Update(&ctx, (unsigned char *)src, (unsigned int)len);
|
||||
SHA256Final(&ctx, bytehash);
|
||||
// Convert it to hex
|
||||
|
@ -204,8 +204,8 @@ class ModuleSWhois : public Module
|
||||
std::string* text;
|
||||
if (!dest->GetExt("swhois", text))
|
||||
{
|
||||
std::string* text = new std::string(extdata);
|
||||
dest->Extend("swhois",text);
|
||||
std::string* text2 = new std::string(extdata);
|
||||
dest->Extend("swhois",text2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,9 +59,9 @@ class ModuleXMLSocket : public Module
|
||||
if (ServerInstance->Config->AddIOHook(portno, this))
|
||||
{
|
||||
listenports.push_back(portno);
|
||||
for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
|
||||
if (ServerInstance->Config->ports[i]->GetPort() == portno)
|
||||
ServerInstance->Config->ports[i]->SetDescription("xml");
|
||||
for (size_t j = 0; j < ServerInstance->Config->ports.size(); j++)
|
||||
if (ServerInstance->Config->ports[j]->GetPort() == portno)
|
||||
ServerInstance->Config->ports[j]->SetDescription("xml");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user