diff options
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h index 73e1a1173..b747669c9 100644 --- a/include/users.h +++ b/include/users.h @@ -184,12 +184,21 @@ class userrec : public connection */ std::string recvq; + /** User's send queue. + * Lines waiting to be sent are stored here until their buffer is flushed. + */ + std::string sendq; + /** Flood counters */ long lines_in; time_t reset_due; long threshold; + /* Write error string + */ + std::string WriteError; + userrec(); virtual ~userrec() { } @@ -253,7 +262,22 @@ class userrec : public connection * it is ok to read the buffer before calling GetBuffer(). */ std::string GetBuffer(); - + + /** Sets the write error for a connection. This is done because the actual disconnect + * of a client may occur at an inopportune time such as half way through /LIST output. + * The WriteErrors of clients are checked at a more ideal time (in the mainloop) and + * errored clients purged. + */ + void SetWriteError(std::string error); + + /** Returns the write error which last occured on this connection or an empty string + * if none occured. + */ + std::string GetWriteError(); + + void AddWriteBuf(std::string data); + void FlushWriteBuf(); + }; |