diff options
Diffstat (limited to 'src/chat/user.cpp')
| -rw-r--r-- | src/chat/user.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/chat/user.cpp b/src/chat/user.cpp index 93dd672..b7816ab 100644 --- a/src/chat/user.cpp +++ b/src/chat/user.cpp @@ -73,7 +73,6 @@ user::initialize() this -> p_room = NULL; this -> b_is_reg = false; - this -> b_is_gag = false; this -> b_set_changed_data = false; this -> b_away = false; this -> b_fake = false; @@ -127,7 +126,6 @@ user::destroy_session() set_has_sess(false); wrap::SMAN->destroy_session(get_tmpid()); - //wrap::system_message(tool::int2string(reinterpret_cast<int>(*p_sess))); set_tmpid(""); } @@ -314,14 +312,6 @@ user::set_p_room( room* p_room ) pthread_mutex_unlock( &mut_p_room ); } -/* -void -user::set_sess( sess** p_sess ) -{ - this -> p_sess = p_sess; -} -*/ - string user::get_pass() { @@ -535,7 +525,7 @@ user::s_mess_delete( ) void -user::msg_post( string *p_msg ) +user::s_mess_delete( ) { pthread_mutex_lock ( &mut_s_mess ); s_mess.append( *p_msg ); @@ -550,6 +540,7 @@ user::post_action_msg(string s_msgkey) get_room()->msg_post(wrap::TIMR->get_time()+" "+get_colored_bold_name()+wrap::CONF->get_elem(s_msgkey)+"<br>\n"); } + void user::renew_timeout() { @@ -587,10 +578,11 @@ user::renew_timeout() void user::check_timeout( int* i_idle_timeout ) { - double d_user_timeout = get_last_activity(); - if ( get_away() ? i_idle_timeout[1] <= d_user_timeout : i_idle_timeout[0] <= d_user_timeout ) + int i_user_timeout = (int) get_last_activity(); + + if ( get_away() ? i_idle_timeout[1] <= i_user_timeout : i_idle_timeout[0] <= i_user_timeout ) { - wrap::system_message( string(TIMERTO) + "(" + get_name() + "," + tool::int2string((int)d_user_timeout) + ")"); + wrap::system_message( string(TIMERTO) + "(" + get_name() + "," + tool::int2string(i_user_timeout) + ")"); string s_quit = "<script language=JavaScript>top.location.href='/" + wrap::CONF->get_elem("httpd.startsite") + "';</script>"; @@ -599,9 +591,9 @@ user::check_timeout( int* i_idle_timeout ) pthread_cond_signal( &cond_message ); } - else if ( ! get_away() && i_idle_timeout[2] <= d_user_timeout ) + else if ( ! get_away() && i_idle_timeout[2] <= i_user_timeout ) { - wrap::system_message( string(TIMERAT) + "(" + get_name() + "," + tool::int2string((int)d_user_timeout) + ")"); + wrap::system_message( string(TIMERAT) + "(" + get_name() + "," + tool::int2string(i_user_timeout) + ")"); string s_msg = wrap::CONF->get_elem("chat.msgs.userautoawaytimeout"); set_away( true, s_msg ); string s_msg2 = wrap::TIMR->get_time() + " <b>" + get_colored_name()+ "</b>" + s_msg + "<br>\n"; |
