diff options
author | Adam <adam@sigterm.info> | 2013-05-15 12:33:47 -0700 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2013-05-15 12:33:47 -0700 |
commit | e586aaab7c4f7b03514c83451d73b73f55dc6998 (patch) | |
tree | 18f4370778cc79d2f21a4308dafbb29a77cfa213 /src/modules/m_cloaking.cpp | |
parent | 23e8bba13c55d33ce89d505780da36c9589e300a (diff) | |
parent | accccc212cd4f08a3c5532b1ae7a17e76bac8718 (diff) |
Merge pull request #531 from SaberUK/master+snprintf-removal
Replace some C-isms with C++-isms.
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r-- | src/modules/m_cloaking.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 691b61138..31b361b6f 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -295,9 +295,8 @@ class ModuleCloaking : public Module /* Check if they have a cloaked host, but are not using it */ if (cloak && *cloak != user->dhost) { - char cmask[MAXBUF]; - snprintf(cmask, MAXBUF, "%s!%s@%s", user->nick.c_str(), user->ident.c_str(), cloak->c_str()); - if (InspIRCd::Match(cmask,mask)) + const std::string cloakMask = user->nick + "!" + user->ident + "@" + *cloak; + if (InspIRCd::Match(cloakMask, mask)) return MOD_RES_DENY; } return MOD_RES_PASSTHRU; |