diff options
-rw-r--r-- | src/modules/m_chghost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_sethost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_setname.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index 7938f8b23..2d98884cf 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -33,7 +33,7 @@ void handle_chghost(char **parameters, int pcnt, userrec *user) } userrec* dest = Srv->FindNick(std::string(parameters[0])); if (dest) { - strncpy(dest->dhost,parameters[1],127); + Srv->ChangeHost(user,parameters[1]); Srv->SendOpers(std::string(user->nick)+" used CHGHOST to make the displayed host of "+std::string(dest->nick)+" become "+std::string(parameters[1])); } } diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 8fd4e43e5..98cbd10a4 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -99,14 +99,14 @@ class ModuleCloaking : public Module sprintf(ra,"%.8X",seed*s2*strlen(dest->host)); std::string b = Srv->GetNetworkName() + "-" + ra + a; Srv->Log(DEBUG,"cloak: allocated "+b); - strcpy(dest->dhost,b.c_str()); + Srv->ChangeHost(user,b); } } else { // user is removing the mode, so just restore their real host // and make it match the displayed one. - strcpy(dest->dhost,dest->host); + Srv->ChangeHost(user,user->host); } // this mode IS ours, and we have handled it. If we chose not to handle it, // for example the user cannot cloak as they have a vhost or such, then diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index a508a9cb4..f6a9bbf3f 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -32,7 +32,7 @@ void handle_sethost(char **parameters, int pcnt, userrec *user) } } } - strncpy(user->dhost,parameters[0],127); + Srv->ChangeHost(user,parameters[0]); Srv->SendOpers(std::string(user->nick)+" used SETHOST to change their displayed host to "+std::string(parameters[0])); } diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index 9ce02b37c..4cf6bb204 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -26,7 +26,7 @@ void handle_setname(char **parameters, int pcnt, userrec *user) line = line + std::string(parameters[i]); } line = line + std::string(parameters[pcnt-1]); - strncpy(user->fullname,line.c_str(),127); + Srv->ChangeGECOS(user,line); } |