X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fusers.h;h=0fa51268d7bd191869412a461d53e1512730a0ef;hb=001861f5d2aca21531b0a20a46e44654a45a5522;hp=a12282ac92050b3e1a61556150348d5039432f32;hpb=743c10e4ca5acd45e670b335a07b5bf3ab754ab6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/users.h b/include/users.h index a12282ac9..0fa51268d 100644 --- a/include/users.h +++ b/include/users.h @@ -458,12 +458,16 @@ class CoreExport User : public connection std::map* AllowedOperCommands; /** Allowed user modes from oper classes. */ - bool AllowedUserModes[64]; + bool* AllowedUserModes; /** Allowed channel modes from oper classes. */ - bool AllowedChanModes[64]; + bool* AllowedChanModes; public: + /** Module responsible for raw i/o + */ + Module* io; + /** Contains a pointer to the connect class a user is on from - this will be NULL for remote connections. * The pointer is guarenteed to *always* be valid. :) */ @@ -552,6 +556,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. @@ -927,7 +936,7 @@ class CoreExport User : public connection * @param text The format string for text to send to the user * @param ... POD-type format arguments */ - void Write(const char *text, ...); + void Write(const char *text, ...) CUSTOM_PRINTF(2, 3); /** Write text to this user, appending CR/LF and prepending :server.name * @param text A std::string to send to the user @@ -938,9 +947,9 @@ class CoreExport User : public connection * @param text The format string for text to send to the user * @param ... POD-type format arguments */ - void WriteServ(const char* text, ...); + void WriteServ(const char* text, ...) CUSTOM_PRINTF(2, 3); - void WriteNumeric(unsigned int numeric, const char* text, ...); + void WriteNumeric(unsigned int numeric, const char* text, ...) CUSTOM_PRINTF(3, 4); void WriteNumeric(unsigned int numeric, const std::string &text); @@ -955,7 +964,7 @@ class CoreExport User : public connection * @param text The format string for text to send to the user * @param ... POD-type format arguments */ - void WriteFrom(User *user, const char* text, ...); + void WriteFrom(User *user, const char* text, ...) CUSTOM_PRINTF(3, 4); /** Write text to the user provided in the first parameter, appending CR/LF, and prepending THIS user's :nick!user@host. * @param dest The user to route the message to @@ -968,7 +977,7 @@ class CoreExport User : public connection * @param text The format string for text to send to the user * @param ... POD-type format arguments */ - void WriteTo(User *dest, const char *data, ...); + void WriteTo(User *dest, const char *data, ...) CUSTOM_PRINTF(3, 4); /** Write to all users that can see this user (including this user in the list), appending CR/LF * @param text A std::string to send to the users @@ -979,13 +988,13 @@ class CoreExport User : public connection * @param text The format string for text to send to the users * @param ... POD-type format arguments */ - void WriteCommon(const char* text, ...); + void WriteCommon(const char* text, ...) CUSTOM_PRINTF(2, 3); /** Write to all users that can see this user (not including this user in the list), appending CR/LF * @param text The format string for text to send to the users * @param ... POD-type format arguments */ - void WriteCommonExcept(const char* text, ...); + void WriteCommonExcept(const char* text, ...) CUSTOM_PRINTF(2, 3); /** Write to all users that can see this user (not including this user in the list), appending CR/LF * @param text A std::string to send to the users @@ -1004,7 +1013,7 @@ class CoreExport User : public connection * @param text The format string to send in the WALLOPS message * @param ... Format arguments */ - void WriteWallOps(const char* text, ...); + void WriteWallOps(const char* text, ...) CUSTOM_PRINTF(2, 3); /** Write a WALLOPS message from this user to all local opers. * If this user is not opered, the function will return without doing anything. @@ -1054,7 +1063,7 @@ class CoreExport User : public connection * @param text The text format string to send * @param ... Format arguments */ - void SendAll(const char* command, const char* text, ...); + void SendAll(const char* command, const char* text, ...) CUSTOM_PRINTF(3, 4); /** Compile a channel list for this user, and send it to the user 'source' * Used internally by WHOIS