summaryrefslogtreecommitdiffstats
path: root/src/user.cpp
diff options
context:
space:
mode:
authorErik Andersson <erik@packy.se>2016-11-22 23:56:43 +0100
committerErik Andersson <erik@packy.se>2016-11-22 23:56:43 +0100
commit41954fffc10bfd230f857f57c6871b412d5f2e91 (patch)
tree010bcf28f294a58b4a22b7276cf615758648bcbe /src/user.cpp
parented374a8dbcdaaf273964293d2805bdd61b148022 (diff)
downloadocelot-master.zip
ocelot-master.tar.gz
ocelot-master.tar.bz2
Ocelot v1.0HEADv1.0master
Diffstat (limited to 'src/user.cpp')
-rw-r--r--src/user.cpp47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/user.cpp b/src/user.cpp
index 6ca156b..d2b606b 100644
--- a/src/user.cpp
+++ b/src/user.cpp
@@ -1,51 +1,6 @@
#include "user.h"
-user::user(int uid, bool leech, bool protect) : id(uid), leechstatus(leech), protect_ip(protect) {
+user::user(userid_t uid, bool leech, bool protect) : id(uid), deleted(false), leechstatus(leech), protect_ip(protect) {
stats.leeching = 0;
stats.seeding = 0;
}
-
-int user::get_id() {
- return id;
-}
-
-bool user::is_protected() {
- return protect_ip;
-}
-
-void user::set_protected(bool status) {
- protect_ip = status;
-}
-
-bool user::can_leech() {
- return leechstatus;
-}
-
-void user::set_leechstatus(bool status) {
- leechstatus = status;
-}
-
-// Stats methods
-unsigned int user::get_leeching() {
- return stats.leeching;
-}
-
-unsigned int user::get_seeding() {
- return stats.seeding;
-}
-
-void user::decr_leeching() {
- stats.leeching--;
-}
-
-void user::decr_seeding() {
- stats.seeding--;
-}
-
-void user::incr_leeching() {
- stats.leeching++;
-}
-
-void user::incr_seeding() {
- stats.seeding++;
-}