summaryrefslogtreecommitdiff
path: root/src/core/cs_akick.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/cs_akick.c')
-rw-r--r--src/core/cs_akick.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c
index a9e38fbd2..ede481bcb 100644
--- a/src/core/cs_akick.c
+++ b/src/core/cs_akick.c
@@ -213,10 +213,9 @@ class CommandCSAKick : public Command
if (!na) {
split_usermask(mask, &nick, &user, &host);
- char *smask = new char[strlen(nick) + strlen(user) + strlen(host) + 3];
+ std::string smask = std::string(nick) + "!" + user + "@" + host;
freemask = 1;
- sprintf(smask, "%s!%s@%s", nick, user, host);
- mask = smask;
+ mask = sstrdup(smask.c_str());
delete [] nick;
delete [] user;
delete [] host;