Logo Search packages:      
Sourcecode: verlihub version File versions

nDirectConnect::cServerDC Class Reference

#include <cserverdc.h>

Inheritance diagram for nDirectConnect::cServerDC:

nServer::cAsyncSocketServer cObj

List of all members.


Detailed Description

A Direct Connect Verlihub server
Author:
Daniel Muller the one ;)

Definition at line 166 of file cserverdc.h.


Public Types

enum  { eKCK_Drop = 1, eKCK_Reason = 2, eKCK_PM = 4, eKCK_TBAN = 8 }
typedef tTmpFunc::iterator tTFIt
typedef vector
< cTempFunctionBase * > 
tTmpFunc
typedef cUserCollection::tHashType tUserHash

Public Member Functions

bool AddRobot (cUserRobot *robot)
 adds a robot user to the list
bool AddToList (cUser *usr)
void close ()
 cServerDC (string CfgBase=string("./.verlihub"), const string &ExecPath="")
void DCKickNick (ostream *, cUser *OP, const string &Nick, const string &Reason, int flags)
int DCPrivateHS (const string &text, cConnDC *conn, string *from=NULL)
int DCPublic (const string &from, const string &msg, class cConnDC *conn)
int DCPublicHS (const string &text, cConnDC *conn)
void DCPublicHSToAll (const string &text)
int DCPublicToAll (const string &from, const string &txt)
bool DelRobot (cUserRobot *robot)
int DoRegisterInHublist (string host, int port, string NickForReply)
virtual std::ostream & ErrLog ()
int ErrLog (int level)
tMsgAct Filter (tDCMsg msg, cConnDC *conn)
virtual const int & getmPort ()
__int64 GetTotalShareSize ()
virtual cAsyncConnListen (int OnPort, bool UDP=false)
virtual cAsyncConnListenWithConn (cAsyncConn *, int OnPort, bool UDP=false)
virtual std::ostream & Log ()
int Log (int level)
std::ostream & LogStream ()
void OnConnClose (cAsyncConn *)
virtual int OnTimer (cTime &now)
int OnTimerBase (cTime &now)
int RegisterInHublist (string host, int port, cConnDC *conn)
bool RemoveNick (cUser *)
void ReportUserToOpchat (cConnDC *, const string &Msg, bool ToMain=false)
int run ()
int SaveFile (const string &file, const string &text)
void SendToAll (string &str, int cm, int cM)
int SendToAllWithNick (const string &start, const string &end, int cm, int cM)
void SendToAllWithNickCC (const string &start, const string &end, int cm, int cM, const string &cc_zone)
void SetClassName (const char *name)
virtual void setmPort (const int &_newVal)
bool ShowUserToAll (cUserBase *user)
virtual int StartListening (int OverrideDefaultPort=0)
void stop (int)
virtual bool StopListenConn (cAsyncConn *)
unsigned Str2Period (const string &, ostream &)
virtual int StrLog (std::ostream &ostr, int level)
typedef int tDC_MsgFunc (cMessageDC *msg, cConnDC *conn)
void TimeStep ()
tVAL_NICK ValidateNick (const string &nick, bool registered)
int ValidateUser (cConnDC *conn, const string &nick)
int WhoIP (unsigned long ip_min, unsigned long ip_max, string &dest, const string &separator, bool exact=true)

Static Public Member Functions

static int GetCount ()

Public Attributes

string LastBCNick
cUserCollection mActiveUsers
string mAddr
cBanListmBanList
cDCConf mC
cUserCollection mChatUsers
const char * mClassName
class cDCConsolemCo
string mConfigBaseDir
cConnTypesmConnTypes
cDBConf mDBConf
string mExecPath
cMeanFrequency< unsigned,21 > mFrequency
cUserCollection mHelloUsers
cWorkerThread mHublistReg
cTimeOut mHublistTimer
cUserCollection mInProgresUsers
cKickListmKickList
cDCLang mL
unsigned long mMaxLineLength
cMySQL mMySQL
ofstream mNetOutLog
string mNickInfoString
cChatRoom * mOpChat
cUserCollection mOpchatList
cCompositeUserCollection mOpList
cDCProto mP
cPenaltyListmPenList
cVHPluginMgr mPluginManager
class cRegListmR
cTimeOut mReloadcfgTimer
cUserCollection mRobotList
string mSendAllBuf
cSetupList mSetupList
cTimeOut mSlowTimer
cTime mStartTime
int mStepDelay
tSysLoad mSysLoad
cTime mTime
tTmpFunc mTmpFunc
std::ostream * mToLog
__int64 mTotalShare
cUnBanListmUnBanList
cMeanFrequency< unsigned long, 10 > mUploadZone [USER_ZONES+1]
int mUseDNS
int mUserCount [USER_ZONES+1]
int mUserCountTot
cCompositeUserCollection mUserList
unsigned mUsersPeak
int timer_conn_period
int timer_serv_period

Static Public Attributes

static const string mEmpty
static int msLogLevel = 4
static cServerDCsCurrentServer = NULL

Protected Types

typedef tConnList::iterator tCLIt
typedef list< cAsyncConn * > tConnList

Protected Member Functions

virtual void addConnection (cAsyncConn *)
void AfterUserLogin (cConnDC *conn)
bool AllowNewConn ()
bool BeginUserLogin (cConnDC *conn)
void ConnCloseMsg (cConnDC *conn, const string &msg, int to_msec=4000, int Reason=eCR_DEFAULT)
int DCHello (const string &nick, cConnDC *conn, string *info=NULL)
void delConnection (cAsyncConn *)
void DoUserLogin (cConnDC *conn)
virtual string * FactoryString (cAsyncConn *)
virtual int input (cAsyncConn *conn)
bool MinDelay (cTime &what, int min)
bool MinDelayMS (cTime &what, long min)
int OnNewConn (cAsyncConn *)
void OnNewMessage (cAsyncConn *, string *)
int output (cAsyncConn *conn)
bool VerifyUniqueNick (cConnDC *conn)

Protected Attributes

bool mbRun
cConnSelect mConnChooser
tConnList mConnList
cConnFactory * mFactory
int mPort
int mRunResult
sTimers mT

Static Protected Attributes

static bool WSinitialized = false

Private Attributes

sCallBacks mCallBacks

Friends

class ::nDirectConnect::cConnDC
class ::nDirectConnect::cDCConf
class ::nDirectConnect::cDCConnFactory
class ::nDirectConnect::cDCConsole
class ::nDirectConnect::cUser
class ::nDirectConnect::nProtocol::cDCProto
class ::nDirectConnect::nTables::cDCBanList
class ::nDirectConnect::nTables::cRegList
class cAsyncConn

Classes

struct  sCallBacks

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

Generated by  Doxygen 1.6.0   Back to index