The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

GLine Class Reference

GLine class. More...

#include <xline.h>

Inheritance diagram for GLine:

Inheritance graph
[legend]
Collaboration diagram for GLine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GLine (InspIRCd *Instance, time_t s_time, long d, const char *src, const char *re, const char *ident, const char *host)
 Create a G-Line.
 ~GLine ()
 Destructor.
virtual bool Matches (User *u)
 Returns true whether or not the given user is covered by this line.
virtual bool Matches (const std::string &str)
 Returns true whether or not the given string is covered by this line.
virtual void Apply (User *u)
 Apply a line against a user.
virtual void DisplayExpiry ()
 Called when the expiry message is to be displayed for the line.
virtual const char * Displayable ()
 Returns the displayable form of the pattern for this xline, e.g.

Public Attributes

char * identmask
 Ident mask (ident part only).
char * hostmask
 Host mask (host part only).
std::string matchtext

Detailed Description

GLine class.

Definition at line 203 of file xline.h.


Constructor & Destructor Documentation

GLine::GLine InspIRCd Instance,
time_t  s_time,
long  d,
const char *  src,
const char *  re,
const char *  ident,
const char *  host
[inline]
 

Create a G-Line.

Parameters:
s_time The set time
d The duration of the xline
src The sender of the xline
re The reason of the xline
ident Ident to match
host Host to match

Definition at line 214 of file xline.h.

GLine::~GLine  )  [inline]
 

Destructor.

Definition at line 224 of file xline.h.


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:
u The user to apply against

Reimplemented from XLine.

Definition at line 503 of file xline.cpp.

References XLine::DefaultApply().

const char * GLine::Displayable  )  [virtual]
 

Returns the displayable form of the pattern for this xline, e.g.

'*' 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 for its Displayable() method)

Implements XLine.

Definition at line 634 of file xline.cpp.

References matchtext.

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.

Definition at line 619 of file xline.cpp.

References XLine::ServerInstance, InspIRCd::SNO, and SnomaskManager::WriteToSnoMask().

bool GLine::Matches const std::string str  )  [virtual]
 

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

Parameters:
str The 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.

Definition at line 583 of file xline.cpp.

References InspIRCd::MatchCIDR(), and matchtext.

bool GLine::Matches User u  )  [virtual]
 

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

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

Implements XLine.

Definition at line 486 of file xline.cpp.

References User::exempt, User::GetIPString(), User::host, hostmask, User::ident, InspIRCd::Match(), and InspIRCd::MatchCIDR().


Member Data Documentation

char* GLine::hostmask
 

Host mask (host part only).

Definition at line 245 of file xline.h.

Referenced by Matches().

char* GLine::identmask
 

Ident mask (ident part only).

Definition at line 242 of file xline.h.

std::string GLine::matchtext
 

Definition at line 247 of file xline.h.

Referenced by Displayable(), and Matches().


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