summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobby <robby@chatbelgie.be>2017-01-17 05:03:25 +0100
committerRobby <robby@chatbelgie.be>2017-01-17 05:03:25 +0100
commit76ce8ece1a4803c98bfe9460f40bf8e0fbc409e6 (patch)
tree26e6da47f20de64ef76fe4afc459bbb7889bd417 /src
parent464093d36e87f3df999145e42ed30fc0dfc55c52 (diff)
Cleanup some excess whitespaces and tabs, and fix a few typos along the way.
Diffstat (limited to 'src')
-rw-r--r--src/access.cpp11
-rw-r--r--src/base.cpp1
-rw-r--r--src/base64.cpp1
-rw-r--r--src/bots.cpp5
-rw-r--r--src/channels.cpp23
-rw-r--r--src/command.cpp3
-rw-r--r--src/config.cpp15
-rw-r--r--src/extensible.cpp3
-rw-r--r--src/hashcomp.cpp3
-rw-r--r--src/init.cpp3
-rw-r--r--src/language.cpp1
-rw-r--r--src/logger.cpp7
-rw-r--r--src/mail.cpp2
-rw-r--r--src/memos.cpp3
-rw-r--r--src/messages.cpp11
-rw-r--r--src/misc.cpp3
-rw-r--r--src/modes.cpp31
-rw-r--r--src/module.cpp3
-rw-r--r--src/modulemanager.cpp25
-rw-r--r--src/nickalias.cpp1
-rw-r--r--src/nickcore.cpp3
-rw-r--r--src/opertype.cpp1
-rw-r--r--src/pipeengine.cpp1
-rw-r--r--src/process.cpp5
-rw-r--r--src/protocol.cpp7
-rw-r--r--src/regchannel.cpp8
-rw-r--r--src/serialize.cpp1
-rw-r--r--src/servers.cpp11
-rw-r--r--src/socket_clients.cpp1
-rw-r--r--src/socket_transport.cpp5
-rw-r--r--src/socketengines/socketengine_epoll.cpp7
-rw-r--r--src/socketengines/socketengine_kqueue.cpp5
-rw-r--r--src/socketengines/socketengine_poll.cpp3
-rw-r--r--src/socketengines/socketengine_select.cpp3
-rw-r--r--src/sockets.cpp3
-rw-r--r--src/timers.cpp1
-rw-r--r--src/tools/anopesmtp.cpp16
-rw-r--r--src/users.cpp9
-rw-r--r--src/version.sh1
-rw-r--r--src/win32/dir/dir.cpp2
-rw-r--r--src/win32/dir/dir.h2
-rw-r--r--src/win32/pipe/pipe.cpp2
-rw-r--r--src/win32/resource.h18
-rw-r--r--src/win32/socket.cpp2
-rw-r--r--src/win32/windows.cpp10
-rw-r--r--src/xline.cpp1
46 files changed, 123 insertions, 160 deletions
diff --git a/src/access.cpp b/src/access.cpp
index 1c1a6f8e4..5b994e916 100644
--- a/src/access.cpp
+++ b/src/access.cpp
@@ -84,7 +84,7 @@ void PrivilegeManager::AddPrivilege(Privilege p)
if (priv.rank > p.rank)
break;
}
-
+
Privileges.insert(Privileges.begin() + i, p);
}
@@ -265,7 +265,7 @@ bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next)
else if (Anope::Match(u->GetDisplayedMask(), this->mask))
return true;
}
-
+
if (acc)
{
for (unsigned i = 0; i < acc->aliases->size(); ++i)
@@ -275,12 +275,12 @@ bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next)
return true;
}
}
-
+
if (IRCD->IsChannelValid(this->mask))
{
next = ChannelInfo::Find(this->mask);
}
-
+
return false;
}
@@ -313,7 +313,7 @@ bool ChanAccess::operator<(const ChanAccess &other) const
continue;
return !this_p && other_p;
- }
+ }
return false;
}
@@ -473,4 +473,3 @@ bool AccessGroup::operator<=(const AccessGroup &other) const
{
return !(*this > other);
}
-
diff --git a/src/base.cpp b/src/base.cpp
index 27fecf69c..6dfd7ff22 100644
--- a/src/base.cpp
+++ b/src/base.cpp
@@ -46,4 +46,3 @@ void Base::DelReference(ReferenceBase *r)
}
}
}
-
diff --git a/src/base64.cpp b/src/base64.cpp
index 0f17fdada..2ca476494 100644
--- a/src/base64.cpp
+++ b/src/base64.cpp
@@ -161,4 +161,3 @@ void Anope::B64Decode(const Anope::string &src, Anope::string &target)
if (!target.empty() && !target[target.length() - 1])
target.erase(target.length() - 1);
}
-
diff --git a/src/bots.cpp b/src/bots.cpp
index a9933e336..512de4c46 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -29,7 +29,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
(*BotListByNick)[this->nick] = this;
if (!this->uid.empty())
(*BotListByUID)[this->uid] = this;
-
+
FOREACH_MOD(OnCreateBot, (this));
// If we're synchronised with the uplink already, send the bot.
@@ -160,7 +160,7 @@ void BotInfo::Assign(User *u, ChannelInfo *ci)
if (ci->bi)
ci->bi->UnAssign(u, ci);
-
+
ci->bi = this;
this->channels->insert(ci);
@@ -275,4 +275,3 @@ BotInfo* BotInfo::Find(const Anope::string &nick, bool nick_only)
return NULL;
}
-
diff --git a/src/channels.cpp b/src/channels.cpp
index 1cf2e528c..3ea8da375 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -90,7 +90,7 @@ void Channel::Reset()
for (ChanUserList::const_iterator it = this->users.begin(), it_end = this->users.end(); it != it_end; ++it)
this->SetCorrectModes(it->second->user, true);
-
+
// If the channel is syncing now, do not force a sync due to Reset(), as we are probably iterating over users in Message::SJoin
// A sync will come soon
if (!syncing)
@@ -128,7 +128,7 @@ bool Channel::CheckDelete()
*/
if (this->syncing)
return false;
-
+
/* Permanent channels never get deleted */
if (this->HasMode("PERM"))
return false;
@@ -162,10 +162,10 @@ void Channel::DeleteUser(User *user)
ChanUserContainer *cu = user->FindChannel(this);
if (!this->users.erase(user))
- Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete non-existent user " << user->nick << " from channel " << this->name;
+ Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete nonexistent user " << user->nick << " from channel " << this->name;
if (!user->chans.erase(this))
- Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete non-existent channel " << this->name << " from " << user->nick << "'s channel list";
+ Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete nonexistent channel " << this->name << " from " << user->nick << "'s channel list";
delete cu;
QueueForDeletion();
@@ -280,7 +280,7 @@ void Channel::SetModeInternal(MessageSource &setter, ChannelMode *ocm, const Ano
if (!u)
{
- Log(LOG_DEBUG) << "MODE " << this->name << " +" << cm->mchar << " for non-existent user " << param;
+ Log(LOG_DEBUG) << "MODE " << this->name << " +" << cm->mchar << " for nonexistent user " << param;
return;
}
@@ -351,7 +351,7 @@ void Channel::RemoveModeInternal(MessageSource &setter, ChannelMode *ocm, const
if (!u)
{
- Log(LOG_DEBUG) << "Channel::RemoveModeInternal() MODE " << this->name << "-" << cm->mchar << " for non-existent user " << param;
+ Log(LOG_DEBUG) << "Channel::RemoveModeInternal() MODE " << this->name << "-" << cm->mchar << " for nonexistent user " << param;
return;
}
@@ -381,7 +381,7 @@ void Channel::RemoveModeInternal(MessageSource &setter, ChannelMode *ocm, const
}
else
this->modes.erase(cm->name);
-
+
if (cm->type == MODE_LIST)
{
ChannelModeList *cml = anope_dynamic_static_cast<ChannelModeList *>(cm);
@@ -713,7 +713,7 @@ void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode,
Log(setter, this, "mode") << modestring << paramstring;
else
Log(LOG_DEBUG) << source.GetName() << " is setting " << this->name << " to " << modestring << paramstring;
-
+
if (enforce_mlock)
this->CheckModes();
}
@@ -776,7 +776,7 @@ bool Channel::Kick(BotInfo *bi, User *u, const char *reason, ...)
/* Do not kick protected clients or Ulines */
if (u->IsProtected())
return false;
-
+
if (bi == NULL)
bi = this->ci->WhoSends();
@@ -819,7 +819,7 @@ void Channel::SetCorrectModes(User *user, bool give_modes)
{
if (user == NULL)
return;
-
+
if (!this->ci)
return;
@@ -905,7 +905,7 @@ bool Channel::CheckKick(User *user)
FOREACH_RESULT(OnCheckKick, MOD_RESULT, (user, this, mask, reason));
if (MOD_RESULT != EVENT_STOP)
return false;
-
+
if (mask.empty())
mask = this->ci->GetIdealBan(user);
if (reason.empty())
@@ -954,4 +954,3 @@ void Channel::DeleteChannels()
}
deleting.clear();
}
-
diff --git a/src/command.cpp b/src/command.cpp
index f314eaf93..5cfdf2833 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -309,7 +309,6 @@ bool Command::FindCommandFromService(const Anope::string &command_service, BotIn
return true;
}
}
-
+
return false;
}
-
diff --git a/src/config.cpp b/src/config.cpp
index bf9938507..5d20caf82 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -35,7 +35,7 @@ int Block::CountBlock(const Anope::string &bname)
{
if (!this)
return 0;
-
+
return blocks.count(bname);
}
@@ -43,7 +43,7 @@ Block* Block::GetBlock(const Anope::string &bname, int num)
{
if (!this)
return NULL;
-
+
std::pair<block_map::iterator, block_map::iterator> it = blocks.equal_range(bname);
for (int i = 0; it.first != it.second; ++it.first, ++i)
@@ -278,7 +278,7 @@ Conf::Conf() : Block("")
ValidateNotEmpty("oper", "name", nname);
ValidateNotEmpty("oper", "type", type);
-
+
OperType *ot = NULL;
for (unsigned j = 0; j < this->MyOperTypes.size(); ++j)
if (this->MyOperTypes[j]->GetName() == type)
@@ -588,7 +588,7 @@ Block *Conf::GetModule(Module *m)
{
if (!m)
return NULL;
-
+
return GetModule(m->name);
}
@@ -599,7 +599,7 @@ Block *Conf::GetModule(const Anope::string &mname)
return it->second;
Block* &block = modules[mname];
-
+
/* Search for the block */
for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range("module"); iters.first != iters.second; ++iters.first)
{
@@ -723,10 +723,10 @@ void Conf::LoadConf(File &file)
Log(LOG_DEBUG) << "Start to read conf " << file.GetName();
// Start reading characters...
while (!file.End())
- {
+ {
Anope::string line = file.Read();
++linenumber;
-
+
/* If this line is completely empty and we are in a quote, just append a newline */
if (line.empty() && in_quote)
wordbuffer += "\n";
@@ -925,4 +925,3 @@ void Conf::LoadConf(File &file)
if (!block_stack.empty())
throw ConfigException("Unterminated block at end of file: " + file.GetName() + ". Block was opened on line " + stringify(block_stack.top()->linenum));
}
-
diff --git a/src/extensible.cpp b/src/extensible.cpp
index 485ac7fb7..332df6673 100644
--- a/src/extensible.cpp
+++ b/src/extensible.cpp
@@ -66,7 +66,6 @@ bool* Extensible::Extend(const Anope::string &name, const bool &what)
if (ref)
return ref->Set(this);
- Log(LOG_DEBUG) << "Extend for non-existent type " << name << " on " << static_cast<void *>(this);
+ Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
return NULL;
}
-
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 507bb2929..4fb1cfa98 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -43,7 +43,7 @@ unsigned char Anope::toupper(unsigned char c)
* which is a case-insensitive equivalent to std::string.
*
*/
-
+
bool ci::ci_char_traits::eq(char c1st, char c2nd)
{
return case_map_upper[static_cast<unsigned char>(c1st)] == case_map_upper[static_cast<unsigned char>(c2nd)];
@@ -161,4 +161,3 @@ bool sepstream::StreamEnd()
{
return this->pos > this->tokens.length();
}
-
diff --git a/src/init.cpp b/src/init.cpp
index 18c54d050..515f610f2 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -105,7 +105,7 @@ void Anope::Fork()
{
#ifndef _WIN32
kill(getppid(), SIGUSR2);
-
+
freopen("/dev/null", "r", stdin);
freopen("/dev/null", "w", stdout);
freopen("/dev/null", "w", stderr);
@@ -558,4 +558,3 @@ void Anope::Init(int ac, char **av)
Serialize::CheckTypes();
}
-
diff --git a/src/language.cpp b/src/language.cpp
index 7fd63c756..8b7b0ee37 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -125,4 +125,3 @@ const char *Language::Translate(const char *lang, const char *string)
return string != NULL ? string : "";
}
#endif
-
diff --git a/src/logger.cpp b/src/logger.cpp
index b296d1081..935b0cfae 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -82,7 +82,7 @@ Log::Log(LogType t, CommandSource &src, Command *_c, ChannelInfo *_ci) : u(src.G
{
if (!c)
throw CoreException("Invalid pointers passed to Log::Log");
-
+
if (type != LOG_COMMAND && type != LOG_OVERRIDE && type != LOG_ADMIN)
throw CoreException("This constructor does not support this log type");
@@ -129,7 +129,7 @@ Log::~Log()
std::cout << this->BuildPrefix() << this->buf.str() << std::endl;
FOREACH_MOD(OnLog, (this));
-
+
if (Config)
for (unsigned i = 0; i < Config->LogInfos.size(); ++i)
if (Config->LogInfos[i].HasType(this->type, this->category))
@@ -377,7 +377,7 @@ void LogInfo::ProcessMessage(const Log *l)
}
}
}
-
+
tm *tm = localtime(&Anope::CurTime);
if (tm->tm_mday != this->last_day)
{
@@ -407,4 +407,3 @@ void LogInfo::ProcessMessage(const Log *l)
lf->stream << GetTimeStamp() << " " << buffer << std::endl;
}
}
-
diff --git a/src/mail.cpp b/src/mail.cpp
index 0094f9b30..80a80d6d7 100644
--- a/src/mail.cpp
+++ b/src/mail.cpp
@@ -56,7 +56,7 @@ bool Mail::Send(User *u, NickCore *nc, BotInfo *service, const Anope::string &su
return false;
Configuration::Block *b = Config->GetBlock("mail");
-
+
if (!u)
{
if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty())
diff --git a/src/memos.cpp b/src/memos.cpp
index 4c4dfc63d..b04a385ca 100644
--- a/src/memos.cpp
+++ b/src/memos.cpp
@@ -49,7 +49,7 @@ Serializable* Memo::Unserialize(Serializable *obj, Serialize::Data &data)
Anope::string owner;
data["owner"] >> owner;
-
+
bool ischan;
MemoInfo *mi = MemoInfo::GetMemoInfo(owner, ischan);
if (!mi)
@@ -138,4 +138,3 @@ MemoInfo *MemoInfo::GetMemoInfo(const Anope::string &target, bool &ischan)
return NULL;
}
-
diff --git a/src/messages.cpp b/src/messages.cpp
index 056d5853b..93c45ea87 100644
--- a/src/messages.cpp
+++ b/src/messages.cpp
@@ -61,7 +61,7 @@ void Invite::Run(MessageSource &source, const std::vector<Anope::string> &params
if (!targ || targ->server != Me || !c || c->FindUser(targ))
return;
-
+
FOREACH_MOD(OnInvite, (source.GetUser(), c, targ));
}
@@ -119,14 +119,14 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
/* Their TS is newer, don't accept any modes from them */
else if (ts > c->creation_time)
keep_their_modes = false;
-
+
/* Update the modes for the channel */
if (keep_their_modes && !modes.empty())
/* If we are syncing, mlock is checked later in Channel::Sync. It is important to not check it here
* so that Channel::SetCorrectModes can correctly detect the presence of channel mode +r.
*/
c->SetModesInternal(source, modes, ts, !c->syncing);
-
+
for (std::list<SJoinUser>::const_iterator it = users.begin(), it_end = users.end(); it != it_end; ++it)
{
const ChannelStatus &status = it->first;
@@ -147,7 +147,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co
* they aren't allowed to have (secureops etc).
*/
c->SetCorrectModes(u, true);
-
+
FOREACH_MOD(OnJoinChannel, (u, c));
}
@@ -365,7 +365,7 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> &param
FOREACH_RESULT(OnBotPrivmsg, MOD_RESULT, (u, bi, message));
if (MOD_RESULT == EVENT_STOP)
return;
-
+
bi->OnMessage(u, message);
}
}
@@ -499,4 +499,3 @@ void Whois::Run(MessageSource &source, const std::vector<Anope::string> &params)
else
IRCD->SendNumeric(401, source.GetSource(), "%s :No such user.", params[0].c_str());
}
-
diff --git a/src/misc.cpp b/src/misc.cpp
index 956514ceb..2c879365d 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -651,7 +651,7 @@ Anope::string Anope::VersionBuildString()
if (!flags.empty())
s += ", flags " + flags;
-
+
return s;
}
@@ -763,4 +763,3 @@ Anope::string Anope::Random(size_t len)
buf.append(chars[rand() % sizeof(chars)]);
return buf;
}
-
diff --git a/src/modes.cpp b/src/modes.cpp
index b559e7026..18d892e2f 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -397,7 +397,7 @@ bool ModeManager::AddUserMode(UserMode *um)
return false;
if (ModeManager::FindUserModeByName(um->name) != NULL)
return false;
-
+
if (um->name.empty())
{
um->name = stringify(++GenericUserModes);
@@ -470,10 +470,10 @@ void ModeManager::RemoveUserMode(UserMode *um)
unsigned want = um->mchar;
if (want >= UserModesIdx.size())
return;
-
+
if (UserModesIdx[want] != um)
return;
-
+
UserModesIdx[want] = NULL;
UserModesByName.erase(um->name);
@@ -495,10 +495,10 @@ void ModeManager::RemoveChannelMode(ChannelMode *cm)
unsigned want = cm->mchar;
if (want >= ChannelModesIdx.size())
return;
-
+
if (ChannelModesIdx[want] != cm)
return;
-
+
ChannelModesIdx[want] = NULL;
}
@@ -532,7 +532,7 @@ ChannelMode *ModeManager::FindChannelModeByChar(char mode)
unsigned want = mode;
if (want >= ChannelModesIdx.size())
return NULL;
-
+
return ChannelModesIdx[want];
}
@@ -541,7 +541,7 @@ UserMode *ModeManager::FindUserModeByChar(char mode)
unsigned want = mode;
if (want >= UserModesIdx.size())
return NULL;
-
+
return UserModesIdx[want];
}
@@ -566,11 +566,11 @@ char ModeManager::GetStatusChar(char value)
unsigned want = value;
if (want >= ChannelModesIdx.size())
return 0;
-
+
ChannelMode *cm = ChannelModesIdx[want];
if (cm == NULL || cm->type != MODE_STATUS || cm->mchar == value)
return 0;
-
+
return cm->mchar;
}
@@ -769,21 +769,21 @@ Entry::Entry(const Anope::string &m, const Anope::string &fh) : name(m), mask(fh
else
this->nick = fh;
}
-
+
at = this->host.find('#');
if (at != Anope::string::npos)
{
this->real = this->host.substr(at + 1);
this->host = this->host.substr(0, at);
}
-
+
/* If the mask is all *'s it will match anything, so just clear it */
if (this->nick.find_first_not_of("*") == Anope::string::npos)
this->nick.clear();
-
+
if (this->user.find_first_not_of("*") == Anope::string::npos)
this->user.clear();
-
+
if (this->host.find_first_not_of("*") == Anope::string::npos)
this->host.clear();
else
@@ -888,10 +888,9 @@ bool Entry::Matches(User *u, bool full) const
else if (!this->host.empty() && !Anope::Match(u->GetDisplayedHost(), this->host) && !Anope::Match(u->GetCloakedHost(), this->host) &&
(!full || (!Anope::Match(u->host, this->host) && !Anope::Match(u->ip.addr(), this->host))))
ret = false;
-
+
if (!this->real.empty() && !Anope::Match(u->realname, this->real))
ret = false;
-
+
return ret;
}
-
diff --git a/src/module.cpp b/src/module.cpp
index 460f809a0..0fcf8687f 100644
--- a/src/module.cpp
+++ b/src/module.cpp
@@ -33,7 +33,7 @@ Module::Module(const Anope::string &modname, const Anope::string &, ModType modt
if (ModuleManager::FindModule(this->name))
throw CoreException("Module already exists!");
-
+
if (Anope::NoThird && type & THIRD)
throw ModuleException("Third party modules may not be loaded");
@@ -127,4 +127,3 @@ int ModuleVersion::GetPatch() const
{
return this->version_patch;
}
-
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index 432d57bf5..ce17e61ae 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -28,7 +28,7 @@ void ModuleManager::CleanupRuntimeDirectory()
{
Anope::string dirbuf = Anope::DataDir + "/runtime";
- Log(LOG_DEBUG) << "Cleaning out Module run time directory (" << dirbuf << ") - this may take a moment please wait";
+ Log(LOG_DEBUG) << "Cleaning out Module run time directory (" << dirbuf << ") - this may take a moment, please wait";
DIR *dirp = opendir(dirbuf.c_str());
if (!dirp)
@@ -36,7 +36,7 @@ void ModuleManager::CleanupRuntimeDirectory()
Log(LOG_DEBUG) << "Cannot open directory (" << dirbuf << ")";
return;
}
-
+
for (dirent *dp; (dp = readdir(dirp));)
{
if (!dp->d_ino)
@@ -62,17 +62,17 @@ void ModuleManager::CleanupRuntimeDirectory()
static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &output)
{
Anope::string input = Anope::ModuleDir + "/modules/" + name + ".so";
-
+
struct stat s;
if (stat(input.c_str(), &s) == -1)
return MOD_ERR_NOEXIST;
else if (!S_ISREG(s.st_mode))
return MOD_ERR_NOEXIST;
-
+
std::ifstream source(input.c_str(), std::ios_base::in | std::ios_base::binary);
if (!source.is_open())
return MOD_ERR_NOEXIST;
-
+
char *tmp_output = strdup(output.c_str());
int target_fd = mkstemp(tmp_output);
if (target_fd == -1 || close(target_fd) == -1)
@@ -85,7 +85,7 @@ static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &out
free(tmp_output);
Log(LOG_DEBUG_2) << "Runtime module location: " << output;
-
+
std::ofstream target(output.c_str(), std::ios_base::in | std::ios_base::binary);
if (!target.is_open())
{
@@ -103,7 +103,7 @@ static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &out
target.write(buffer, read_len);
want -= read_len;
}
-
+
source.close();
target.close();
@@ -216,7 +216,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
dlclose(handle);
return MOD_ERR_NOLOAD;
}
-
+
/* Create module. */
Anope::string nick;
if (u)
@@ -234,7 +234,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
Log() << "Error while loading " << modname << ": " << ex.GetReason();
moderr = MOD_ERR_EXCEPTION;
}
-
+
if (moderr != MOD_ERR_OK)
{
if (dlclose(handle))
@@ -263,7 +263,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u)
catch (const NotImplementedException &ex)
{
}
-
+
if (moderr != MOD_ERR_OK)
{
DeleteModule(m);
@@ -389,7 +389,7 @@ ModuleReturn ModuleManager::DeleteModule(Module *m)
if (!filename.empty())
unlink(filename.c_str());
#endif
-
+
return MOD_ERR_OK;
}
@@ -516,7 +516,7 @@ void ModuleManager::UnloadAll()
if ((m->type & j) == m->type)
modules.push_back(m->name);
}
-
+
for (unsigned i = 0; i < modules.size(); ++i)
{
Module *m = FindModule(modules[i]);
@@ -524,4 +524,3 @@ void ModuleManager::UnloadAll()
UnloadModule(m, NULL);
}
}
-
diff --git a/src/nickalias.cpp b/src/nickalias.cpp
index fe32a2b69..653e9461b 100644
--- a/src/nickalias.cpp
+++ b/src/nickalias.cpp
@@ -214,4 +214,3 @@ Serializable* NickAlias::Unserialize(Serializable *obj, Serialize::Data &data)
return na;
}
-
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index 59296ce94..cede8b6e4 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -31,7 +31,7 @@ NickCore::NickCore(const Anope::string &coredisplay) : Serializable("NickCore"),
(*NickCoreList)[this->display] = this;
if (old == NickCoreList->size())
Log(LOG_DEBUG) << "Duplicate account " << coredisplay << " in nickcore table?";
-
+
FOREACH_MOD(OnNickCoreCreate, (this));
}
@@ -267,4 +267,3 @@ NickCore* NickCore::Find(const Anope::string &nick)
return NULL;
}
-
diff --git a/src/opertype.cpp b/src/opertype.cpp
index 702ab758a..d7bce5df1 100644
--- a/src/opertype.cpp
+++ b/src/opertype.cpp
@@ -145,4 +145,3 @@ const std::list<Anope::string> OperType::GetPrivs() const
}
return priv_list;
}
-
diff --git a/src/pipeengine.cpp b/src/pipeengine.cpp
index 2ff429d75..51dfa2955 100644
--- a/src/pipeengine.cpp
+++ b/src/pipeengine.cpp
@@ -78,4 +78,3 @@ void Pipe::Notify()
{
this->Write("\0", 1);
}
-
diff --git a/src/process.cpp b/src/process.cpp
index b9798cded..6430fac46 100644
--- a/src/process.cpp
+++ b/src/process.cpp
@@ -50,7 +50,7 @@ void Anope::Process(const Anope::string &buffer)
static const Anope::string proto_name = ModuleManager::FindFirstOf(PROTOCOL) ? ModuleManager::FindFirstOf(PROTOCOL)->name : "";
MessageSource src(source);
-
+
EventReturn MOD_RESULT;
FOREACH_RESULT(OnMessage, MOD_RESULT, (src, command, params));
if (MOD_RESULT == EVENT_STOP)
@@ -84,7 +84,7 @@ void IRCDProto::Parse(const Anope::string &buffer, Anope::string &source, Anope:
}
sep.GetToken(command);
-
+
for (Anope::string token; sep.GetToken(token);)
{
if (token[0] == ':')
@@ -107,4 +107,3 @@ Anope::string IRCDProto::Format(const Anope::string &source, const Anope::string
else
return message;
}
-
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 1195673e4..47a6dceee 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -360,16 +360,16 @@ bool IRCDProto::IsNickValid(const Anope::string &nick)
if (nick.empty())
return false;
-
+
Anope::string special = "[]\\`_^{|}";
-
+
for (unsigned i = 0; i < nick.length(); ++i)
if (!(nick[i] >= 'A' && nick[i] <= 'Z') && !(nick[i] >= 'a' && nick[i] <= 'z')
&& special.find(nick[i]) == Anope::string::npos
&& (Config && Config->NickChars.find(nick[i]) == Anope::string::npos)
&& (!i || (!(nick[i] >= '0' && nick[i] <= '9') && nick[i] != '-')))
return false;
-
+
return true;
}
@@ -502,4 +502,3 @@ unsigned IRCDMessage::GetParamCount() const
{
return this->param_count;
}
-
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 75edad507..8bbd5d1a6 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -62,7 +62,7 @@ Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data)
ChannelInfo *ci = ChannelInfo::Find(sci);
if (!ci)
return NULL;
-
+
AutoKick *ak;
NickCore *nc = NickCore::Find(snc);
if (obj)
@@ -87,7 +87,7 @@ Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data)
data["reason"] >> sreason;
data["mask"] >> smask;
- if (nc)
+ if (nc)
ak = ci->AddAkick(screator, nc, sreason, addtime, lastused);
else
ak = ci->AddAkick(screator, smask, sreason, addtime, lastused);
@@ -358,7 +358,7 @@ BotInfo *ChannelInfo::WhoSends() const
{
if (this && this->bi)
return this->bi;
-
+
BotInfo *ChanServ = Config->GetClient("ChanServ");
if (ChanServ)
return ChanServ;
@@ -578,7 +578,7 @@ void ChannelInfo::EraseAkick(unsigned index)
{
if (this->akick->empty() || index >= this->akick->size())
return;
-
+
delete this->GetAkick(index);
}
diff --git a/src/serialize.cpp b/src/serialize.cpp
index 765fab0a9..6a315641d 100644
--- a/src/serialize.cpp
+++ b/src/serialize.cpp
@@ -175,4 +175,3 @@ const std::map<Anope::string, Serialize::Type *>& Type::GetTypes()
{
return Types;
}
-
diff --git a/src/servers.cpp b/src/servers.cpp
index 59be5c1af..ffba8ecb1 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -80,7 +80,7 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano
}
IRCD->SendBOB();
-
+
for (unsigned i = 0; i < Me->GetLinks().size(); ++i)
{
Server *s = Me->GetLinks()[i];
@@ -157,7 +157,7 @@ Server::~Server()
for (unsigned i = this->links.size(); i > 0; --i)
this->links[i - 1]->Delete(this->quit_reason);
-
+
Servers::ByName.erase(this->name);
if (!this->sid.empty())
Servers::ByID.erase(this->sid);
@@ -336,18 +336,18 @@ void Server::Notice(BotInfo *source, const Anope::string &message)
Server *Server::Find(const Anope::string &name, bool name_only)
{
Anope::map<Server *>::iterator it;
-
+
if (!name_only)
{
it = Servers::ByID.find(name);
if (it != Servers::ByID.end())
return it->second;
}
-
+
it = Servers::ByName.find(name);
if (it != Servers::ByName.end())
return it->second;
-
+
return NULL;
}
@@ -358,4 +358,3 @@ Server* Servers::GetUplink()
return Me->GetLinks()[i];
return NULL;
}
-
diff --git a/src/socket_clients.cpp b/src/socket_clients.cpp
index 68fdaa4cf..e9c756d76 100644
--- a/src/socket_clients.cpp
+++ b/src/socket_clients.cpp
@@ -96,4 +96,3 @@ void ClientSocket::OnError(const Anope::string &error)
{
Log(LOG_DEBUG) << "Socket error: " << error;
}
-
diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp
index c941d3112..60f7acbdb 100644
--- a/src/socket_transport.cpp
+++ b/src/socket_transport.cpp
@@ -32,7 +32,7 @@ bool BufferedSocket::ProcessRead()
return false;
if (len < 0)
return SocketEngine::IgnoreErrno();
-
+
tbuffer[len] = 0;
this->read_buffer.append(tbuffer);
this->recv_len = len;
@@ -130,7 +130,7 @@ bool BinarySocket::ProcessRead()
int len = this->io->Recv(this, tbuffer, sizeof(tbuffer));
if (len <= 0)
return false;
-
+
return this->Read(tbuffer, len);
}
@@ -196,4 +196,3 @@ bool BinarySocket::Read(const char *buffer, size_t l)
{
return true;
}
-
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 5a2bdafe1..f20459988 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -28,7 +28,7 @@ void SocketEngine::Init()
if (EngineHandle == -1)
throw SocketException("Could not initialize epoll socket engine: " + Anope::LastError());
-
+
events.resize(DefaultSize);
}
@@ -46,7 +46,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag)
bool before_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE];
s->flags[flag] = set;
-
+
bool now_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE];
epoll_event ev;
@@ -65,7 +65,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag)
mod = EPOLL_CTL_MOD;
else
return;
-
+
if (epoll_ctl(EngineHandle, mod, ev.data.fd, &ev) == -1)
throw SocketException("Unable to epoll_ctl() fd " + stringify(ev.data.fd) + " to epoll: " + Anope::LastError());
}
@@ -119,4 +119,3 @@ void SocketEngine::Process()
delete s;
}
}
-
diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp
index f6b9abbfd..a6dd8b571 100644
--- a/src/socketengines/socketengine_kqueue.cpp
+++ b/src/socketengines/socketengine_kqueue.cpp
@@ -39,7 +39,7 @@ void SocketEngine::Init()
if (kq_fd < 0)
throw SocketException("Unable to create kqueue engine: " + Anope::LastError());
-
+
change_events.resize(DefaultSize);
event_events.resize(DefaultSize);
}
@@ -56,7 +56,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag)
return;
s->flags[flag] = set;
-
+
int mod;
if (flag == SF_READABLE)
mod = EVFILT_READ;
@@ -121,4 +121,3 @@ void SocketEngine::Process()
delete s;
}
}
-
diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp
index df65f12f9..1df4285e6 100644
--- a/src/socketengines/socketengine_poll.cpp
+++ b/src/socketengines/socketengine_poll.cpp
@@ -113,7 +113,7 @@ void SocketEngine::Process()
for (unsigned i = 0, processed = 0; i < events.size() && processed != static_cast<unsigned>(total); ++i)
{
pollfd *ev = &events[i];
-
+
if (ev->revents != 0)
++processed;
@@ -146,4 +146,3 @@ void SocketEngine::Process()
delete s;
}
}
-
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index b23f136a4..8853b546a 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -46,7 +46,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag)
bool before_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE];
s->flags[flag] = set;
-
+
bool now_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE];
if (!before_registered && now_registered)
@@ -146,4 +146,3 @@ void SocketEngine::Process()
}
}
}
-
diff --git a/src/sockets.cpp b/src/sockets.cpp
index 768104bca..7dffd743b 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -282,7 +282,7 @@ bool cidr::operator<(const cidr &other) const
{
if (this->addr.sa.sa_family != other.addr.sa.sa_family)
return this->addr.sa.sa_family < other.addr.sa.sa_family;
-
+
switch (this->addr.sa.sa_family)
{
case AF_INET:
@@ -574,4 +574,3 @@ bool SocketEngine::IgnoreErrno()
|| GetLastError() == EINTR
|| GetLastError() == EINPROGRESS;
}
-
diff --git a/src/timers.cpp b/src/timers.cpp
index 576dcae6e..791666a6b 100644
--- a/src/timers.cpp
+++ b/src/timers.cpp
@@ -124,4 +124,3 @@ void TimerManager::DeleteTimersFor(Module *m)
delete it->second;
}
}
-
diff --git a/src/tools/anopesmtp.cpp b/src/tools/anopesmtp.cpp
index 7b974a398..dd7d1eef1 100644
--- a/src/tools/anopesmtp.cpp
+++ b/src/tools/anopesmtp.cpp
@@ -300,7 +300,7 @@ int smtp_send_email()
if (!smtp_send("HELO anope\r\n"))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
@@ -323,7 +323,7 @@ int smtp_send_email()
if (!smtp_send(buf))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
@@ -343,7 +343,7 @@ int smtp_send_email()
if (!smtp_send(buf))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
@@ -362,7 +362,7 @@ int smtp_send_email()
if (!smtp_send("DATA\r\n"))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
@@ -382,13 +382,13 @@ int smtp_send_email()
for (std::vector<std::string>::const_iterator it = smail.smtp_headers.begin(), it_end = smail.smtp_headers.end(); it != it_end; ++it)
if (!smtp_send(it->c_str()))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
if (!smtp_send("\r\n"))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
@@ -398,7 +398,7 @@ int smtp_send_email()
{
if (!smtp_send(it->c_str()))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
}
@@ -407,7 +407,7 @@ int smtp_send_email()
if (!smtp_send("\r\n.\r\n"))
{
- alog("SMTP: error writting to socket");
+ alog("SMTP: error writing to socket");
return 0;
}
diff --git a/src/users.cpp b/src/users.cpp
index 47d241b1f..9ccfb1743 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -141,7 +141,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts)
/* Sanity check to make sure we don't segfault */
if (newnick.empty())
throw CoreException("User::ChangeNick() got a bad argument");
-
+
this->super_admin = false;
Log(this, "nick") << "(" << this->realname << ") changed nick to " << newnick;
@@ -155,7 +155,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts)
NickAlias *old_na = NickAlias::Find(this->nick);
if (old_na && (this->IsIdentified(true) || this->IsRecognized()))
old_na->last_seen = Anope::CurTime;
-
+
UserListByNick.erase(this->nick);
this->nick = newnick;
@@ -401,7 +401,7 @@ void User::Login(NickCore *core)
if (this->server->IsSynced())
Log(this, "account") << "is now identified as " << this->nc->display;
-
+
FOREACH_MOD(OnUserLogin, (this));
}
@@ -409,7 +409,7 @@ void User::Logout()
{
if (!this->nc)
return;
-
+
Log(this, "account") << "is no longer identified as " << this->nc->display;
std::list<User *>::iterator it = std::find(this->nc->users.begin(), this->nc->users.end(), this);
@@ -839,4 +839,3 @@ void User::QuitUsers()
delete *it;
quitting_users.clear();
}
-
diff --git a/src/version.sh b/src/version.sh
index cc83d73e7..128bbab8a 100644
--- a/src/version.sh
+++ b/src/version.sh
@@ -4,4 +4,3 @@ VERSION_MAJOR=2
VERSION_MINOR=0
VERSION_PATCH=5
VERSION_EXTRA="-git"
-
diff --git a/src/win32/dir/dir.cpp b/src/win32/dir/dir.cpp
index eb162eeae..ff1a13934 100644
--- a/src/win32/dir/dir.cpp
+++ b/src/win32/dir/dir.cpp
@@ -8,7 +8,7 @@
#include "dir.h"
#include <stdio.h>
-
+
DIR *opendir(const char *path)
{
char real_path[MAX_PATH];
diff --git a/src/win32/dir/dir.h b/src/win32/dir/dir.h
index 52956876c..9aa5e1b52 100644
--- a/src/win32/dir/dir.h
+++ b/src/win32/dir/dir.h
@@ -21,7 +21,7 @@ struct DIR
WIN32_FIND_DATA data;
bool read_first;
};
-
+
DIR *opendir(const char *);
dirent *readdir(DIR *);
int closedir(DIR *);
diff --git a/src/win32/pipe/pipe.cpp b/src/win32/pipe/pipe.cpp
index 69a633f3a..8df71e546 100644
--- a/src/win32/pipe/pipe.cpp
+++ b/src/win32/pipe/pipe.cpp
@@ -56,6 +56,6 @@ int pipe(int fds[2])
fds[0] = cfd;
fds[1] = afd;
-
+
return 0;
}
diff --git a/src/win32/resource.h b/src/win32/resource.h
index 9cd2c1e5d..ac74d9d81 100644
--- a/src/win32/resource.h
+++ b/src/win32/resource.h
@@ -10,19 +10,19 @@
// Microsoft Developer Studio generated include file.
// Used by Win32GUI.rc
//
-#define VER_ANOPE 1
-#define MANIFEST_RESOURCE_ID 2
-#define ICON_APP 129
+#define VER_ANOPE 1
+#define MANIFEST_RESOURCE_ID 2
+#define ICON_APP 129
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 152
-#define _APS_NEXT_COMMAND_VALUE 40061
-#define _APS_NEXT_CONTROL_VALUE 1167
-#define _APS_NEXT_SYMED_VALUE 104
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 152
+#define _APS_NEXT_COMMAND_VALUE 40061
+#define _APS_NEXT_CONTROL_VALUE 1167
+#define _APS_NEXT_SYMED_VALUE 104
#endif
#endif
diff --git a/src/win32/socket.cpp b/src/win32/socket.cpp
index 8e7ee6f26..b4e7efe1a 100644
--- a/src/win32/socket.cpp
+++ b/src/win32/socket.cpp
@@ -86,7 +86,7 @@ int windows_inet_pton(int af, const char *src, void *dst)
}
return 1;
}
-
+
return 0;
}
diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp
index 9aaa333ff..a4c6eff49 100644
--- a/src/win32/windows.cpp
+++ b/src/win32/windows.cpp
@@ -56,11 +56,11 @@ USHORT WindowsGetLanguage(const Anope::string &lang)
for (int i = 0; i < sizeof(WindowsLanguages) / sizeof(WindowsLanguage); ++i)
{
WindowsLanguage &l = WindowsLanguages[i];
-
+
if (lang == l.languageName || !lang.find(l.languageName + "."))
return l.windowsLanguageName;
}
-
+
return LANG_NEUTRAL;
}
@@ -73,10 +73,10 @@ int gettimeofday(timeval *tv, void *)
{
SYSTEMTIME st;
GetSystemTime(&st);
-
+
tv->tv_sec = Anope::CurTime;
tv->tv_usec = st.wMilliseconds;
-
+
return 0;
}
@@ -248,7 +248,7 @@ int mkstemp(char *input)
errno = EEXIST;
return -1;
}
-
+
int fd = open(input, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE);
return fd;
}
diff --git a/src/xline.cpp b/src/xline.cpp
index 0b3c650e9..e6c8d3eb4 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -467,4 +467,3 @@ XLine *XLineManager::CheckAllXLines(User *u)
void XLineManager::OnExpire(const XLine *x)
{
}
-