1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 20:36:38 +02:00

The first of a few "CBX OCDing over code style" commits, focusing on include/* and src/* but not src/core/* or src/modules/*.

This commit is contained in:
Naram Qashat
2010-06-20 18:42:58 -04:00
parent 2528dc80bd
commit 381c9c8870
98 changed files with 3799 additions and 4064 deletions
+13 -16
View File
@@ -4,29 +4,26 @@
* Contact us at team@anope.org
*
* Please read COPYING and README for further details.
*
*
*/
#include "modules.h"
#include "language.h"
#include "version.h"
Module::Module(const std::string &mname, const std::string &creator)
{
this->name = mname; /* Our name */
this->name = mname; /* Our name */
this->type = THIRD;
this->handle = NULL;
this->permanent = false;
for (int i = 0; i < NUM_LANGS; i++)
{
for (int i = 0; i < NUM_LANGS; ++i)
this->lang[i].argc = 0;
}
if (FindModule(this->name))
throw CoreException("Module already exists!");
this->created = time(NULL);
Modules.push_back(this);
@@ -36,7 +33,7 @@ Module::~Module()
{
int i = 0;
for (i = 0; i < NUM_LANGS; i++)
for (i = 0; i < NUM_LANGS; ++i)
this->DeleteLanguage(i);
remove(this->filename.c_str());
@@ -49,7 +46,7 @@ Module::~Module()
**/
if (HostServ)
{
for (std::map<ci::string, Command *>::iterator it = HostServ->Commands.begin(); it != HostServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = HostServ->Commands.begin(), it_end = HostServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -61,7 +58,7 @@ Module::~Module()
if (BotServ)
{
for (std::map<ci::string, Command *>::iterator it = BotServ->Commands.begin(); it != BotServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -73,7 +70,7 @@ Module::~Module()
if (MemoServ)
{
for (std::map<ci::string, Command *>::iterator it = MemoServ->Commands.begin(); it != MemoServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -85,7 +82,7 @@ Module::~Module()
if (NickServ)
{
for (std::map<ci::string, Command *>::iterator it = NickServ->Commands.begin(); it != NickServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -94,10 +91,10 @@ Module::~Module()
this->DelCommand(NickServ, c);
}
}
if (ChanServ)
{
for (std::map<ci::string, Command *>::iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = ChanServ->Commands.begin(), it_end = ChanServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -109,7 +106,7 @@ Module::~Module()
if (OperServ)
{
for (std::map<ci::string, Command *>::iterator it = OperServ->Commands.begin(); it != OperServ->Commands.end();)
for (std::map<ci::string, Command *>::iterator it = OperServ->Commands.begin(), it_end = OperServ->Commands.end(); it != it_end; )
{
Command *c = it->second;
++it;
@@ -119,7 +116,7 @@ Module::~Module()
}
}
for (std::deque<Module *>::iterator it = Modules.begin(); it != Modules.end(); ++it)
for (std::deque<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it)
{
if (*it == this)
{