summaryrefslogtreecommitdiff
path: root/src/chat/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/user.cpp')
-rwxr-xr-xsrc/chat/user.cpp43
1 files changed, 14 insertions, 29 deletions
diff --git a/src/chat/user.cpp b/src/chat/user.cpp
index bac8b7e..4f1646b 100755
--- a/src/chat/user.cpp
+++ b/src/chat/user.cpp
@@ -73,27 +73,23 @@ user::initialize()
void
user::clean()
{
- destroy_session();
- set_fake( false );
- set_invisible( false );
- set_away( false, "" );
-}
-
-void
-user::destroy_session()
-{
- if ( !get_has_sess() )
- return;
+ // If this user has a session
+ if ( get_has_sess() )
+ {
#ifdef DATABASE
- // Store all changed data into the mysql table if this user is registered:
- if ( b_is_reg )
- wrap::DATA->update_user_data( get_name(), "savechangednick", map_changed_data );
+ // Store all changed data into the mysql table if this user is registered:
+ if ( b_is_reg )
+ wrap::DATA->update_user_data( get_name(), "savechangednick", map_changed_data );
#endif
- set_has_sess(false);
- wrap::SMAN->destroy_session(get_tmpid());
- set_tmpid("");
+ wrap::SMAN->destroy_session( get_tmpid() );
+ // wrap::system_message( SESSION + tool::int2string( wrap::SMAN->get_session_count() ) );
+ }
+
+ set_fake( false );
+ set_invisible( false );
+ set_away( false, "" );
}
string
@@ -415,7 +411,7 @@ user::command( string &s_command )
string s_command2 = s_command.substr(0, pos2-1);
s_mod.append( s_command2 ).append( ".so" );
- dynmod *mod = wrap::MODL->get_module( s_mod, get_name() );
+ dynmod *mod = wrap::MODL->get_module( s_mod );
if ( mod == NULL ||
wrap::CHAT->get_command_disabled( s_command2 ) ||
@@ -581,15 +577,4 @@ void
user::reconf()
{}
-void
-user::dumpit()
-{
- dumpable::add("[user]");
- dumpable::add("Name: " + get_name() +
- "; Room: " + get_room()->get_name() +
- "; Status: " + tool::int2string(get_status()));
- dumpable::add("TempID: " + get_tmpid());
-}
-
-
#endif