summaryrefslogtreecommitdiff
path: root/src/cmd_time.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-11 18:20:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-02-11 18:20:40 +0000
commitc0d98b4cda769d88281115ed5672cc6415ec350d (patch)
treee0a47ac6f3f5d1c602021d0a85d85b1cb0e96adb /src/cmd_time.cpp
parentc268dfbc1bd995d20c61c407565a0f3402ca2c01 (diff)
Newline stripping for asctime()
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3162 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_time.cpp')
-rw-r--r--src/cmd_time.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd_time.cpp b/src/cmd_time.cpp
index 4897110a4..054e469fa 100644
--- a/src/cmd_time.cpp
+++ b/src/cmd_time.cpp
@@ -69,7 +69,12 @@ void cmd_time::Handle (char **parameters, int pcnt, userrec *user)
time(&rawtime);
timeinfo = localtime(&rawtime);
- WriteServ(user->fd,"391 %s %s :%s",user->nick,Config->ServerName,asctime(timeinfo));
+
+ char tms[26];
+ snprintf(tms,26,"%s",asctime(timeinfo));
+ tms[24] = 0;
+
+ WriteServ(user->fd,"391 %s %s :%s",user->nick,Config->ServerName,tms);
}