diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_alias.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_operlevels.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 3 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index ec426fe9b..6cb336c83 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -87,7 +87,8 @@ class ModuleAlias : public Module { ConfigTag* tag = i->second; Alias a; - a.AliasedCommand = tag->getString("text").c_str(); + std::string aliastext = tag->getString("text"); + a.AliasedCommand = aliastext.c_str(); tag->readString("replace", a.ReplaceFormat, true); a.RequiredNick = tag->getString("requires"); a.ULineOnly = tag->getBool("uline"); diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 0584e97c5..bf86c9091 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -282,7 +282,7 @@ class HttpServerSocket : public BufferedSocket return; } - if (headers.IsSet("Content-Length") && (postsize = atoi(headers.GetHeader("Content-Length").c_str())) != 0) + if (headers.IsSet("Content-Length") && (postsize = ConvToInt(headers.GetHeader("Content-Length"))) != 0) { InternalState = HTTP_SERVE_RECV_POSTDATA; diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp index 7e28f6c21..4fc4c6aef 100644 --- a/src/modules/m_operlevels.cpp +++ b/src/modules/m_operlevels.cpp @@ -42,8 +42,11 @@ class ModuleOperLevels : public Module // oper killing an oper? if (IS_OPER(dest) && IS_OPER(source)) { - long dest_level = atol(dest->oper->getConfig("level").c_str()); - long source_level = atol(source->oper->getConfig("level").c_str()); + std::string level = dest->oper->getConfig("level"); + long dest_level = atol(level.c_str()); + level = source->oper->getConfig("level"); + long source_level = atol(level.c_str()); + if (dest_level > source_level) { if (IS_LOCAL(source)) ServerInstance->SNO->WriteGlobalSno('a', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick.c_str(),source_level,dest->nick.c_str(),dest_level,reason.c_str()); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 75d4eaca3..11fdeb6cc 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -374,7 +374,8 @@ void SpanningTreeUtilities::ReadConfiguration() { ConfigTag* tag = i->second; reference<Link> L = new Link(tag); - L->Name = tag->getString("name").c_str(); + std::string linkname = tag->getString("name"); + L->Name = linkname.c_str(); L->AllowMask = tag->getString("allowmask"); L->IPAddr = tag->getString("ipaddr"); L->Port = tag->getInt("port"); |