summaryrefslogtreecommitdiff
path: root/src/chat/user.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat/user.h')
-rw-r--r--src/chat/user.h43
1 files changed, 27 insertions, 16 deletions
diff --git a/src/chat/user.h b/src/chat/user.h
index c5535a5..b88a820 100644
--- a/src/chat/user.h
+++ b/src/chat/user.h
@@ -1,7 +1,7 @@
/*:*
*: File: ./src/chat/user.h
*:
- *: yChat; Homepage: www.yChat.org; Version 0.7.9.5-RELEASE
+ *: yChat; Homepage: www.yChat.org; Version 0.8.3-CURRENT
*:
*: Copyright (C) 2003 Paul C. Buetow, Volker Richter
*: Copyright (C) 2004 Paul C. Buetow
@@ -40,14 +40,22 @@ class user : public name, public timo, public dumpable
private:
// private members:
- bool b_online; // true if user is online.
- bool b_has_sess; // true if user already has a session!
- bool b_is_reg; // true if user is registered
- bool b_away; // true if user is away.
- bool b_fake; // true if user hides his status logo (does not work for guest)
- bool b_invisible; // true if user hides his status logo (does not work for guest)
- int i_status; // user's rang ( see enum rang @ globals.h ).
- int i_old_status; // user's previous status.
+ string s_mess; // message string which has to be sent to the user.
+
+ bool b_online; // true if user is online.
+ bool b_has_sess; // true if user already has a session!
+ bool b_is_reg; // true if user is registered
+ bool b_is_gag; // true if user is gagged
+ bool b_away; // true if user is away.
+ bool b_fake; // true if user hides his status logo (does not work for guest)
+ bool b_invisible; // true if user hides his status logo (does not work for guest)
+ bool b_set_changed_data; // Only set change data if required!
+
+ int i_status; // user's rang ( see enum rang @ globals.h ).
+ int i_old_status; // user's previous status.
+ int i_flood_messages; // user's message posts (needed for flood protection, does not need to be syncronized)
+ time_t t_flood_time; // user's time count (needed for flood protection, does not need to be syncronized)
+
string s_tmpid;
string s_agnt; // user's http user agent.
string s_away; // user's last away message.
@@ -57,9 +65,11 @@ private:
string s_mess; // message string which has to be sent to the user.
string s_pass; // password
room* p_room; // pointer to the user's room.
+// sess** p_sess; // pointer to the pointer to the session object
hashmap<string> map_changed_data; // Needed to tell yChat which data to change after user is removed!
- bool b_set_changed_data; // Only set change data if required!
+ pthread_mutex_t mut_map_changed_data;
+ pthread_mutex_t mut_s_mess;
// Modules which are allowed to be executed by the user.
@@ -69,7 +79,7 @@ private:
pthread_mutex_t mut_b_invisible;
pthread_mutex_t mut_b_has_sess;
pthread_mutex_t mut_b_is_reg;
- pthread_mutex_t mut_s_mess;
+ pthread_mutex_t mut_b_is_gag;
pthread_mutex_t mut_s_pass;
pthread_mutex_t mut_p_room;
pthread_mutex_t mut_s_col1;
@@ -77,7 +87,6 @@ private:
pthread_mutex_t mut_s_email;
pthread_mutex_t mut_s_tmpid;
pthread_mutex_t mut_i_status;
- pthread_mutex_t mut_map_changed_data;
void initialize();
void set_changed_data( string s_varname, string s_value );
@@ -110,21 +119,21 @@ public:
bool get_invisible();
bool get_has_sess();
bool get_is_reg();
+ bool get_is_gag();
void set_online( bool b_online );
void set_fake( bool b_fake );
void set_invisible( bool b_invisible );
void set_has_sess( bool b_has_sess );
void set_is_reg( bool b_is_reg );
- void set_changed_data_on()
- {
- b_set_changed_data = 1;
- }
+ void set_is_gag( bool b_is_gag );
+ void set_changed_data_on() { b_set_changed_data = 1; }
bool get_away( );
string get_away_msg( );
void set_away( bool b_away, string s_away );
void set_away( bool b_away );
room* get_room();
void set_p_room( room* p_room );
+// void set_sess(sess** p_sess);
string get_pass();
string get_col1();
string get_col2();
@@ -138,7 +147,9 @@ public:
int get_status( );
void set_status( int i_status );
bool new_msgs ( );
+ void post_action_msg(string s_msgkey);
void check_timeout( int* i_idle_timeout );
+ void renew_timeout();
// executes a command.
void command( string &s_command );