diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-12 22:19:54 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-12 22:19:54 +0000 |
commit | 2016dcbbe1dd34879179a0d72d1626c56bbbee2e (patch) | |
tree | 397da9386324aafaa90adbccfe326a8c6a915046 | |
parent | 33008f95c75f71bf9aa0a870ba9e09940fc753b2 (diff) |
Make this use std::string, not char crap
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7006 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_userip.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 9c0aa12a8..5a56fe576 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -33,18 +33,18 @@ class cmd_userip : public command_t CmdResult Handle (const char** parameters, int pcnt, userrec *user) { - char Return[MAXBUF],junk[MAXBUF]; - snprintf(Return,MAXBUF,"340 %s :",user->nick); + std::string retbuf = std::string("340 ") + user->nick + " :"; + for (int i = 0; i < pcnt; i++) { userrec *u = ServerInstance->FindNick(parameters[i]); if ((u) && (u->registered == REG_ALL)) { - snprintf(junk,MAXBUF,"%s%s=+%s@%s ",u->nick,IS_OPER(u) ? "*" : "",u->ident,u->GetIPString()); - strlcat(Return,junk,MAXBUF); + retbuf = retbuf + u->nick + (IS_OPER(u) ? "*" : "") + "=+" + u->ident + "@" + u->GetIPString(); } } - user->WriteServ(Return); + + user->WriteServ(retbuf); /* Dont send to the network */ return CMD_FAILURE; |