InspIRCd  3.0
Public Member Functions | Public Attributes | List of all members
ZLine Class Reference

#include <xline.h>

Inheritance diagram for ZLine:
XLine classbase

Public Member Functions

 ZLine (time_t s_time, long d, std::string src, std::string re, std::string ip)
 
 ~ZLine ()
 
virtual bool Matches (User *u)
 
virtual bool Matches (const std::string &str)
 
virtual void Apply (User *u)
 
virtual const std::string & 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 DisplayExpiry ()
 
virtual void OnAdd ()
 
virtual bool IsBurstable ()
 
- Public Member Functions inherited from classbase
virtual CullResult cull ()
 

Public Attributes

std::string ipaddr
 
- 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

ZLine class

Constructor & Destructor Documentation

◆ ZLine()

ZLine::ZLine ( time_t  s_time,
long  d,
std::string  src,
std::string  re,
std::string  ip 
)
inline

Create a Z-Line.

Parameters
s_timeThe set time
dThe duration of the xline
srcThe sender of the xline
reThe reason of the xline
ipIP to match

◆ ~ZLine()

ZLine::~ZLine ( )
inline

Destructor

Member Function Documentation

◆ Apply()

void ZLine::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.

◆ Displayable()

const std::string & ZLine::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 [email protected] for its Displayable() method).

Implements XLine.

◆ Matches() [1/2]

bool ZLine::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.

◆ Matches() [2/2]

bool ZLine::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

◆ ipaddr

std::string ZLine::ipaddr

IP mask (no ident part)


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