diff options
Diffstat (limited to 'src/user.cpp')
-rw-r--r-- | src/user.cpp | 47 |
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++; -} |