From 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging tags --- ychat-0.7.7.0/src/CVS/Entries | 21 + ychat-0.7.7.0/src/CVS/Entries.Log | 14 + ychat-0.7.7.0/src/CVS/Repository | 1 + ychat-0.7.7.0/src/CVS/Root | 1 + ychat-0.7.7.0/src/Makefile.in | 21 + ychat-0.7.7.0/src/chat/CVS/Entries | 17 + ychat-0.7.7.0/src/chat/CVS/Repository | 1 + ychat-0.7.7.0/src/chat/CVS/Root | 1 + ychat-0.7.7.0/src/chat/base.h | 91 ++ ychat-0.7.7.0/src/chat/base.tmpl | 31 + ychat-0.7.7.0/src/chat/chat.cpp | 355 +++++ ychat-0.7.7.0/src/chat/chat.h | 62 + ychat-0.7.7.0/src/chat/gcol.cpp | 183 +++ ychat-0.7.7.0/src/chat/gcol.h | 43 + ychat-0.7.7.0/src/chat/perm.cpp | 83 ++ ychat-0.7.7.0/src/chat/perm.h | 42 + ychat-0.7.7.0/src/chat/room.cpp | 105 ++ ychat-0.7.7.0/src/chat/room.h | 84 ++ ychat-0.7.7.0/src/chat/sess.cpp | 56 + ychat-0.7.7.0/src/chat/sess.h | 31 + ychat-0.7.7.0/src/chat/sman.cpp | 119 ++ ychat-0.7.7.0/src/chat/sman.h | 41 + ychat-0.7.7.0/src/chat/user.cpp | 580 ++++++++ ychat-0.7.7.0/src/chat/user.h | 137 ++ ychat-0.7.7.0/src/cli/CVS/Entries | 3 + ychat-0.7.7.0/src/cli/CVS/Repository | 1 + ychat-0.7.7.0/src/cli/CVS/Root | 1 + ychat-0.7.7.0/src/cli/cli.cpp | 306 ++++ ychat-0.7.7.0/src/cli/cli.h | 58 + ychat-0.7.7.0/src/conf/CVS/Entries | 3 + ychat-0.7.7.0/src/conf/CVS/Repository | 1 + ychat-0.7.7.0/src/conf/CVS/Root | 1 + ychat-0.7.7.0/src/conf/conf.cpp | 167 +++ ychat-0.7.7.0/src/conf/conf.h | 28 + ychat-0.7.7.0/src/configure | 262 ++++ ychat-0.7.7.0/src/contrib/CVS/Entries | 2 + ychat-0.7.7.0/src/contrib/CVS/Entries.Log | 2 + ychat-0.7.7.0/src/contrib/CVS/Repository | 1 + ychat-0.7.7.0/src/contrib/CVS/Root | 1 + ychat-0.7.7.0/src/contrib/README | 5 + ychat-0.7.7.0/src/contrib/crypt/CVS/Entries | 5 + ychat-0.7.7.0/src/contrib/crypt/CVS/Repository | 1 + ychat-0.7.7.0/src/contrib/crypt/CVS/Root | 1 + ychat-0.7.7.0/src/contrib/crypt/how | 1 + ychat-0.7.7.0/src/contrib/crypt/md5.cpp | 270 ++++ ychat-0.7.7.0/src/contrib/crypt/md5.h | 34 + ychat-0.7.7.0/src/contrib/crypt/md5crypt.cpp | 162 +++ ychat-0.7.7.0/src/contrib/xml/CVS/Entries | 6 + ychat-0.7.7.0/src/contrib/xml/CVS/Repository | 1 + ychat-0.7.7.0/src/contrib/xml/CVS/Root | 1 + ychat-0.7.7.0/src/contrib/xml/README | 504 +++++++ ychat-0.7.7.0/src/contrib/xml/tinyxml.cpp | 1428 +++++++++++++++++++ ychat-0.7.7.0/src/contrib/xml/tinyxml.h | 1630 ++++++++++++++++++++++ ychat-0.7.7.0/src/contrib/xml/tinyxmlerror.cpp | 51 + ychat-0.7.7.0/src/contrib/xml/tinyxmlparser.cpp | 1553 +++++++++++++++++++++ ychat-0.7.7.0/src/data/CVS/Entries | 10 + ychat-0.7.7.0/src/data/CVS/Repository | 1 + ychat-0.7.7.0/src/data/CVS/Root | 1 + ychat-0.7.7.0/src/data/README | 4 + ychat-0.7.7.0/src/data/con.cpp | 44 + ychat-0.7.7.0/src/data/con.h | 22 + ychat-0.7.7.0/src/data/con_base.cpp | 19 + ychat-0.7.7.0/src/data/con_base.h | 19 + ychat-0.7.7.0/src/data/data.cpp | 203 +++ ychat-0.7.7.0/src/data/data.h | 29 + ychat-0.7.7.0/src/data/data_base.cpp | 227 +++ ychat-0.7.7.0/src/data/data_base.h | 48 + ychat-0.7.7.0/src/glob.h | 206 +++ ychat-0.7.7.0/src/html.cpp | 150 ++ ychat-0.7.7.0/src/html.h | 40 + ychat-0.7.7.0/src/incl.h | 13 + ychat-0.7.7.0/src/irc/CVS/Entries | 1 + ychat-0.7.7.0/src/irc/CVS/Repository | 1 + ychat-0.7.7.0/src/irc/CVS/Root | 1 + ychat-0.7.7.0/src/logd.cpp | 171 +++ ychat-0.7.7.0/src/logd.h | 39 + ychat-0.7.7.0/src/main.cpp | 190 +++ ychat-0.7.7.0/src/maps/CVS/Entries | 11 + ychat-0.7.7.0/src/maps/CVS/Repository | 1 + ychat-0.7.7.0/src/maps/CVS/Root | 1 + ychat-0.7.7.0/src/maps/hash.cpp | 26 + ychat-0.7.7.0/src/maps/hash.h | 18 + ychat-0.7.7.0/src/maps/hashmap.h | 24 + ychat-0.7.7.0/src/maps/hashmap.tmpl | 74 + ychat-0.7.7.0/src/maps/mtools.h | 11 + ychat-0.7.7.0/src/maps/mtools.tmpl | 12 + ychat-0.7.7.0/src/maps/nhashmap.h | 15 + ychat-0.7.7.0/src/maps/nhashmap.tmpl | 11 + ychat-0.7.7.0/src/maps/shashmap.h | 33 + ychat-0.7.7.0/src/maps/shashmap.tmpl | 129 ++ ychat-0.7.7.0/src/memb/CVS/Entries | 5 + ychat-0.7.7.0/src/memb/CVS/Repository | 1 + ychat-0.7.7.0/src/memb/CVS/Root | 1 + ychat-0.7.7.0/src/memb/memb.h | 23 + ychat-0.7.7.0/src/memb/memb.tmpl | 17 + ychat-0.7.7.0/src/memb/tupel.h | 26 + ychat-0.7.7.0/src/memb/tupel.tmpl | 37 + ychat-0.7.7.0/src/modl.cpp | 163 +++ ychat-0.7.7.0/src/modl.h | 38 + ychat-0.7.7.0/src/mods/CVS/Entries | 3 + ychat-0.7.7.0/src/mods/CVS/Entries.Log | 3 + ychat-0.7.7.0/src/mods/CVS/Repository | 1 + ychat-0.7.7.0/src/mods/CVS/Root | 1 + ychat-0.7.7.0/src/mods/Makefile | 9 + ychat-0.7.7.0/src/mods/commands/CVS/Entries | 32 + ychat-0.7.7.0/src/mods/commands/CVS/Repository | 1 + ychat-0.7.7.0/src/mods/commands/CVS/Root | 1 + ychat-0.7.7.0/src/mods/commands/Makefile | 48 + ychat-0.7.7.0/src/mods/commands/Makefile.in | 18 + ychat-0.7.7.0/src/mods/commands/yc_about.cpp | 59 + ychat-0.7.7.0/src/mods/commands/yc_all.cpp | 49 + ychat-0.7.7.0/src/mods/commands/yc_away.cpp | 72 + ychat-0.7.7.0/src/mods/commands/yc_col.cpp | 88 ++ ychat-0.7.7.0/src/mods/commands/yc_compopt.cpp | 23 + ychat-0.7.7.0/src/mods/commands/yc_exec.cpp | 66 + ychat-0.7.7.0/src/mods/commands/yc_fake.cpp | 30 + ychat-0.7.7.0/src/mods/commands/yc_getroom.cpp | 53 + ychat-0.7.7.0/src/mods/commands/yc_getrusage.cpp | 57 + ychat-0.7.7.0/src/mods/commands/yc_help.cpp | 52 + ychat-0.7.7.0/src/mods/commands/yc_invisible.cpp | 31 + ychat-0.7.7.0/src/mods/commands/yc_j.cpp | 104 ++ ychat-0.7.7.0/src/mods/commands/yc_ko.cpp | 72 + ychat-0.7.7.0/src/mods/commands/yc_m.cpp | 44 + ychat-0.7.7.0/src/mods/commands/yc_md5.cpp | 54 + ychat-0.7.7.0/src/mods/commands/yc_me.cpp | 45 + ychat-0.7.7.0/src/mods/commands/yc_morph.cpp | 52 + ychat-0.7.7.0/src/mods/commands/yc_msg.cpp | 68 + ychat-0.7.7.0/src/mods/commands/yc_q.cpp | 30 + ychat-0.7.7.0/src/mods/commands/yc_reload.cpp | 25 + ychat-0.7.7.0/src/mods/commands/yc_ren.cpp | 74 + ychat-0.7.7.0/src/mods/commands/yc_s.cpp | 48 + ychat-0.7.7.0/src/mods/commands/yc_set.cpp | 100 ++ ychat-0.7.7.0/src/mods/commands/yc_template.cpp | 25 + ychat-0.7.7.0/src/mods/commands/yc_time.cpp | 22 + ychat-0.7.7.0/src/mods/commands/yc_topic.cpp | 78 ++ ychat-0.7.7.0/src/mods/commands/yc_uptime.cpp | 22 + ychat-0.7.7.0/src/mods/commands/yc_users.cpp | 28 + ychat-0.7.7.0/src/mods/commands/yc_version.cpp | 23 + ychat-0.7.7.0/src/mods/configure | 26 + ychat-0.7.7.0/src/mods/html/CVS/Entries | 9 + ychat-0.7.7.0/src/mods/html/CVS/Repository | 1 + ychat-0.7.7.0/src/mods/html/CVS/Root | 1 + ychat-0.7.7.0/src/mods/html/Makefile | 25 + ychat-0.7.7.0/src/mods/html/Makefile.in | 18 + ychat-0.7.7.0/src/mods/html/yc_admin.cpp | 72 + ychat-0.7.7.0/src/mods/html/yc_colors.cpp | 37 + ychat-0.7.7.0/src/mods/html/yc_help.cpp | 50 + ychat-0.7.7.0/src/mods/html/yc_loggedin.cpp | 29 + ychat-0.7.7.0/src/mods/html/yc_options.cpp | 56 + ychat-0.7.7.0/src/mods/html/yc_register.cpp | 96 ++ ychat-0.7.7.0/src/mods/irc/CVS/Entries | 1 + ychat-0.7.7.0/src/mods/irc/CVS/Repository | 1 + ychat-0.7.7.0/src/mods/irc/CVS/Root | 1 + ychat-0.7.7.0/src/msgs.h | 122 ++ ychat-0.7.7.0/src/name.cpp | 49 + ychat-0.7.7.0/src/name.h | 24 + ychat-0.7.7.0/src/ncur/CVS/Entries | 5 + ychat-0.7.7.0/src/ncur/CVS/Repository | 1 + ychat-0.7.7.0/src/ncur/CVS/Root | 1 + ychat-0.7.7.0/src/ncur/menu.cpp | 117 ++ ychat-0.7.7.0/src/ncur/menu.h | 39 + ychat-0.7.7.0/src/ncur/ncur.cpp | 292 ++++ ychat-0.7.7.0/src/ncur/ncur.h | 50 + ychat-0.7.7.0/src/reqp.cpp | 383 +++++ ychat-0.7.7.0/src/reqp.h | 41 + ychat-0.7.7.0/src/sock/CVS/Entries | 3 + ychat-0.7.7.0/src/sock/CVS/Repository | 1 + ychat-0.7.7.0/src/sock/CVS/Root | 1 + ychat-0.7.7.0/src/sock/sock.cpp | 309 ++++ ychat-0.7.7.0/src/sock/sock.h | 75 + ychat-0.7.7.0/src/stats.cpp | 151 ++ ychat-0.7.7.0/src/stats.h | 49 + ychat-0.7.7.0/src/thrd/CVS/Entries | 5 + ychat-0.7.7.0/src/thrd/CVS/Repository | 1 + ychat-0.7.7.0/src/thrd/CVS/Root | 1 + ychat-0.7.7.0/src/thrd/pool.cpp | 221 +++ ychat-0.7.7.0/src/thrd/pool.h | 67 + ychat-0.7.7.0/src/thrd/thro.cpp | 42 + ychat-0.7.7.0/src/thrd/thro.h | 30 + ychat-0.7.7.0/src/time/CVS/Entries | 5 + ychat-0.7.7.0/src/time/CVS/Repository | 1 + ychat-0.7.7.0/src/time/CVS/Root | 1 + ychat-0.7.7.0/src/time/timo.cpp | 38 + ychat-0.7.7.0/src/time/timo.h | 22 + ychat-0.7.7.0/src/time/timr.cpp | 193 +++ ychat-0.7.7.0/src/time/timr.h | 64 + ychat-0.7.7.0/src/tool/CVS/Entries | 5 + ychat-0.7.7.0/src/tool/CVS/Repository | 1 + ychat-0.7.7.0/src/tool/CVS/Root | 1 + ychat-0.7.7.0/src/tool/dir.cpp | 66 + ychat-0.7.7.0/src/tool/dir.h | 35 + ychat-0.7.7.0/src/tool/tool.cpp | 240 ++++ ychat-0.7.7.0/src/tool/tool.h | 29 + ychat-0.7.7.0/src/wrap.cpp | 46 + ychat-0.7.7.0/src/wrap.h | 108 ++ 195 files changed, 15695 insertions(+) create mode 100644 ychat-0.7.7.0/src/CVS/Entries create mode 100644 ychat-0.7.7.0/src/CVS/Entries.Log create mode 100644 ychat-0.7.7.0/src/CVS/Repository create mode 100644 ychat-0.7.7.0/src/CVS/Root create mode 100755 ychat-0.7.7.0/src/Makefile.in create mode 100644 ychat-0.7.7.0/src/chat/CVS/Entries create mode 100644 ychat-0.7.7.0/src/chat/CVS/Repository create mode 100644 ychat-0.7.7.0/src/chat/CVS/Root create mode 100755 ychat-0.7.7.0/src/chat/base.h create mode 100755 ychat-0.7.7.0/src/chat/base.tmpl create mode 100755 ychat-0.7.7.0/src/chat/chat.cpp create mode 100755 ychat-0.7.7.0/src/chat/chat.h create mode 100755 ychat-0.7.7.0/src/chat/gcol.cpp create mode 100755 ychat-0.7.7.0/src/chat/gcol.h create mode 100755 ychat-0.7.7.0/src/chat/perm.cpp create mode 100755 ychat-0.7.7.0/src/chat/perm.h create mode 100755 ychat-0.7.7.0/src/chat/room.cpp create mode 100755 ychat-0.7.7.0/src/chat/room.h create mode 100755 ychat-0.7.7.0/src/chat/sess.cpp create mode 100755 ychat-0.7.7.0/src/chat/sess.h create mode 100755 ychat-0.7.7.0/src/chat/sman.cpp create mode 100755 ychat-0.7.7.0/src/chat/sman.h create mode 100755 ychat-0.7.7.0/src/chat/user.cpp create mode 100755 ychat-0.7.7.0/src/chat/user.h create mode 100644 ychat-0.7.7.0/src/cli/CVS/Entries create mode 100644 ychat-0.7.7.0/src/cli/CVS/Repository create mode 100644 ychat-0.7.7.0/src/cli/CVS/Root create mode 100755 ychat-0.7.7.0/src/cli/cli.cpp create mode 100755 ychat-0.7.7.0/src/cli/cli.h create mode 100644 ychat-0.7.7.0/src/conf/CVS/Entries create mode 100644 ychat-0.7.7.0/src/conf/CVS/Repository create mode 100644 ychat-0.7.7.0/src/conf/CVS/Root create mode 100755 ychat-0.7.7.0/src/conf/conf.cpp create mode 100755 ychat-0.7.7.0/src/conf/conf.h create mode 100755 ychat-0.7.7.0/src/configure create mode 100644 ychat-0.7.7.0/src/contrib/CVS/Entries create mode 100644 ychat-0.7.7.0/src/contrib/CVS/Entries.Log create mode 100644 ychat-0.7.7.0/src/contrib/CVS/Repository create mode 100644 ychat-0.7.7.0/src/contrib/CVS/Root create mode 100644 ychat-0.7.7.0/src/contrib/README create mode 100644 ychat-0.7.7.0/src/contrib/crypt/CVS/Entries create mode 100644 ychat-0.7.7.0/src/contrib/crypt/CVS/Repository create mode 100644 ychat-0.7.7.0/src/contrib/crypt/CVS/Root create mode 100644 ychat-0.7.7.0/src/contrib/crypt/how create mode 100644 ychat-0.7.7.0/src/contrib/crypt/md5.cpp create mode 100644 ychat-0.7.7.0/src/contrib/crypt/md5.h create mode 100644 ychat-0.7.7.0/src/contrib/crypt/md5crypt.cpp create mode 100644 ychat-0.7.7.0/src/contrib/xml/CVS/Entries create mode 100644 ychat-0.7.7.0/src/contrib/xml/CVS/Repository create mode 100644 ychat-0.7.7.0/src/contrib/xml/CVS/Root create mode 100644 ychat-0.7.7.0/src/contrib/xml/README create mode 100644 ychat-0.7.7.0/src/contrib/xml/tinyxml.cpp create mode 100644 ychat-0.7.7.0/src/contrib/xml/tinyxml.h create mode 100644 ychat-0.7.7.0/src/contrib/xml/tinyxmlerror.cpp create mode 100644 ychat-0.7.7.0/src/contrib/xml/tinyxmlparser.cpp create mode 100644 ychat-0.7.7.0/src/data/CVS/Entries create mode 100644 ychat-0.7.7.0/src/data/CVS/Repository create mode 100644 ychat-0.7.7.0/src/data/CVS/Root create mode 100644 ychat-0.7.7.0/src/data/README create mode 100755 ychat-0.7.7.0/src/data/con.cpp create mode 100755 ychat-0.7.7.0/src/data/con.h create mode 100755 ychat-0.7.7.0/src/data/con_base.cpp create mode 100755 ychat-0.7.7.0/src/data/con_base.h create mode 100644 ychat-0.7.7.0/src/data/data.cpp create mode 100644 ychat-0.7.7.0/src/data/data.h create mode 100644 ychat-0.7.7.0/src/data/data_base.cpp create mode 100644 ychat-0.7.7.0/src/data/data_base.h create mode 100755 ychat-0.7.7.0/src/glob.h create mode 100755 ychat-0.7.7.0/src/html.cpp create mode 100755 ychat-0.7.7.0/src/html.h create mode 100755 ychat-0.7.7.0/src/incl.h create mode 100644 ychat-0.7.7.0/src/irc/CVS/Entries create mode 100644 ychat-0.7.7.0/src/irc/CVS/Repository create mode 100644 ychat-0.7.7.0/src/irc/CVS/Root create mode 100755 ychat-0.7.7.0/src/logd.cpp create mode 100755 ychat-0.7.7.0/src/logd.h create mode 100755 ychat-0.7.7.0/src/main.cpp create mode 100644 ychat-0.7.7.0/src/maps/CVS/Entries create mode 100644 ychat-0.7.7.0/src/maps/CVS/Repository create mode 100644 ychat-0.7.7.0/src/maps/CVS/Root create mode 100644 ychat-0.7.7.0/src/maps/hash.cpp create mode 100644 ychat-0.7.7.0/src/maps/hash.h create mode 100644 ychat-0.7.7.0/src/maps/hashmap.h create mode 100644 ychat-0.7.7.0/src/maps/hashmap.tmpl create mode 100644 ychat-0.7.7.0/src/maps/mtools.h create mode 100644 ychat-0.7.7.0/src/maps/mtools.tmpl create mode 100644 ychat-0.7.7.0/src/maps/nhashmap.h create mode 100644 ychat-0.7.7.0/src/maps/nhashmap.tmpl create mode 100644 ychat-0.7.7.0/src/maps/shashmap.h create mode 100644 ychat-0.7.7.0/src/maps/shashmap.tmpl create mode 100644 ychat-0.7.7.0/src/memb/CVS/Entries create mode 100644 ychat-0.7.7.0/src/memb/CVS/Repository create mode 100644 ychat-0.7.7.0/src/memb/CVS/Root create mode 100644 ychat-0.7.7.0/src/memb/memb.h create mode 100644 ychat-0.7.7.0/src/memb/memb.tmpl create mode 100644 ychat-0.7.7.0/src/memb/tupel.h create mode 100644 ychat-0.7.7.0/src/memb/tupel.tmpl create mode 100755 ychat-0.7.7.0/src/modl.cpp create mode 100755 ychat-0.7.7.0/src/modl.h create mode 100644 ychat-0.7.7.0/src/mods/CVS/Entries create mode 100644 ychat-0.7.7.0/src/mods/CVS/Entries.Log create mode 100644 ychat-0.7.7.0/src/mods/CVS/Repository create mode 100644 ychat-0.7.7.0/src/mods/CVS/Root create mode 100755 ychat-0.7.7.0/src/mods/Makefile create mode 100644 ychat-0.7.7.0/src/mods/commands/CVS/Entries create mode 100644 ychat-0.7.7.0/src/mods/commands/CVS/Repository create mode 100644 ychat-0.7.7.0/src/mods/commands/CVS/Root create mode 100644 ychat-0.7.7.0/src/mods/commands/Makefile create mode 100755 ychat-0.7.7.0/src/mods/commands/Makefile.in create mode 100644 ychat-0.7.7.0/src/mods/commands/yc_about.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_all.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_away.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_col.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_compopt.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_exec.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_fake.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_getroom.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_getrusage.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_help.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_invisible.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_j.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_ko.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_m.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_md5.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_me.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_morph.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_msg.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_q.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_reload.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_ren.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_s.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_set.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_template.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_time.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_topic.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_uptime.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_users.cpp create mode 100755 ychat-0.7.7.0/src/mods/commands/yc_version.cpp create mode 100755 ychat-0.7.7.0/src/mods/configure create mode 100644 ychat-0.7.7.0/src/mods/html/CVS/Entries create mode 100644 ychat-0.7.7.0/src/mods/html/CVS/Repository create mode 100644 ychat-0.7.7.0/src/mods/html/CVS/Root create mode 100644 ychat-0.7.7.0/src/mods/html/Makefile create mode 100755 ychat-0.7.7.0/src/mods/html/Makefile.in create mode 100644 ychat-0.7.7.0/src/mods/html/yc_admin.cpp create mode 100755 ychat-0.7.7.0/src/mods/html/yc_colors.cpp create mode 100755 ychat-0.7.7.0/src/mods/html/yc_help.cpp create mode 100755 ychat-0.7.7.0/src/mods/html/yc_loggedin.cpp create mode 100755 ychat-0.7.7.0/src/mods/html/yc_options.cpp create mode 100755 ychat-0.7.7.0/src/mods/html/yc_register.cpp create mode 100644 ychat-0.7.7.0/src/mods/irc/CVS/Entries create mode 100644 ychat-0.7.7.0/src/mods/irc/CVS/Repository create mode 100644 ychat-0.7.7.0/src/mods/irc/CVS/Root create mode 100755 ychat-0.7.7.0/src/msgs.h create mode 100755 ychat-0.7.7.0/src/name.cpp create mode 100755 ychat-0.7.7.0/src/name.h create mode 100644 ychat-0.7.7.0/src/ncur/CVS/Entries create mode 100644 ychat-0.7.7.0/src/ncur/CVS/Repository create mode 100644 ychat-0.7.7.0/src/ncur/CVS/Root create mode 100755 ychat-0.7.7.0/src/ncur/menu.cpp create mode 100755 ychat-0.7.7.0/src/ncur/menu.h create mode 100755 ychat-0.7.7.0/src/ncur/ncur.cpp create mode 100755 ychat-0.7.7.0/src/ncur/ncur.h create mode 100755 ychat-0.7.7.0/src/reqp.cpp create mode 100755 ychat-0.7.7.0/src/reqp.h create mode 100644 ychat-0.7.7.0/src/sock/CVS/Entries create mode 100644 ychat-0.7.7.0/src/sock/CVS/Repository create mode 100644 ychat-0.7.7.0/src/sock/CVS/Root create mode 100755 ychat-0.7.7.0/src/sock/sock.cpp create mode 100755 ychat-0.7.7.0/src/sock/sock.h create mode 100644 ychat-0.7.7.0/src/stats.cpp create mode 100644 ychat-0.7.7.0/src/stats.h create mode 100644 ychat-0.7.7.0/src/thrd/CVS/Entries create mode 100644 ychat-0.7.7.0/src/thrd/CVS/Repository create mode 100644 ychat-0.7.7.0/src/thrd/CVS/Root create mode 100755 ychat-0.7.7.0/src/thrd/pool.cpp create mode 100755 ychat-0.7.7.0/src/thrd/pool.h create mode 100644 ychat-0.7.7.0/src/thrd/thro.cpp create mode 100644 ychat-0.7.7.0/src/thrd/thro.h create mode 100644 ychat-0.7.7.0/src/time/CVS/Entries create mode 100644 ychat-0.7.7.0/src/time/CVS/Repository create mode 100644 ychat-0.7.7.0/src/time/CVS/Root create mode 100755 ychat-0.7.7.0/src/time/timo.cpp create mode 100755 ychat-0.7.7.0/src/time/timo.h create mode 100755 ychat-0.7.7.0/src/time/timr.cpp create mode 100755 ychat-0.7.7.0/src/time/timr.h create mode 100644 ychat-0.7.7.0/src/tool/CVS/Entries create mode 100644 ychat-0.7.7.0/src/tool/CVS/Repository create mode 100644 ychat-0.7.7.0/src/tool/CVS/Root create mode 100644 ychat-0.7.7.0/src/tool/dir.cpp create mode 100644 ychat-0.7.7.0/src/tool/dir.h create mode 100644 ychat-0.7.7.0/src/tool/tool.cpp create mode 100644 ychat-0.7.7.0/src/tool/tool.h create mode 100755 ychat-0.7.7.0/src/wrap.cpp create mode 100755 ychat-0.7.7.0/src/wrap.h (limited to 'ychat-0.7.7.0/src') diff --git a/ychat-0.7.7.0/src/CVS/Entries b/ychat-0.7.7.0/src/CVS/Entries new file mode 100644 index 0000000..f1ff71c --- /dev/null +++ b/ychat-0.7.7.0/src/CVS/Entries @@ -0,0 +1,21 @@ +/Makefile.in/1.22/Tue Sep 7 17:14:39 2004// +/configure/1.34/Thu Feb 17 00:25:26 2005// +/glob.h/1.60/Mon Feb 21 02:02:48 2005// +/html.cpp/1.20/Mon Feb 21 01:55:49 2005// +/html.h/1.10/Mon Feb 21 01:55:49 2005// +/incl.h/1.6/Sat Feb 19 11:08:50 2005// +/logd.cpp/1.12/Mon Feb 21 01:55:49 2005// +/logd.h/1.10/Mon Feb 21 01:55:49 2005// +/main.cpp/1.34/Mon Feb 21 01:55:49 2005// +/modl.cpp/1.18/Mon Feb 21 01:55:49 2005// +/modl.h/1.10/Mon Feb 21 01:55:49 2005// +/msgs.h/1.176/Mon Feb 21 02:02:48 2005// +/name.cpp/1.8/Mon Feb 21 01:55:49 2005// +/name.h/1.6/Mon Feb 21 01:55:49 2005// +/reqp.cpp/1.36/Mon Feb 21 01:55:49 2005// +/reqp.h/1.14/Mon Feb 21 01:55:49 2005// +/stats.cpp/1.10/Mon Feb 21 01:55:49 2005// +/stats.h/1.7/Mon Feb 21 01:55:49 2005// +/wrap.cpp/1.16/Mon Feb 21 01:55:49 2005// +/wrap.h/1.23/Mon Feb 21 01:55:49 2005// +D diff --git a/ychat-0.7.7.0/src/CVS/Entries.Log b/ychat-0.7.7.0/src/CVS/Entries.Log new file mode 100644 index 0000000..7d9d881 --- /dev/null +++ b/ychat-0.7.7.0/src/CVS/Entries.Log @@ -0,0 +1,14 @@ +A D/chat//// +A D/cli//// +A D/conf//// +A D/contrib//// +A D/data//// +A D/irc//// +A D/maps//// +A D/memb//// +A D/mods//// +A D/ncur//// +A D/sock//// +A D/thrd//// +A D/time//// +A D/tool//// diff --git a/ychat-0.7.7.0/src/CVS/Repository b/ychat-0.7.7.0/src/CVS/Repository new file mode 100644 index 0000000..47f3b3c --- /dev/null +++ b/ychat-0.7.7.0/src/CVS/Repository @@ -0,0 +1 @@ +ychat/src diff --git a/ychat-0.7.7.0/src/CVS/Root b/ychat-0.7.7.0/src/CVS/Root new file mode 100644 index 0000000..745de68 --- /dev/null +++ b/ychat-0.7.7.0/src/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot diff --git a/ychat-0.7.7.0/src/Makefile.in b/ychat-0.7.7.0/src/Makefile.in new file mode 100755 index 0000000..0382389 --- /dev/null +++ b/ychat-0.7.7.0/src/Makefile.in @@ -0,0 +1,21 @@ +SRCS=WILLBEADDEDBYCONFIGURE +OBJS=$(addprefix ../obj/,$(SRCS:.cpp=.o)) +CC=WILLBEADDEDBYCONFIGURE +LIBADD=`cat libs.add` +LDFLAGS=$(LIBADD) -lstdc++ +LDADD=-pthread -D_THREAD_SAFE -export-dynamic -ldl +INCLUDES=`cat includes.add` +CFLAGS=-fno-inline -fno-default-inline -frepo +all: ychat +$(SRCS): + $(CC) $(INCLUDES) $(CFLAGS) -c $*.cpp +infotext: + @echo Compiling base +ychat: infotext $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDADD) + @mv ychat ../bin + @echo -n "Size of linked executable: " + @du -hc ../bin/ychat | tail -n 1 +clean: + @echo Cleaning base obj + @if test -d ../obj; then rm -Rf ../obj; fi diff --git a/ychat-0.7.7.0/src/chat/CVS/Entries b/ychat-0.7.7.0/src/chat/CVS/Entries new file mode 100644 index 0000000..7eb1a75 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/CVS/Entries @@ -0,0 +1,17 @@ +/base.h/1.8/Mon Feb 21 01:55:49 2005// +/base.tmpl/1.6/Mon Feb 21 01:55:49 2005// +/chat.cpp/1.18/Mon Feb 21 01:55:49 2005// +/chat.h/1.11/Mon Feb 21 01:55:49 2005// +/gcol.cpp/1.7/Mon Feb 21 01:55:49 2005// +/gcol.h/1.5/Mon Feb 21 01:55:49 2005// +/perm.cpp/1.10/Mon Feb 21 01:55:49 2005// +/perm.h/1.8/Mon Feb 21 01:55:49 2005// +/room.cpp/1.10/Mon Feb 21 01:55:49 2005// +/room.h/1.7/Mon Feb 21 01:55:49 2005// +/sess.cpp/1.6/Mon Feb 21 01:55:49 2005// +/sess.h/1.6/Mon Feb 21 01:55:49 2005// +/sman.cpp/1.11/Mon Feb 21 01:55:49 2005// +/sman.h/1.6/Mon Feb 21 01:55:49 2005// +/user.cpp/1.16/Mon Feb 21 01:55:49 2005// +/user.h/1.11/Mon Feb 21 01:55:49 2005// +D diff --git a/ychat-0.7.7.0/src/chat/CVS/Repository b/ychat-0.7.7.0/src/chat/CVS/Repository new file mode 100644 index 0000000..6215e07 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/CVS/Repository @@ -0,0 +1 @@ +ychat/src/chat diff --git a/ychat-0.7.7.0/src/chat/CVS/Root b/ychat-0.7.7.0/src/chat/CVS/Root new file mode 100644 index 0000000..745de68 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/CVS/Root @@ -0,0 +1 @@ +:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot diff --git a/ychat-0.7.7.0/src/chat/base.h b/ychat-0.7.7.0/src/chat/base.h new file mode 100755 index 0000000..9da4304 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/base.h @@ -0,0 +1,91 @@ +#include "../incl.h" + +#ifndef BASE_H +#define BASE_H + +#include +#include "../maps/nhashmap.h" + +template +class base : public nhashmap +{ +public: + base(); + ~base(); + + static string to_lower( string s ) + { + string s_tmp(""); + for(int i=0;i < s.size() ;i++) + s_tmp=s_tmp+(char)tolower(s.at(i)); + return s_tmp; + } + + virtual type* get_elem( string s_name, bool &b_found ); // get a element. + virtual void add_elem( type* p_type ); // add a element. + + // chat::msg_post sends to all users of the system a message. + // room::msg_post sends to all users of the room a message. + // user::msg_post sends to the user a message. + virtual void msg_post( string *s_msg ) + { + nhashmap::run_func( &base::msg_post_ , (void*)s_msg ); + } + + static void msg_post_( type* type_obj, void* v_arg ) + { + type_obj -> msg_post( (string*) v_arg ); + } + + virtual void check_timeout( int* i_timeout_settings ) + { + nhashmap::run_func( &base::check_timeout_ , (void*)i_timeout_settings ); + } + + static void check_timeout_( type* type_obj, void* v_arg ) + { + type_obj -> check_timeout( (int*) v_arg ); + } + + virtual void reconf() + { + nhashmap::run_func( &base::reconf_ ); + } + + static void reconf_ ( type* type_obj ) + { + type_obj -> reconf (); + } + + void get_data( map *p_map_string ) + { + nhashmap::run_func( &base::get_data_ , (void*)p_map_string ); + } + + static void get_data_( type* type_obj, void* v_arg ) + { + type_obj -> get_data ( (map*) v_arg ); + } + + + // chat::get_user_list gets a list of all users of the system. + // room::get_user_list gets a list of all users of the room. + // user::get_user_list gets a "list" of a user usernameseperator + void get_user_list( string &s_list ) + { + container c; + c.elem[0] = (void*) &s_list; + + nhashmap::run_func( &base::get_user_list_, (void*)&c ); + } + + static void get_user_list_( type* type_obj, void* v_arg ) + { + container *c = (container*) v_arg; + type_obj -> get_user_list( *((string*)c->elem[0]) ); + } +}; + +#include "base.tmpl" + +#endif diff --git a/ychat-0.7.7.0/src/chat/base.tmpl b/ychat-0.7.7.0/src/chat/base.tmpl new file mode 100755 index 0000000..0be21aa --- /dev/null +++ b/ychat-0.7.7.0/src/chat/base.tmpl @@ -0,0 +1,31 @@ +#ifndef BASE_CPP +#define BASE_CPP + +#include "base.h" + +template +base::base() +{} + +template +base::~base( ) +{} + +template +type* +base::get_elem( string s_name, bool &b_found ) +{ + s_name = to_lower(s_name); + type* p_type = nhashmap::get_elem( s_name ); + b_found = p_type == NULL ? false : true; + return p_type; +} + +template +void +base::add_elem( type* p_type ) +{ + nhashmap::add_elem(p_type, p_type->get_lowercase_name()); +} + +#endif diff --git a/ychat-0.7.7.0/src/chat/chat.cpp b/ychat-0.7.7.0/src/chat/chat.cpp new file mode 100755 index 0000000..019f939 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/chat.cpp @@ -0,0 +1,355 @@ +// class chat implementation. + +#ifndef CHAT_CPP +#define CHAT_CPP + +#include "chat.h" +#include "../tool/tool.h" +#include "../maps/mtools.h" +#include + +using namespace std; + +chat::chat( ) +{ + { // Set up replace strings; + wrap::system_message(CHATREP); + vector* p_vec_keys = wrap::CONF->get_key_vector(); + + for (vector::iterator iter = p_vec_keys->begin(); + iter != p_vec_keys->end(); + iter++ ) + { + if ( iter->length() >= 24 && iter->compare( 0, 22, "chat.html.replace.from" ) == 0 ) + { + string s_from = wrap::CONF->get_elem(*iter); + map_replace_strings[s_from] = "chat.html.replace.into." + s_from; + vec_replace_keys.push_back(s_from); + } + } + + sort(vec_replace_keys.begin(), vec_replace_keys.end()); + delete p_vec_keys; + } +} + +chat::~chat( ) +{ + // Delete all room objects! + run_func( mtools::delete_obj ); +} + +user* +chat::get_user( string &s_user ) +{ + bool b_flag; + return get_user( s_user, b_flag ); +} + +user* +chat::get_user( string &s_user, bool &b_found ) +{ + container param; + + param.elem[0] = (void*) &s_user ; + param.elem[1] = (void*) &b_found; + + b_found = false; + + base::run_func( get_user_, (void*)¶m ); + + if ( *( (bool*) param.elem[1] ) ) + return (user*) param.elem[2]; +} + +void +chat::get_user_( room *room_obj, void *v_arg ) +{ + container* param = (container*) v_arg; + + if ( *((bool*)param->elem[1]) ) + return; + + param->elem[2] = (void*)room_obj->get_elem( *((string*)param->elem[0]), *((bool*)param->elem[1]) ); +} + +void +chat::login( hashmap &map_params ) +{ + string s_user = map_params["nick"]; + + // prove if nick is empty: + if ( s_user.empty() ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.nonick" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE0 ); + return; + } + + // prove if the nick is alphanumeric: + else if ( ! tool::is_alpha_numeric( s_user ) ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.alpnum" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE1 + s_user ); + return; + } + + // prove if the nick is too long: + else if ( s_user.length() > tool::string2int( wrap::CONF->get_elem("chat.maxlength.username") ) ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.nicklength" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE2 + s_user ); + return; + } + + // prove if the room name is too long: + else if ( map_params["room"].length() > tool::string2int( wrap::CONF->get_elem("chat.maxlength.roomname") ) ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.roomnamelength" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE3 + s_user + " / " + map_params["room"] ); + return; + } + + // prove if the room name is valid + else if ( map_params["room"].length() < 1 ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.noroom" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE3 + s_user + " / " + map_params["room"] ); + return; + } + + bool b_flag; + + // prove if nick is already online / logged in. + get_user( s_user, b_flag ); + + if ( b_flag ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.online" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); + + return; + } + + // Prove if user is recycleable from the garbage collector: + user *p_user = wrap::GCOL->get_user_from_garbage( s_user ); + + if ( p_user != NULL ) + { + // 1. possibility to prove the password at login! (using recycled user) + if ( p_user->get_pass() != map_params["password"] ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.wrongpassword" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINER + s_user ); + return; + } + if ( p_user->get_has_sess() ) + { + map_params["tmpid"] = p_user->get_tmpid(); + } + else + { + sess* p_sess = wrap::SMAN->create_session(); + //p_sess->set_value( string("nick"), (void *) new string(s_user) ); + p_sess->set_user(p_user); + map_params["tmpid"] = p_sess->get_tmpid(); + p_user->set_tmpid( map_params["tmpid"] ); + p_user->set_has_sess( true ); + } + } + else // if ( p_user == NULL ) // If not in garbage create a new user! + { + p_user = new user( s_user ); + + // prove if nick is registered, else create a guest chatter. +#ifdef DATABASE + + hashmap map_results = wrap::DATA->select_user_data( tool::to_lower(s_user), "selectlogin"); + + if ( map_results["nick"] == tool::to_lower(s_user) ) + { + p_user->set_is_reg( true ); + // User exists in database, prove password: + // 2. possibility to prove the password at login! (using new created user from database) + if ( map_results["password"] != map_params["password"] ) + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.wrongpassword" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINER + s_user ); + return; + } + else + { // If registered use saved options + map_params["registered"] = "yes"; + map_params["color1"] = map_results["color1"]; + map_params["color2"] = map_results["color2"]; + map_params["email"] = map_results["email"]; + map_params["status"] = map_results["status"]; + } + } + else +#endif + + { // If not registered prove if guest chatting is enabled. + if (wrap::CONF->get_elem("chat.enableguest") != "true") + { + map_params["INFO"] = wrap::CONF->get_elem( "chat.msgs.err.noguest" ); + map_params["request"] = wrap::CONF->get_elem( "httpd.startsite" ); // redirect to the startpage. + wrap::system_message( LOGINE4 + s_user ); + return; + } + + // Guest chatter are enabled, use standard font colors + map_params["color1"] = wrap::CONF->get_elem( "chat.html.user.color1" ); + map_params["color2"] = wrap::CONF->get_elem( "chat.html.user.color2" ); + map_params["status"] = wrap::CONF->get_elem( "chat.defaultrang" ); + } + + sess* p_sess = wrap::SMAN->create_session(); + p_sess->set_user(p_user); + map_params["tmpid"] = p_sess->get_tmpid(); + p_user->set_tmpid( map_params["tmpid"] ); + p_user->set_col1( map_params["color1"] ); + p_user->set_col2( map_params["color2"] ); + p_user->set_status( tool::string2int(map_params["status"])); + // p_user->set_sess( p_sess ); + } + + // Prove if user is the default operator. + if ( tool::to_lower(wrap::CONF->get_elem("chat.defaultop")) == tool::to_lower(s_user) ) + { + wrap::system_message(CHATDOP); + p_user->set_status(0); + } + + string s_room = map_params["room"]; + room* p_room = get_room( s_room , b_flag ); + + // if room does not exist add room to list! + if ( ! b_flag ) + { + p_room = wrap::GCOL->get_room_from_garbage(); + + if ( p_room ) + { + p_room->set_name( s_room ); + wrap::system_message( REUROOM + s_room ); + } + else + { + p_room = new room( s_room ); + wrap::system_message( NEWROOM + s_room ); + } + + add_elem( p_room ); + } + + // add user to the room. + p_room->add_user( p_user ); + + wrap::system_message( NEWUSER + s_user ); + + // post "username enters the chat" into the room. + string s_msg = wrap::TIMR->get_time() + " " + p_user->get_colored_bold_name() + wrap::CONF->get_elem( "chat.msgs.userenterschat" ) + "
\n"; + + // If created a new user from database while logging on (not a recycled user, they already have this set) + if ( map_params["registered"] == "yes" ) + { + p_user->set_email( map_params["email"] ); + p_user->set_pass( map_params["password"] ); + // Now we will store all wanted user data into MySQL after logging out! (recycled user already have this set) + p_user->set_changed_data_on(); + } + p_room->msg_post( &s_msg ); +} + +void +chat::post( user* p_user, hashmap &map_params ) +{ + p_user->renew_timeout(); + + string s_msg( map_params["message"] ); + + if ( s_msg.empty() ) + return; + + int i_max_message_length = tool::string2int(wrap::CONF->get_elem( "chat.maxlength.message" )); + if ( s_msg.length() > i_max_message_length ) + { + s_msg = s_msg.substr( 0, i_max_message_length ); + string s_private = "get_elem( "chat.html.errorcolor" ) + "\">" + + wrap::CONF->get_elem( "chat.msgs.err.messagelength" ) + "
\n"; + p_user->msg_post( &s_private ); + } + + int i_max_word_length = tool::string2int(wrap::CONF->get_elem( "chat.maxlength.word" )); + + // Check max word length + list list_msg = tool::split_string( s_msg, " "); + list::iterator iter = list_msg.begin(); + + for ( s_msg = ""; iter != list_msg.end(); ++iter ) + { + if ( iter->length() > i_max_word_length ) + { + string s_tmp[] = { iter->substr(0, i_max_word_length ), iter->substr(i_max_word_length) }; + iter = list_msg.erase( iter ); + iter = list_msg.insert( iter, s_tmp[1] ); + iter = list_msg.insert( iter, s_tmp[0] ); + --iter; + } + else + { + s_msg.append(*iter + " "); + } + } + + if ( wrap::CONF->get_elem( "chat.html.tagsallow" ) != "true" ) + tool::strip_html( &s_msg ); + + unsigned i_pos = s_msg.find( "/" ); + if ( i_pos == 0 ) + return p_user->command( s_msg ); + + string_replacer(&s_msg); + string s_post; + + if ( wrap::CONF->get_elem( "chat.printalwaystime" ) == "true" ) + s_post.append( wrap::TIMR->get_time() + " " ); + + s_post.append( "get_col1() ) + .append( "\">" ) + .append( p_user->get_name() ) + .append( ": get_col2() ) + .append( "\">" ) + .append( s_msg ) + .append( "
\n" ); + + p_user->get_room()->msg_post( &s_post ); +} + +void +chat::reconf() +{} + +void +chat::string_replacer(string *p_msg) +{ + if ( wrap::CONF->get_elem( "chat.html.replace.activate" ) == "true" ) + { + for (vector::iterator iter = vec_replace_keys.end()-1; + iter != vec_replace_keys.begin(); + iter-- ) + *p_msg = tool::replace( *p_msg, *iter, wrap::CONF->get_elem(map_replace_strings[*iter]) ); + } +} + +#endif diff --git a/ychat-0.7.7.0/src/chat/chat.h b/ychat-0.7.7.0/src/chat/chat.h new file mode 100755 index 0000000..8508508 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/chat.h @@ -0,0 +1,62 @@ +// class chat declaration. + +class chat; + +#ifndef CHAT_H +#define CHAT_H + +#include +#include "../incl.h" +#include "base.h" +#include "perm.h" +#include "room.h" +#include "user.h" +#include "sess.h" +#include "../tool/tool.h" +#include "../maps/hashmap.h" + +using namespace std; + +#undef chat +class chat : public base, public perm +{ +private: + map map_replace_strings; + vector vec_replace_keys; + +public: + virtual room* get_room( string s_name ) + { + bool b_bool; + return get_room( s_name, b_bool ); + } + + virtual room* get_room( string &s_name, bool &b_found ) + { + return static_cast( get_elem( s_name, b_found ) ); + } + + // public methods: + explicit chat(); // a standard constructor. + ~chat(); // destructor. + + // get the object of a specific user. + user* get_user( string &s_nick ); + user* get_user( string &s_nick, bool &b_found ); + static void get_user_( room* room_obj, void *v_arg ); + + // will be called every time a user tries to login. + void login( hashmap &map_params ); + + // will be called if a user posts a message. + void post ( user* u_user, hashmap &map_params ); + + void del_elem( string s_name ) + { + base::del_elem( s_name ); + } + + void reconf(); + void string_replacer(string *p_msg); +}; +#endif diff --git a/ychat-0.7.7.0/src/chat/gcol.cpp b/ychat-0.7.7.0/src/chat/gcol.cpp new file mode 100755 index 0000000..7df111d --- /dev/null +++ b/ychat-0.7.7.0/src/chat/gcol.cpp @@ -0,0 +1,183 @@ +#ifndef GCOL_CPP +#define GCOL_CPP + +#include "gcol.h" + +using namespace std; + +gcol::gcol() +{ + pthread_mutex_init( &mut_vec_rooms , NULL); + + p_map_users = new shashmap; + wrap::system_message( GARBAGE ); + +#ifdef NCURSES + + print_garbage(); +#endif +} + +gcol::~gcol() +{ + remove_garbage(); + pthread_mutex_destroy( &mut_vec_rooms ); + delete p_map_users; +} + +void +gcol::add_room_to_garbage( room* p_room ) +{ + pthread_mutex_lock ( &mut_vec_rooms ); + vec_rooms.push_back( p_room ); + pthread_mutex_unlock( &mut_vec_rooms ); + wrap::system_message( GARROOM + p_room->get_name() ); +#ifdef NCURSES + + print_garbage(); +#endif +} + +void +gcol::add_user_to_garbage( user* p_user ) +{ + p_user->s_mess_delete(); + p_map_users->add_elem( p_user, tool::to_lower(p_user->get_name()) ); + wrap::system_message( GARUSER + p_user->get_name() ); +#ifdef NCURSES + + print_garbage(); +#endif +} + +bool +gcol::remove_garbage() +{ + bool b_empty; + + pthread_mutex_lock ( &mut_vec_rooms ); + b_empty = ( vec_rooms.empty() && p_map_users->size() == 0); + pthread_mutex_unlock( &mut_vec_rooms ); + + if ( b_empty ) + return false; + + wrap::system_message( GARBACT ); + + pthread_mutex_lock ( &mut_vec_rooms ); + for ( vector::iterator iter = vec_rooms.begin(); + iter != vec_rooms.end(); iter++ ) + { + wrap::system_message( REMROOM + (*iter)->get_name() ); + delete *iter; + } + vec_rooms.clear(); + pthread_mutex_unlock( &mut_vec_rooms ); + + + p_map_users->run_func( delete_users_ ); + p_map_users->clear(); + +#ifdef NCURSES + + print_garbage(); +#endif + + return true; +} + +room* +gcol::get_room_from_garbage() +{ + pthread_mutex_lock ( &mut_vec_rooms ); + + if ( vec_rooms.empty() ) + { + pthread_mutex_unlock( &mut_vec_rooms ); + return NULL; + } + + + room* p_room = vec_rooms.back(); + vec_rooms.pop_back(); + pthread_mutex_unlock( &mut_vec_rooms ); + +#ifdef NCURSES + + print_garbage(); +#endif + + return p_room; +} + +room* +gcol::get_room_from_garbage_or_new( string s_room ) +{ + room* p_room = get_room_from_garbage(); + if ( p_room == NULL ) + return new room( s_room ); + p_room->set_name( s_room ); + return p_room; +} + +user* +gcol::get_user_from_garbage( string s_user ) +{ + + user* p_user = p_map_users->get_elem( tool::to_lower(s_user) ); + ; + + if ( p_user != NULL ) + { + p_map_users->del_elem( tool::to_lower(s_user) ); + p_user->set_name( s_user ); + p_user->set_online( true ); + p_user->set_invisible( false ); + p_user->renew_timeout(); + wrap::system_message(GARUSE2 + p_user->get_name() ); +#ifdef NCURSES + + print_garbage(); +#endif + + } + + return p_user; +} + +void +gcol::delete_users_( user *user_obj ) +{ + wrap::system_message( REMUSER + user_obj->get_name() ); + user_obj->clean(); + delete user_obj; +} + +void +gcol::lock_mutex() +{ + pthread_mutex_lock ( &mut_vec_rooms ); +} + +void +gcol::unlock_mutex() +{ + pthread_mutex_unlock ( &mut_vec_rooms ); +} + +#ifdef NCURSES +void +gcol::print_garbage( ) +{ + if ( wrap::NCUR->is_ready() ) + { + pthread_mutex_lock ( &mut_vec_rooms ); + mvprintw( NCUR_GARBAGE_X,NCUR_GARBAGE_Y, "Garbage: %d ", p_map_users->size() + vec_rooms.size() ); + pthread_mutex_unlock( &mut_vec_rooms ); + refresh(); + } +} + +#endif + +#endif diff --git a/ychat-0.7.7.0/src/chat/gcol.h b/ychat-0.7.7.0/src/chat/gcol.h new file mode 100755 index 0000000..d1fcde3 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/gcol.h @@ -0,0 +1,43 @@ +// garbage collector +#include "../incl.h" + +#ifndef GCOL_H +#define GCOL_H + +#include +#include "room.h" +#include "user.h" +#include "../maps/shashmap.h" + +using namespace std; + +class gcol +{ +private: + vector vec_rooms; + shashmap* p_map_users; + + pthread_mutex_t mut_vec_rooms; + + static void delete_users_( user* user_obj ); + +#ifdef NCURSES + + void print_garbage( ); +#endif + +public: + gcol(); + ~gcol(); + + bool remove_garbage(); + void add_room_to_garbage( room* p_room ); + void add_user_to_garbage( user* p_user ); + virtual room* get_room_from_garbage(); + virtual room* get_room_from_garbage_or_new( string s_room ); + user* get_user_from_garbage( string s_user ); + virtual void lock_mutex(); + virtual void unlock_mutex(); +}; + +#endif diff --git a/ychat-0.7.7.0/src/chat/perm.cpp b/ychat-0.7.7.0/src/chat/perm.cpp new file mode 100755 index 0000000..2de3031 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/perm.cpp @@ -0,0 +1,83 @@ +#ifndef PERM_CPP +#define PERM_CPP + +#include "perm.h" +#include "../maps/mtools.h" + +using namespace std; + +perm::perm() +{ + p_command_status = new shashmap< valwrap* >; + p_command_disabled = new shashmap< valwrap* >; + + set_standard_command_permissions(); +} + +perm::~perm() +{ + p_command_status->run_func( &mtools< valwrap* >::delete_obj ); + p_command_disabled->run_func( &mtools< valwrap* >::delete_obj ); + + delete p_command_status; + delete p_command_disabled; +} + +int +perm::get_command_status( string s_command ) +{ + if ( p_command_status->exists( s_command ) ) + return p_command_status->get_elem( s_command )->val; + + return 0; +} + +void +perm::set_command_status( string s_command, int i_int ) +{ + valwrap* p_val = p_command_status->get_set_elem( new valwrap(i_int), s_command ); + + if ( p_val ) + delete p_val; +} + +bool +perm::get_command_disabled( string s_command ) +{ + if ( p_command_disabled->exists( s_command ) ) + return p_command_disabled->get_elem( s_command )->val; + return 0; +} + +void +perm::set_command_disabled( string s_command, bool b_bool ) +{ + valwrap* p_val = p_command_disabled->get_set_elem( new valwrap(b_bool), s_command ); + + if ( p_val ) + delete p_val; +} + +void +perm::set_standard_command_permissions() +{ + wrap::system_message(PERMSTD); + + vector* p_vec_keys = wrap::CONF->get_key_vector(); + + for (vector::iterator iter = p_vec_keys-> + begin(); + iter != p_vec_keys->end(); + iter++ ) + { + if ( iter->length() > 17 && iter->compare( 0, 16, "chat.permissions" ) == 0 ) + { + valwrap* p_val = new valwrap( tool::string2int( wrap::CONF->get_elem(*iter) ) ); + p_command_status->add_elem( p_val, iter->substr(17) ); + } + } + + delete p_vec_keys; +} + +#endif diff --git a/ychat-0.7.7.0/src/chat/perm.h b/ychat-0.7.7.0/src/chat/perm.h new file mode 100755 index 0000000..fca019f --- /dev/null +++ b/ychat-0.7.7.0/src/chat/perm.h @@ -0,0 +1,42 @@ +#include "../incl.h" +#include "../maps/shashmap.h" + +#ifndef PERM_H +#define PERM_H + +using namespace std; + +template +struct valwrap +{ + type_ val; + valwrap(type_ i) + { + val = i; + } + + type_ get_val() + { + return val; + } +}; + +class perm +{ +private: + shashmap< valwrap* >* p_command_status; + shashmap< valwrap* >* p_command_disabled; + + void set_standard_command_permissions(); + +public: + perm( ); + ~perm( ); + + virtual int get_command_status( string s_command ); + virtual bool get_command_disabled( string s_command ); + virtual void set_command_status( string s_command, int i_int ); + virtual void set_command_disabled( string s_command, bool b_bool ); +}; + +#endif diff --git a/ychat-0.7.7.0/src/chat/room.cpp b/ychat-0.7.7.0/src/chat/room.cpp new file mode 100755 index 0000000..00dc463 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/room.cpp @@ -0,0 +1,105 @@ +#ifndef ROOM_CPP +#define ROOM_CPP + +#include "room.h" +#include "../maps/mtools.h" + +using namespace std; + +room::room( string s_name ) : name( s_name ) +{ + pthread_mutex_init( &mut_s_topic, NULL ); +#ifdef LOGGING + + p_logd = new logd( wrap::CONF->get_elem("chat.logging.roomlogdir") + get_lowercase_name(), + wrap::CONF->get_elem("chat.logging.roomloglines") ); +#endif + + wrap::STAT->increment_num_rooms(); +} + +room::~room() +{ + wrap::STAT->decrement_num_rooms(); + + // Delete all user objects + run_func( mtools::delete_obj ); + +#ifdef LOGGING + + delete p_logd; +#endif + + pthread_mutex_destroy( &mut_s_topic ); + pthread_mutex_destroy( &mut_s_name ); +} + +string +room::get_topic() +{ + string s_ret; + pthread_mutex_lock ( &mut_s_topic ); + s_ret = s_topic; + pthread_mutex_unlock( &mut_s_topic ); + return s_ret; +} + +void +room::set_topic( string s_topic ) +{ + pthread_mutex_lock ( &mut_s_topic ); + if ( s_topic == "" ) + this->s_topic = ""; + else + this->s_topic = s_topic + "

"; + pthread_mutex_unlock( &mut_s_topic ); + reload_onlineframe(); +} + +void +room::set_topic( string s_topic, string s_color ) +{ + set_topic( "" + s_topic + ""); +} + +void +room::clean_room() +{ + pthread_mutex_lock ( &mut_s_topic ); + this->s_topic = ""; + pthread_mutex_unlock( &mut_s_topic ); + wrap::CHAT->del_elem( get_lowercase_name() ); + wrap::GCOL->add_room_to_garbage( this ); +} + +void +room::reload_onlineframe() +{ + string s_msg = "\n"; + msg_post( &s_msg ); +} + +void +room::set_name( string s_name ) +{ + if ( tool::to_lower(s_name) == get_lowercase_name() ) + { + name::set_name( s_name ); + return; + } + +#ifdef LOGGING + p_logd->flush_logs(); +#endif + + if ( s_name == "" ) + return; + + name::set_name( s_name ); +#ifdef LOGGING + + p_logd->set_logfile( wrap::CONF->get_elem("chat.logging.roomlogdir"), get_lowercase_name() ); +#endif +} + +#endif diff --git a/ychat-0.7.7.0/src/chat/room.h b/ychat-0.7.7.0/src/chat/room.h new file mode 100755 index 0000000..572e68b --- /dev/null +++ b/ychat-0.7.7.0/src/chat/room.h @@ -0,0 +1,84 @@ +// class room declaration. + +#include "../incl.h" +#include "../wrap.h" + +#ifndef ROOM_H +#define ROOM_H + +#include "base.h" +#include "../name.h" +#include "user.h" +#include "../tool/tool.h" +#include "../logd.h" + +using namespace std; + +class room : public base, public name +{ +private: + string s_topic; + pthread_mutex_t mut_s_topic; +#ifdef LOGGING + + logd* p_logd; +#endif + +public: + room( string s_name ); + ~room(); + + virtual void reload_onlineframe(); + + void add_user( user* p_user ) + { + add_elem( p_user ); + p_user->set_p_room( this ); + reload_onlineframe(); + } + + user* get_user( string &s_name, bool &b_found ) + { + return static_cast( get_elem( s_name, b_found ) ); + } + + void del_elem( string &s_name ) + { + base::del_elem( s_name ); + + if ( base::size() == 0 ) + clean_room(); + + else + reload_onlineframe(); + } + + void msg_post( string s_msg ) + { + msg_post( &s_msg ); + } + void msg_post( string *p_msg ) + { +#ifdef LOGGING + p_logd->log_simple_line( logd::remove_html_tags(*p_msg) ); +#endif + + base::msg_post( p_msg ); + } + + string get_bold_name() + { + return "" + get_name() + ""; + } + + virtual void set_name( string s_name ); + string get_topic(); + void set_topic( string s_topic ); + void set_topic( string s_topic, string s_color ); + void clean_room(); + + + +}; + +#endif diff --git a/ychat-0.7.7.0/src/chat/sess.cpp b/ychat-0.7.7.0/src/chat/sess.cpp new file mode 100755 index 0000000..dc9ba9b --- /dev/null +++ b/ychat-0.7.7.0/src/chat/sess.cpp @@ -0,0 +1,56 @@ +#ifndef SESS_CPP +#define SESS_CPP + +#include "sess.h" + +sess::sess( string s_tmpid ) +{ + this->p_user = NULL; + this->s_tmpid = s_tmpid; +} + +sess::~sess() +{} + +string +sess::get_tmpid() +{ + return s_tmpid; +} + +string +sess::get_name() +{ + if ( p_user = NULL ) + return ""; + + return p_user->get_name(); +} + +void +sess::set_name(string s_name) +{ + if ( p_user != NULL ) + p_user->set_name(s_name); +} + +user* +sess::get_user() +{ + return p_user; +} + +void +sess::set_user(user* p_user) +{ + this->p_user = p_user; +} + + +void +sess::invalidate() +{ + this->s_tmpid = "0"; +} + +#endif diff --git a/ychat-0.7.7.0/src/chat/sess.h b/ychat-0.7.7.0/src/chat/sess.h new file mode 100755 index 0000000..17d9cfe --- /dev/null +++ b/ychat-0.7.7.0/src/chat/sess.h @@ -0,0 +1,31 @@ +#include "../incl.h" + +#ifndef SESS_H +#define SESS_H + +#include +#include "user.h" + +class cont; + +using namespace std; + +class sess +{ +private: + string s_tmpid; + user *p_user; + +public: + sess(string s_tmpid); + ~sess(); + + string get_tmpid(); + + void set_user(user* p_user); + user* get_user(); + void set_name(string s_name); + string get_name(); + void invalidate(); +}; +#endif diff --git a/ychat-0.7.7.0/src/chat/sman.cpp b/ychat-0.7.7.0/src/chat/sman.cpp new file mode 100755 index 0000000..d80d421 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/sman.cpp @@ -0,0 +1,119 @@ +#ifndef SMAN_CPP +#define SMAN_CPP + +#include "sman.h" +#include "../tool/tool.h" +#include "../maps/mtools.h" +#include "../contrib/crypt/md5.h" + +sman::sman() +{ + i_session_count = 0; + pthread_mutex_init( &mut_i_session_count, NULL ); +} + +sman::~sman() +{ + // Delete each session object of the shashmap! + shashmap::run_func( mtools::delete_obj ); + pthread_mutex_destroy( &mut_i_session_count ); +} + +string sman::generate_id( int i_len ) +{ + string valid_chars = wrap::CONF->get_elem("chat.session.validchars"); + string s_ret = ""; + + srand(time(0)+tool::string2int(wrap::CONF->get_elem("chat.session.kloakkey"))); + int i_char; + + for (int i = 0; i < i_len; i++) + { + i_char = rand() % 64; + s_ret += valid_chars[i_char]; + } + + if ( wrap::CONF->get_elem("chat.session.md5hash") == "true" ) + { + string s_salt = wrap::CONF->get_elem("chat.session.md5salt"); + s_ret = string(md5::MD5Crypt(s_ret.c_str(), s_salt.c_str())); + return s_ret.substr(s_ret.find(s_salt) + s_salt.length() + 3); + } + + return s_ret; +} + +sess *sman::create_session( ) +{ + string s_tmpid = generate_id( tool::string2int( wrap::CONF->get_elem( "chat.session.length" ) ) ); + + sess* p_sess = new sess( s_tmpid ); + + pthread_mutex_lock( &mut_i_session_count ); + i_session_count++; +#ifdef NCURSES + + print_sessions(); +#endif + + pthread_mutex_unlock( &mut_i_session_count ); + + //???? + add_elem( p_sess, s_tmpid ); + + return p_sess; +} + +sess *sman::get_session( string s_id ) +{ + return get_elem( s_id ); +} + +void +sman::destroy_session( string s_id ) +{ + pthread_mutex_lock( &mut_i_session_count ); + i_session_count--; +#ifdef NCURSES + + print_sessions(); +#endif + + pthread_mutex_unlock( &mut_i_session_count ); + + sess* p_sess = get_elem( s_id ); + del_elem( s_id ); + delete p_sess; +} + +#ifdef NCURSES +void sman::print_sessions() +{ + if ( wrap::NCUR->is_ready() ) + { + mvprintw( NCUR_SESSION_X,NCUR_SESSION_Y, "Sessions: %d ", i_session_count); + refresh(); + } +} + +#ifdef NCURSES +void sman::print_init_ncurses() +{ + pthread_mutex_lock( &mut_i_session_count ); + print_sessions(); + pthread_mutex_unlock( &mut_i_session_count ); +} +#endif + +int +sman::get_session_count() +{ + int i_ret; + pthread_mutex_lock( &mut_i_session_count ); + i_ret = i_session_count; + pthread_mutex_unlock( &mut_i_session_count ); + return i_ret; +} + +#endif +#endif diff --git a/ychat-0.7.7.0/src/chat/sman.h b/ychat-0.7.7.0/src/chat/sman.h new file mode 100755 index 0000000..992fc64 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/sman.h @@ -0,0 +1,41 @@ +#include "../incl.h" + +#ifndef SMAN_H +#define SMAN_H + +#include + +#include "sess.h" +#include "../maps/shashmap.h" + +using namespace std; + +class sman : private shashmap +{ +private: + string generate_id( int i_len ); + int i_session_count; + + pthread_mutex_t mut_i_session_count; +#ifdef NCURSES + + void print_sessions(); +#endif + +public: + sman(); + ~sman(); + sess *get_session( string s_tmpid ); + int get_session_count( ); + sess *create_session( ); + void destroy_session( string s_tmpid ); +#ifdef NCURSES + + void print_init_ncurses(); +#endif + +}; + + +#endif + diff --git a/ychat-0.7.7.0/src/chat/user.cpp b/ychat-0.7.7.0/src/chat/user.cpp new file mode 100755 index 0000000..c5699e2 --- /dev/null +++ b/ychat-0.7.7.0/src/chat/user.cpp @@ -0,0 +1,580 @@ +#ifndef USER_CPP +#define USER_CPP + +#include "user.h" +#include "../tool/tool.h" + +using namespace std; + +user::user() : name( "" ) +{ + initialize(); +} + +user::user( string s_name ) : name( s_name ) +{ + initialize(); +} + +user::~user() +{ + // pthread_mutex_destroy( & mut_map_mods ); + pthread_mutex_destroy( & mut_away ); + pthread_mutex_destroy( & mut_b_online ); + pthread_mutex_destroy( & mut_b_fake ); + pthread_mutex_destroy( & mut_b_invisible ); + pthread_mutex_destroy( & mut_b_has_sess ); + pthread_mutex_destroy( & mut_b_is_reg ); + pthread_mutex_destroy( & mut_s_mess ); + pthread_mutex_destroy( & mut_s_pass ); + pthread_mutex_destroy( & mut_p_room ); + pthread_mutex_destroy( & mut_s_col1 ); + pthread_mutex_destroy( & mut_s_col2 ); + pthread_mutex_destroy( & mut_s_email ); + pthread_mutex_destroy( & mut_s_tmpid ); + pthread_mutex_destroy( & mut_i_status ); + pthread_mutex_destroy( & mut_map_changed_data ); + pthread_cond_destroy ( &cond_message ); + pthread_mutex_destroy( &mut_message ); +} + +void +user::initialize() +{ + this -> b_is_reg = false; + this -> b_set_changed_data = false; + this -> b_away = false; + this -> b_fake = false; + this -> b_invisible = false; + this -> s_col1 = wrap::CONF->get_elem( "chat.html.user.color1" ); + this -> s_col2 = wrap::CONF->get_elem( "chat.html.user.color2" ); + + // pthread_mutex_init( & mut_map_mods , NULL ); + pthread_mutex_init( & mut_away , NULL ); + pthread_mutex_init( & mut_b_online , NULL ); + pthread_mutex_init( & mut_b_fake , NULL ); + pthread_mutex_init( & mut_b_invisible , NULL ); + pthread_mutex_init( & mut_b_has_sess , NULL ); + pthread_mutex_init( & mut_b_is_reg , NULL ); + pthread_mutex_init( & mut_s_mess , NULL ); + pthread_mutex_init( & mut_s_pass , NULL ); + pthread_mutex_init( & mut_p_room , NULL ); + pthread_mutex_init( & mut_s_col1 , NULL ); + pthread_mutex_init( & mut_s_col2 , NULL ); + pthread_mutex_init( & mut_s_email , NULL ); + pthread_mutex_init( & mut_s_tmpid , NULL ); + pthread_mutex_init( & mut_i_status , NULL ); + pthread_mutex_init( & mut_map_changed_data , NULL ); + pthread_cond_init ( &cond_message, NULL); + pthread_mutex_init( &mut_message , NULL); + renew_timeout(); +} + +void +user::clean() +{ + + // 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 ); +#endif + + 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 +user::get_colored_name() +{ + return "" + get_name() + ""; +} + +void +user::get_data( map *p_map_data ) +{ + string s_req = (*p_map_data)["!get"]; + + // get the nick and the color of the user. + if ( s_req == "nick" ) + (*p_map_data)[get_name()] = get_col1(); +} + +string +user::get_mess( ) +{ + pthread_mutex_lock ( &mut_s_mess ); + string s_ret = s_mess; + s_mess = ""; + pthread_mutex_unlock( &mut_s_mess ); + return s_ret; +} + +bool +user::get_online( ) +{ + bool b_ret; + pthread_mutex_lock ( &mut_b_online ); + b_ret = b_online; + pthread_mutex_unlock( &mut_b_online ); + return b_ret; +} +bool +user::get_fake( ) +{ + bool b_ret; + pthread_mutex_lock ( &mut_b_fake ); + b_ret = b_fake; + pthread_mutex_unlock( &mut_b_fake ); + return b_ret; +} +bool +user::get_invisible( ) +{ + bool b_ret; + pthread_mutex_lock ( &mut_b_invisible ); + b_ret = b_invisible; + pthread_mutex_unlock( &mut_b_invisible ); + return b_ret; +} + +bool +user::get_has_sess( ) +{ + bool b_ret; + pthread_mutex_lock ( &mut_b_has_sess ); + b_ret = b_has_sess; + pthread_mutex_unlock( &mut_b_has_sess ); + return b_ret; +} + +void +user::set_has_sess( bool b_has_sess ) +{ + pthread_mutex_lock ( &mut_b_has_sess ); + this->b_has_sess = b_has_sess; + pthread_mutex_unlock( &mut_b_has_sess ); +} + +bool +user::get_is_reg( ) +{ + bool b_ret; + b_ret = b_is_reg; + return b_ret; +} + +void +user::set_is_reg( bool b_is_reg ) +{ + this -> b_is_reg = b_is_reg; +} + +void +user::set_online( bool b_online ) +{ + pthread_mutex_lock ( &mut_b_online ); + this -> b_online = b_online; + pthread_mutex_unlock( &mut_b_online ); +} + +void +user::set_fake( bool b_fake ) +{ + pthread_mutex_lock ( &mut_b_fake ); + this -> b_fake = b_fake; + pthread_mutex_unlock( &mut_b_fake ); +} + +void +user::set_invisible( bool b_invisible ) +{ + pthread_mutex_lock ( &mut_b_invisible ); + this -> b_invisible = b_invisible; + pthread_mutex_unlock( &mut_b_invisible ); +} + +bool +user::get_away() +{ + bool b_ret; + pthread_mutex_lock ( &mut_away ); + b_ret = b_away; + pthread_mutex_unlock( &mut_away ); + return b_ret; +} + +string +user::get_away_msg() +{ + string s_ret; + pthread_mutex_lock ( &mut_away ); + s_ret = s_away; + pthread_mutex_unlock( &mut_away ); + return s_ret; +} + +void +user::set_away( bool b_away, string s_away ) +{ + pthread_mutex_lock ( &mut_away ); + this -> b_away = b_away; + this -> s_away = s_away; + pthread_mutex_unlock( &mut_away ); +} + +void +user::set_away( bool b_away ) +{ + pthread_mutex_lock ( &mut_away ); + this -> b_away = b_away; + pthread_mutex_unlock( &mut_away ); +} + +room* +user::get_room( ) +{ + room* p_return; + pthread_mutex_lock ( &mut_p_room ); + p_return = p_room; + pthread_mutex_unlock( &mut_p_room ); + return p_return; +} + +void +user::set_p_room( room* p_room ) +{ + pthread_mutex_lock ( &mut_p_room ); + this -> p_room = p_room; + pthread_mutex_unlock( &mut_p_room ); +} + +string +user::get_pass() +{ + string s_ret; + pthread_mutex_lock ( &mut_s_pass ); + s_ret = s_pass; + pthread_mut