Author: shadowmaster
Date: Thu Sep  1 07:53:19 2011
New Revision: 50960

URL: http://svn.gna.org/viewcvs/wesnoth?rev=50960&view=rev
Log:
wesnothd: Make forum and sample user handlers print "Never" rather than the 
Unix epoch for users who've never logged in after registration

Modified:
    trunk/src/server/forum_user_handler.cpp
    trunk/src/server/sample_user_handler.cpp

Modified: trunk/src/server/forum_user_handler.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/forum_user_handler.cpp?rev=50960&r1=50959&r2=50960&view=diff
==============================================================================
--- trunk/src/server/forum_user_handler.cpp (original)
+++ trunk/src/server/forum_user_handler.cpp Thu Sep  1 07:53:19 2011
@@ -173,7 +173,13 @@
        time_t ll_date = get_lastlogin(name);
 
        std::string reg_string = ctime(&reg_date);
-       std::string ll_string = ctime(&ll_date);
+       std::string ll_string;
+
+       if(ll_date) {
+               ll_string = ctime(&ll_date);
+       } else {
+               ll_string = "Never";
+       }
 
        std::stringstream info;
        info << "Name: " << name << "\n"

Modified: trunk/src/server/sample_user_handler.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/sample_user_handler.cpp?rev=50960&r1=50959&r2=50960&view=diff
==============================================================================
--- trunk/src/server/sample_user_handler.cpp (original)
+++ trunk/src/server/sample_user_handler.cpp Thu Sep  1 07:53:19 2011
@@ -222,7 +222,13 @@
        time_t ll_date = get_lastlogin(name);
 
        std::string reg_string = ctime(&reg_date);
-       std::string ll_string = ctime(&ll_date);
+       std::string ll_string;
+
+       if(ll_date) {
+               ll_string = ctime(&ll_date);
+       } else {
+               ll_string = "Never";
+       }
 
        std::stringstream info;
        info << "Name: " << name << "\n"


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to