summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 7d401d7e3..de994dd5b 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1289,7 +1289,8 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user)
return;
}
- strcpy(outpars,"+");
+ outpars[0] = '+';
+ outpars[1] = 0;
direction = 1;
if ((parameters[1][0] != '+') && (parameters[1][0] != '-'))
@@ -1383,7 +1384,7 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user)
outpars[r+1]='\0';
outpars[r] = parameters[1][i];
- strcpy(temp,"");
+ *temp = 0;
for (q = 0; q < strlen(dmodes); q++)
{
if (dmodes[q] != parameters[1][i])
@@ -1555,7 +1556,8 @@ void ModeParser::ServerMode(char **parameters, int pcnt, userrec *user)
char dmodes[MAXBUF];
strlcpy(dmodes,dest->modes,52);
- strcpy(outpars,"+");
+ outpars[0] = '+';
+ outpars[1] = 0;
direction = 1;
if ((parameters[1][0] != '+') && (parameters[1][0] != '-'))
@@ -1639,8 +1641,7 @@ void ModeParser::ServerMode(char **parameters, int pcnt, userrec *user)
unsigned int v1 = strlen(outpars);
outpars[v1+1]='\0';
outpars[v1] = parameters[1][i];
-
- strcpy(temp,"");
+ *temp = 0;
for (q = 0; q < strlen(dmodes); q++)
{
if (dmodes[q] != parameters[1][i])