X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=229edcfa2564aea295979c9f8c966d3fbbc24bc7;hb=8c2d96013084de950e3a63be4ae6ed626c4093ab;hp=29db518b799a78460300a4e8f089e50d7ea0e525;hpb=58385dd458e927994957b6d603f7f9da3fc52e14;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index 29db518b7..229edcfa2 100644 --- a/include/users.h +++ b/include/users.h @@ -239,6 +239,12 @@ public: this->limit = llimit; } + void Update(const std::string &n, const std::string &hst) + { + name = n; + host = hst; + } + /** Reference counter. Contains an int as to how many users are connected to this class. :) * This will be 0 if no users are connected. If a is removed from the config, and there * are 0 users on it - it will go away in RAM. :) @@ -556,6 +562,11 @@ class CoreExport User : public connection */ char awaymsg[MAXAWAY+1]; + /** Time the user last went away. + * This is ONLY RELIABLE if user IS_AWAY()! + */ + time_t awaytime; + /** Timestamp of current time + connection class timeout. * This user must send USER/NICK before this timestamp is * reached or they will be disconnected. @@ -648,7 +659,7 @@ class CoreExport User : public connection /** Get IP string from sockaddr, using static internal buffer * @return The IP string */ - const char* GetIPString(); + const char* GetIPString(bool translate4in6 = true); /* Write error string */ @@ -678,6 +689,10 @@ class CoreExport User : public connection */ User(InspIRCd* Instance, const std::string &uid = ""); + /** Check if the user matches a G or K line, and disconnect them if they do + */ + void CheckLines(); + /** Returns the full displayed host of the user * This member function returns the hostname of the user as seen by other users * on the server, in nick!ident&at;host form. @@ -873,14 +888,6 @@ class CoreExport User : public connection */ void CloseSocket(); - /** Disconnect a user gracefully - * @param user The user to remove - * @param r The quit reason to show to normal users - * @param oreason The quit reason to show to opers - * @return Although this function has no return type, on exit the user provided will no longer exist. - */ - static void QuitUser(InspIRCd* Instance, User *user, const std::string &r, const char* oreason = ""); - /** Add the user to WHOWAS system */ void AddToWhoWas();