summaryrefslogtreecommitdiff
path: root/src/cmd_quit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_quit.cpp')
-rw-r--r--src/cmd_quit.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/cmd_quit.cpp b/src/cmd_quit.cpp
index 42077e743..50166ffd9 100644
--- a/src/cmd_quit.cpp
+++ b/src/cmd_quit.cpp
@@ -72,16 +72,13 @@ void cmd_quit::Handle (char **parameters, int pcnt, userrec *user)
/* theres more to do here, but for now just close the socket */
if (pcnt == 1)
{
- if (parameters[0][0] == ':')
- {
- *parameters[0]++;
- }
+ if (*parameters[0] == ':')
+ parameters[0]++;
+
reason = parameters[0];
- if (strlen(reason)>MAXQUIT)
- {
- reason[MAXQUIT-1] = '\0';
- }
+ if (strlen(reason) > MAXQUIT)
+ reason[MAXQUIT-1] = 0;
/* We should only prefix the quit for a local user. Remote users have
* already been prefixed, where neccessary, by the upstream server.