diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-11 21:54:47 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-11 21:54:47 +0000 |
commit | 70246812d3304b7c0ce81e7708c0fd98438ccd49 (patch) | |
tree | 7e9940199475343bd718fdb3a51577eddadbc3a5 /include/users.h | |
parent | 275d48551c78d4c8253ef6b8c40dda09baec56d6 (diff) |
Added basic sendq stuff - WARNING, there is no configuration yet, this CVS allows sendq's to grow INFINITELY
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1361 e03df62e-2008-0410-955e-edbf42e46eb7
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(); + }; |