27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ |
29 */ |
30 |
30 |
31 #include <string.h> |
31 #include <string.h> |
|
32 #include <time.h> |
32 #include "interface.h" |
33 #include "interface.h" |
33 #include "network/rconsession.h" |
34 #include "network/rconsession.h" |
34 #include "network/ipaddress.h" |
35 #include "network/ipaddress.h" |
35 #include "coloredline.h" |
36 #include "coloredline.h" |
36 |
37 |
914 g_output[g_output.size() - 1].finalize(); |
915 g_output[g_output.size() - 1].finalize(); |
915 g_output << ColoredLine(); |
916 g_output << ColoredLine(); |
916 continue; |
917 continue; |
917 } |
918 } |
918 |
919 |
|
920 if (g_output[g_output.size() - 1].length() == 0) |
|
921 { |
|
922 time_t now; |
|
923 time (&now); |
|
924 char timestamp[32]; |
|
925 strftime (timestamp, sizeof timestamp, "[%H:%M:%S] ", localtime (&now)); |
|
926 |
|
927 for (char* cp = timestamp; *cp != '\0'; ++cp) |
|
928 g_output[g_output.size() - 1].add_char (*cp); |
|
929 } |
|
930 |
919 g_output[g_output.size() - 1].add_char (ch); |
931 g_output[g_output.size() - 1].add_char (ch); |
920 } |
932 } |
921 |
933 |
922 g_needOutputRender = true; |
934 g_needOutputRender = true; |
923 } |
935 } |