InspIRCd  2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations
Public Member Functions | Public Attributes | List of all members
GLine Class Reference

#include <xline.h>

Inheritance diagram for GLine:
XLine classbase

Public Member Functions

 GLine (time_t s_time, long d, std::string src, std::string re, std::string ident, std::string host)
 
 ~GLine ()
 
virtual bool Matches (User *u)
 
virtual bool Matches (const std::string &str)
 
virtual void Apply (User *u)
 
virtual void DisplayExpiry ()
 
virtual const char * Displayable ()
 
- Public Member Functions inherited from XLine
 XLine (time_t s_time, long d, std::string src, std::string re, const std::string &t)
 
virtual ~XLine ()
 
virtual void SetCreateTime (time_t created)
 
virtual void Unset ()
 
virtual void OnAdd ()
 
virtual bool IsBurstable ()
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

std::string identmask
 
std::string hostmask
 
std::string matchtext
 
- Public Attributes inherited from XLine
time_t set_time
 
long duration
 
std::string source
 
std::string reason
 
time_t expiry
 
const std::string type
 

Additional Inherited Members

- Protected Member Functions inherited from XLine
void DefaultApply (User *u, const std::string &line, bool bancache)
 

Detailed Description

GLine class

Constructor & Destructor Documentation

GLine::GLine ( time_t  s_time,
long  d,
std::string  src,
std::string  re,
std::string  ident,
std::string  host 
)
inline

Create a G-Line.

Parameters
s_timeThe set time
dThe duration of the xline
srcThe sender of the xline
reThe reason of the xline
identIdent to match
hostHost to match
GLine::~GLine ( )
inline

Destructor

Member Function Documentation

void GLine::Apply ( User u)
virtual

Apply a line against a user. The mechanics of what occurs when the line is applied are specific to the derived class.

Parameters
uThe user to apply against

Reimplemented from XLine.

const char * GLine::Displayable ( )
virtual

Returns the displayable form of the pattern for this xline, e.g. '*@foo' or 'baz'. This must always return the full pattern in a form which can be used to construct an entire derived xline, even if it is stored differently internally (e.g. GLine stores the ident and host parts seperately but will still return ident@host for its Displayable() method)

Implements XLine.

void GLine::DisplayExpiry ( )
virtual

Called when the expiry message is to be displayed for the line. Usually a line in the form 'expiring Xline blah, set by...' see the DisplayExpiry methods of GLine, ELine etc.

Implements XLine.

bool GLine::Matches ( User u)
virtual

Returns true whether or not the given user is covered by this line.

Parameters
uThe user to match against. The mechanics of the match are defined by the derived class.
Returns
True if there is a match.

Implements XLine.

bool GLine::Matches ( const std::string &  str)
virtual

Returns true whether or not the given string is covered by this line.

Parameters
strThe string to match against. The details of what must be in this string and the mechanics of the match are defined by the derived class.
Returns
True if there is a match

Implements XLine.

Member Data Documentation

std::string GLine::hostmask

Host mask (host part only)

std::string GLine::identmask

Ident mask (ident part only)


The documentation for this class was generated from the following files: