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

ELine Class Reference

ELine class. More...

#include <xline.h>

Inheritance diagram for ELine:

Inheritance graph
[legend]
Collaboration diagram for ELine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ELine (InspIRCd *Instance, time_t s_time, long d, const char *src, const char *re, const char *ident, const char *host)
 Create an E-Line.
 ~ELine ()
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 Unset ()
 Called when the line is unset either via expiry or via explicit removal.
virtual void DisplayExpiry ()
 Called when the expiry message is to be displayed for the line.
virtual void OnAdd ()
 Called when the xline has just been added.
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

ELine class.

Definition at line 252 of file xline.h.


Constructor & Destructor Documentation

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

Create an E-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 263 of file xline.h.

ELine::~ELine  )  [inline]
 

Definition at line 271 of file xline.h.


Member Function Documentation

const char * ELine::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 624 of file xline.cpp.

References matchtext.

void ELine::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 599 of file xline.cpp.

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

bool ELine::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 573 of file xline.cpp.

References InspIRCd::MatchCIDR(), and matchtext.

bool ELine::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 508 of file xline.cpp.

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

void ELine::OnAdd  )  [virtual]
 

Called when the xline has just been added.

Reimplemented from XLine.

Definition at line 588 of file xline.cpp.

References User::exempt, UserManager::local_users, XLine::ServerInstance, and InspIRCd::Users.

void ELine::Unset  )  [virtual]
 

Called when the line is unset either via expiry or via explicit removal.

Reimplemented from XLine.

Definition at line 234 of file xline.cpp.

References XLineManager::CheckELines(), User::exempt, UserManager::local_users, XLine::ServerInstance, InspIRCd::Users, and InspIRCd::XLines.


Member Data Documentation

char* ELine::hostmask
 

Host mask (host part only).

Definition at line 294 of file xline.h.

Referenced by Matches().

char* ELine::identmask
 

Ident mask (ident part only).

Definition at line 291 of file xline.h.

std::string ELine::matchtext
 

Definition at line 296 of file xline.h.

Referenced by Displayable(), and Matches().


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