diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-19 18:24:07 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-19 18:24:07 +0000 |
commit | 8ed63fe681c5dbd1f3993b8b8e3ef7a7e9ef0fc8 (patch) | |
tree | 9e32a7ac804850b4f2035bc9ac55a262a7992db7 /include | |
parent | 066e5ca3665835e50dddaaf612212ffb94c68a85 (diff) |
Make the check against z/k/q/e/g methods return a pointer to the whole object rather than just the reason string
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5305 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/xline.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/xline.h b/include/xline.h index 8c18ab37e..daefe8a1e 100644 --- a/include/xline.h +++ b/include/xline.h @@ -42,6 +42,7 @@ class XLine : public classbase { source = strdup(src); reason = strdup(re); + expiry = set_time + duration; } virtual ~XLine() @@ -64,6 +65,10 @@ class XLine : public classbase /** Reason for the ban */ char* reason; + + /** Expiry time + */ + time_t expiry; }; /** KLine class @@ -342,31 +347,31 @@ class XLineManager * @return nick The nick to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - char* matches_qline(const char* nick); + QLine* matches_qline(const char* nick); /** Check if a hostname matches a GLine * @param user The user to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - char* matches_gline(userrec* user); + GLine* matches_gline(userrec* user); /** Check if a IP matches a ZLine * @param ipaddr The IP to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - char* matches_zline(const char* ipaddr); + ZLine* matches_zline(const char* ipaddr); /** Check if a hostname matches a KLine * @param user The user to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - char* matches_kline(userrec* user); + KLine* matches_kline(userrec* user); /** Check if a hostname matches a ELine * @param user The user to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - char* matches_exception(userrec* user); + ELine* matches_exception(userrec* user); /** Expire any pending non-permenant lines */ |