mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Fix Windows build and most MSVC warnings
This commit is contained in:
parent
f673caf8a8
commit
65667e7cc2
@ -197,7 +197,7 @@ namespace Cap
|
||||
if (!IsRegistered())
|
||||
return false;
|
||||
Ext caps = extitem->get(user);
|
||||
return (caps & GetMask());
|
||||
return ((caps & GetMask()) != 0);
|
||||
}
|
||||
|
||||
/** Turn the capability on/off for a user. If the cap is not registered this method has no effect.
|
||||
|
@ -307,7 +307,7 @@ void CommandStats::DoStats(Stats::Context& stats)
|
||||
n_eaten = (double)(( (uint64_t)(KernelTime.dwHighDateTime) << 32 ) + (uint64_t)(KernelTime.dwLowDateTime))/100000;
|
||||
per = (n_eaten / n_elapsed);
|
||||
snprintf(percent, 30, "%03.5f%%", per);
|
||||
stats.AddRow(249, std::string("CPU Use (total): ")+percent));
|
||||
stats.AddRow(249, std::string("CPU Use (total): ")+percent);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -55,7 +55,8 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener
|
||||
|
||||
static bool CanRequest(LocalUser* user, Ext usercaps, Capability* cap, bool adding)
|
||||
{
|
||||
if ((usercaps & cap->GetMask()) == adding)
|
||||
const bool hascap = ((usercaps & cap->GetMask()) != 0);
|
||||
if (hascap == adding)
|
||||
return true;
|
||||
|
||||
return cap->OnRequest(user, adding);
|
||||
|
@ -119,7 +119,7 @@ class CommandClearChan : public Command
|
||||
mask = ((method[0] == 'Z') ? curr->GetIPString() : "*@" + curr->host);
|
||||
xline = xlf->Generate(ServerInstance->Time(), 60*60, user->nick, reason, mask);
|
||||
}
|
||||
catch (ModuleException& ex)
|
||||
catch (ModuleException&)
|
||||
{
|
||||
// Nothing, move on to the next user
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user