summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-08-01 18:53:24 +0100
committerSadie Powell <sadie@witchery.services>2021-08-01 18:53:24 +0100
commit561b205c4a3a125c12a7926ef18fa1eb822c387c (patch)
treec763ddefe765e23ec0ff189e24d55f634b52b954 /src
parent376053e0acae2a37a8f5c77c8de25ebf8a8395a9 (diff)
parent91321bdf682eb5b512373bb56c722f943cbc8183 (diff)
Merge branch '2.0' into 2.1.
Diffstat (limited to 'src')
-rw-r--r--src/hashcomp.cpp2
-rw-r--r--src/init.cpp2
-rw-r--r--src/misc.cpp14
-rw-r--r--src/modulemanager.cpp12
-rw-r--r--src/protocol.cpp7
-rw-r--r--src/sockets.cpp2
-rwxr-xr-xsrc/tools/geoipupdate.sh2
7 files changed, 23 insertions, 18 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index df62db327..9fcf766f3 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -91,7 +91,7 @@ bool ci::less::operator()(const Anope::string &s1, const Anope::string &s2) cons
return s1.ci_str().compare(s2.ci_str()) < 0;
}
-sepstream::sepstream(const Anope::string &source, char seperator, bool ae) : tokens(source), sep(seperator), pos(0), allow_empty(ae)
+sepstream::sepstream(const Anope::string &source, char separator, bool ae) : tokens(source), sep(separator), pos(0), allow_empty(ae)
{
}
diff --git a/src/init.cpp b/src/init.cpp
index 7186cccfc..42cba3f10 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -313,7 +313,7 @@ void Anope::Init(int ac, char **av)
Log(LOG_TERMINAL) << "Anope IRC Services (https://www.anope.org/)";
Log(LOG_TERMINAL) << "Usage ./" << Anope::ServicesBin << " [options] ...";
Log(LOG_TERMINAL) << "-c, --config=filename.conf";
- Log(LOG_TERMINAL) << " --confdir=conf file direcory";
+ Log(LOG_TERMINAL) << " --confdir=conf file directory";
Log(LOG_TERMINAL) << " --dbdir=database directory";
Log(LOG_TERMINAL) << "-d, --debug[=level]";
Log(LOG_TERMINAL) << "-h, --help";
diff --git a/src/misc.cpp b/src/misc.cpp
index 706c5f968..aa49b10bf 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -143,22 +143,22 @@ bool ListFormatter::IsEmpty() const
void ListFormatter::Process(std::vector<Anope::string> &buffer)
{
std::vector<Anope::string> tcolumns;
- std::map<Anope::string, size_t> lenghts;
+ std::map<Anope::string, size_t> lengths;
std::set<Anope::string> breaks;
for (unsigned i = 0; i < this->columns.size(); ++i)
{
tcolumns.push_back(Language::Translate(this->nc, this->columns[i].c_str()));
- lenghts[this->columns[i]] = tcolumns[i].length();
+ lengths[this->columns[i]] = tcolumns[i].length();
}
for (unsigned i = 0; i < this->entries.size(); ++i)
{
ListEntry &e = this->entries[i];
for (unsigned j = 0; j < this->columns.size(); ++j)
- if (e[this->columns[j]].length() > lenghts[this->columns[j]])
- lenghts[this->columns[j]] = e[this->columns[j]].length();
+ if (e[this->columns[j]].length() > lengths[this->columns[j]])
+ lengths[this->columns[j]] = e[this->columns[j]].length();
}
unsigned length = 0;
- for (std::map<Anope::string, size_t>::iterator it = lenghts.begin(), it_end = lenghts.end(); it != it_end; ++it)
+ for (std::map<Anope::string, size_t>::iterator it = lengths.begin(), it_end = lengths.end(); it != it_end; ++it)
{
/* Break lines at 80 chars */
if (length > 80)
@@ -185,7 +185,7 @@ void ListFormatter::Process(std::vector<Anope::string> &buffer)
s += " ";
s += tcolumns[i];
if (i + 1 != this->columns.size())
- for (unsigned j = tcolumns[i].length(); j < lenghts[this->columns[i]]; ++j)
+ for (unsigned j = tcolumns[i].length(); j < lengths[this->columns[i]]; ++j)
s += " ";
}
buffer.push_back(s);
@@ -207,7 +207,7 @@ void ListFormatter::Process(std::vector<Anope::string> &buffer)
s += " ";
s += e[this->columns[j]];
if (j + 1 != this->columns.size())
- for (unsigned k = e[this->columns[j]].length(); k < lenghts[this->columns[j]]; ++k)
+ for (unsigned k = e[this->columns[j]].length(); k < lengths[this->columns[j]]; ++k)
s += " ";
}
buffer.push_back(s);
diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp
index 96e49fdbd..23b35e94e 100644
--- a/src/modulemanager.cpp
+++ b/src/modulemanager.cpp
@@ -53,7 +53,7 @@ void ModuleManager::CleanupRuntimeDirectory()
/**
* Copy the module from the modules folder to the runtime folder.
* This will prevent module updates while the modules is loaded from
- * triggering a segfault, as the actaul file in use will be in the
+ * triggering a segfault, as the actual file in use will be in the
* runtime folder.
* @param name the name of the module to copy
* @param output the destination to copy the module to
@@ -489,17 +489,17 @@ bool ModuleManager::SetPriority(Module *mod, Implementation i, Priority s, Modul
if (swap && swap_pos != source)
{
/* Suggestion from Phoenix, "shuffle" the modules to better retain call order */
- int incrmnt = 1;
+ int increment = 1;
if (source > swap_pos)
- incrmnt = -1;
+ increment = -1;
- for (unsigned j = source; j != swap_pos; j += incrmnt)
+ for (unsigned j = source; j != swap_pos; j += increment)
{
- if (j + incrmnt > EventHandlers[i].size() - 1 || (!j && incrmnt == -1))
+ if (j + increment > EventHandlers[i].size() - 1 || (!j && increment == -1))
continue;
- std::swap(EventHandlers[i][j], EventHandlers[i][j + incrmnt]);
+ std::swap(EventHandlers[i][j], EventHandlers[i][j + increment]);
}
}
diff --git a/src/protocol.cpp b/src/protocol.cpp
index c81d18e5f..375104812 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -351,7 +351,7 @@ void IRCDProto::SendNumeric(int numeric, const Anope::string &dest, const char *
bool IRCDProto::IsNickValid(const Anope::string &nick)
{
/**
- * RFC: defination of a valid nick
+ * RFC: definition of a valid nick
* nickname = ( letter / special ) ( letter / digit / special / "-" )
* letter = A-Z / a-z
* digit = 0-9
@@ -438,6 +438,11 @@ unsigned IRCDProto::GetMaxListFor(Channel *c)
return c->HasMode("LBAN") ? 0 : Config->GetBlock("networkinfo")->Get<int>("modelistsize");
}
+unsigned IRCDProto::GetMaxListFor(Channel *c, ChannelMode *cm)
+{
+ return GetMaxListFor(c);
+}
+
Anope::string IRCDProto::NormalizeMask(const Anope::string &mask)
{
if (IsExtbanValid(mask))
diff --git a/src/sockets.cpp b/src/sockets.cpp
index 0238b101d..e2191dbd8 100644
--- a/src/sockets.cpp
+++ b/src/sockets.cpp
@@ -332,7 +332,7 @@ bool cidr::operator<(const cidr &other) const
if (i || this->cidr_len >= 128)
return i < 0;
- // Now all thats left is to compare 'remainig' bits at offset this->cidr_len / 8
+ // Now all thats left is to compare 'remaining' bits at offset this->cidr_len / 8
int remaining = this->cidr_len % 8;
unsigned char m = 0xFF << (8 - remaining);
diff --git a/src/tools/geoipupdate.sh b/src/tools/geoipupdate.sh
index 70ae26f67..5e6d9873e 100755
--- a/src/tools/geoipupdate.sh
+++ b/src/tools/geoipupdate.sh
@@ -6,7 +6,7 @@
# by the irc2sql module on the first load.
# Don't forget to rename this file or your changes
-# will be overwritte on the next 'make install'
+# will be overwritten on the next 'make install'
############################
# Config