summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-12-28 16:59:03 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-12-28 16:59:03 +0100
commit299f262a4fd1c0a508a5b6748761128a2c3efde9 (patch)
tree6ec11d59ecdd976ecf6636af22ebb49367da5fcf
parent03561f500eb8e82b2ddfa0489fb4ae03c2c9631b (diff)
Fix some whitespace issues
-rw-r--r--include/consolecolors.h36
-rw-r--r--include/extensible.h4
-rw-r--r--include/hashcomp.h38
-rw-r--r--include/mode.h8
-rw-r--r--src/configreader.cpp6
-rw-r--r--src/coremods/core_xline/cmd_kline.cpp12
-rw-r--r--src/modules/m_alias.cpp2
-rw-r--r--src/modules/m_cap.cpp2
-rw-r--r--src/modules/m_repeat.cpp2
9 files changed, 55 insertions, 55 deletions
diff --git a/include/consolecolors.h b/include/consolecolors.h
index 9b7e0670a..d92be58bc 100644
--- a/include/consolecolors.h
+++ b/include/consolecolors.h
@@ -29,70 +29,70 @@ extern HANDLE g_hStdout;
inline std::ostream& con_green(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_red(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_white(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_white_bright(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN|FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_bright(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor);
- return s;
+ SetConsoleTextAttribute(g_hStdout, FOREGROUND_INTENSITY|g_wBackgroundColor);
+ return s;
}
inline std::ostream& con_reset(std::ostream &s)
{
- SetConsoleTextAttribute(g_hStdout, g_wOriginalColors);
- return s;
+ SetConsoleTextAttribute(g_hStdout, g_wOriginalColors);
+ return s;
}
#else
inline std::ostream& con_green(std::ostream &s)
{
- return s << "\033[1;32m";
+ return s << "\033[1;32m";
}
inline std::ostream& con_red(std::ostream &s)
{
- return s << "\033[1;31m";
+ return s << "\033[1;31m";
}
inline std::ostream& con_white(std::ostream &s)
{
- return s << "\033[0m";
+ return s << "\033[0m";
}
inline std::ostream& con_white_bright(std::ostream &s)
{
- return s << "\033[1m";
+ return s << "\033[1m";
}
inline std::ostream& con_bright(std::ostream &s)
{
- return s << "\033[1m";
+ return s << "\033[1m";
}
inline std::ostream& con_reset(std::ostream &s)
{
- return s << "\033[0m";
+ return s << "\033[0m";
}
#endif
diff --git a/include/extensible.h b/include/extensible.h
index 1a51fdaaf..9714e9654 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -38,8 +38,8 @@ enum SerializeFormat
class CoreExport ExtensionItem : public ServiceProvider, public usecountbase
{
public:
- /** Extensible subclasses
- */
+ /** Extensible subclasses
+ */
enum ExtensibleType
{
EXT_USER,
diff --git a/include/hashcomp.h b/include/hashcomp.h
index c99b5d646..87b2636fc 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -72,25 +72,25 @@ CoreExport extern unsigned const char rfc_case_sensitive_map[256];
template<typename T> const T& SearchAndReplace(T& text, const T& pattern, const T& replace)
{
- T replacement;
- if ((!pattern.empty()) && (!text.empty()))
- {
- for (std::string::size_type n = 0; n != text.length(); ++n)
- {
- if (text.length() >= pattern.length() && text.substr(n, pattern.length()) == pattern)
- {
- /* Found the pattern in the text, replace it, and advance */
- replacement.append(replace);
- n = n + pattern.length() - 1;
- }
- else
- {
- replacement += text[n];
- }
- }
- }
- text = replacement;
- return text;
+ T replacement;
+ if ((!pattern.empty()) && (!text.empty()))
+ {
+ for (std::string::size_type n = 0; n != text.length(); ++n)
+ {
+ if (text.length() >= pattern.length() && text.substr(n, pattern.length()) == pattern)
+ {
+ // Found the pattern in the text, replace it, and advance
+ replacement.append(replace);
+ n = n + pattern.length() - 1;
+ }
+ else
+ {
+ replacement += text[n];
+ }
+ }
+ }
+ text = replacement;
+ return text;
}
/** The irc namespace contains a number of helper classes.
diff --git a/include/mode.h b/include/mode.h
index d8884bf9f..e7ac756ec 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -774,10 +774,10 @@ class CoreExport ModeParser : public fakederef<ModeParser>
const ModeHandlerMap& GetModes(ModeType mt) const { return modehandlersbyname[mt]; }
/** Show the list of a list mode to a user. Modules can deny the listing.
- * @param user User to show the list to.
- * @param chan Channel to show the list of.
- * @param mh List mode to show the list of.
- */
+ * @param user User to show the list to.
+ * @param chan Channel to show the list of.
+ * @param mh List mode to show the list of.
+ */
void ShowListModeList(User* user, Channel* chan, ModeHandler* mh);
};
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 092911c74..2c31fa0ae 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -626,11 +626,11 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid)
ConfigTag *tag = (*it)->config;
// Make sure our connection class allows motd colors
if(!tag->getBool("allowmotdcolors"))
- continue;
+ continue;
ConfigFileCache::iterator file = this->Files.find(tag->getString("motd", "motd"));
if (file != this->Files.end())
- InspIRCd::ProcessColors(file->second);
+ InspIRCd::ProcessColors(file->second);
}
/* No old configuration -> initial boot, nothing more to do here */
@@ -697,7 +697,7 @@ void ServerConfig::ApplyModules(User* user)
if (user)
user->WriteNumeric(ERR_CANTUNLOADMODULE, "%s :Failed to unload module %s: %s", modname.c_str(), modname.c_str(), ServerInstance->Modules->LastError().c_str());
else
- ServerInstance->SNO->WriteGlobalSno('a', "Failed to unload module %s: %s", modname.c_str(), ServerInstance->Modules->LastError().c_str());
+ ServerInstance->SNO->WriteGlobalSno('a', "Failed to unload module %s: %s", modname.c_str(), ServerInstance->Modules->LastError().c_str());
}
}
diff --git a/src/coremods/core_xline/cmd_kline.cpp b/src/coremods/core_xline/cmd_kline.cpp
index 50ab88398..ee85fdd1d 100644
--- a/src/coremods/core_xline/cmd_kline.cpp
+++ b/src/coremods/core_xline/cmd_kline.cpp
@@ -34,7 +34,7 @@ CommandKline::CommandKline(Module* parent)
*/
CmdResult CommandKline::Handle (const std::vector<std::string>& parameters, User *user)
{
- std::string target = parameters[0];
+ std::string target = parameters[0];
if (parameters.size() >= 3)
{
@@ -49,11 +49,11 @@ CmdResult CommandKline::Handle (const std::vector<std::string>& parameters, User
else
ih = ServerInstance->XLines->IdentSplit(target);
- if (ih.first.empty())
- {
- user->WriteNotice("*** Target not found");
- return CMD_FAILURE;
- }
+ if (ih.first.empty())
+ {
+ user->WriteNotice("*** Target not found");
+ return CMD_FAILURE;
+ }
InsaneBan::IPHostMatcher matcher;
if (InsaneBan::MatchesEveryone(ih.first+"@"+ih.second, matcher, user, "K", "hostmasks"))
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 1076b0a9a..3a4bf5348 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -62,7 +62,7 @@ class ModuleAlias : public Module
/* We cant use a map, there may be multiple aliases with the same name.
* We can, however, use a fancy invention: the multimap. Maps a key to one or more values.
* -- w00t
- */
+ */
typedef insp::flat_multimap<std::string, Alias, irc::insensitive_swo> AliasMap;
AliasMap Aliases;
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index f74f27f16..09d5e604d 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -194,7 +194,7 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener
cap->set(user, false);
}
- ServerInstance->Modules.DelReferent(cap);
+ ServerInstance->Modules.DelReferent(cap);
cap->Unregister();
caps.erase(cap->GetName());
}
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp
index 45b06865c..21bca0f3f 100644
--- a/src/modules/m_repeat.cpp
+++ b/src/modules/m_repeat.cpp
@@ -110,7 +110,7 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> >
{
mx[1][0] = i + 1;
for (unsigned int j = 0; j < l2; j++)
- mx[1][j + 1] = std::min(std::min(mx[1][j] + 1, mx[0][j + 1] + 1), mx[0][j] + ((s1[i] == s2[j]) ? 0 : 1));
+ mx[1][j + 1] = std::min(std::min(mx[1][j] + 1, mx[0][j + 1] + 1), mx[0][j] + ((s1[i] == s2[j]) ? 0 : 1));
mx[0].swap(mx[1]);
}