Anope IRC Services  Version 2.0
Data Structures | Namespaces | Functions | Variables
anope.h File Reference
#include <signal.h>
#include "hashcomp.h"
Include dependency graph for anope.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  Anope::string
 
struct  Anope::hash_ci
 
struct  Anope::hash_cs
 
struct  Anope::compare
 
class  Anope::map< T >
 
class  Anope::multimap< T >
 
class  Anope::hash_map< T >
 
class  sepstream
 
class  commasepstream
 
class  spacesepstream
 
class  CoreException
 
class  ModuleException
 
class  ConvertException
 

Namespaces

 Anope
 

Functions

std::ostream & Anope::operator<< (std::ostream &os, const string &_str)
 
std::istream & Anope::operator>> (std::istream &is, string &_str)
 
const string Anope::operator+ (char chr, const string &str)
 
const string Anope::operator+ (const char *_str, const string &str)
 
const string Anope::operator+ (const std::string &_str, const string &str)
 
CoreExport string Anope::Version ()
 
CoreExport string Anope::VersionShort ()
 
CoreExport string Anope::VersionBuildString ()
 
CoreExport int Anope::VersionMajor ()
 
CoreExport int Anope::VersionMinor ()
 
CoreExport int Anope::VersionPatch ()
 
bool Anope::AtTerm ()
 
void Anope::Fork ()
 
void Anope::HandleSignal ()
 
void Anope::Init (int ac, char **av)
 
CoreExport void Anope::SaveDatabases ()
 
CoreExport bool Anope::Match (const string &str, const string &mask, bool case_sensitive=false, bool use_regex=false)
 
CoreExport string Anope::Hex (const string &data)
 
CoreExport string Anope::Hex (const char *data, unsigned len)
 
CoreExport void Anope::Unhex (const string &src, string &dest)
 
CoreExport void Anope::Unhex (const string &src, char *dest, size_t sz)
 
CoreExport void Anope::B64Encode (const string &src, string &target)
 
CoreExport void Anope::B64Decode (const string &src, string &target)
 
CoreExport void Anope::Encrypt (const Anope::string &src, Anope::string &dest)
 
CoreExport bool Anope::Decrypt (const Anope::string &src, Anope::string &dest)
 
CoreExport string Anope::printf (const char *fmt,...)
 
CoreExport int Anope::LastErrorCode ()
 
CoreExport const string Anope::LastError ()
 
CoreExport bool Anope::IsFile (const Anope::string &file)
 
CoreExport time_t Anope::DoTime (const Anope::string &s)
 
CoreExport Anope::string Anope::Duration (time_t seconds, const NickCore *nc=NULL)
 
CoreExport Anope::string Anope::Expires (time_t seconds, const NickCore *nc=NULL)
 
CoreExport Anope::string Anope::strftime (time_t t, const NickCore *nc=NULL, bool short_output=false)
 
CoreExport Anope::string Anope::NormalizeBuffer (const Anope::string &)
 
void Anope::Process (const Anope::string &)
 
Anope::string Anope::Resolve (const Anope::string &host, int type)
 
CoreExport Anope::string Anope::Random (size_t len)
 
template<typename T >
Anope::string stringify (const T &x)
 
template<typename T >
void convert (const Anope::string &s, T &x, Anope::string &leftover, bool failIfLeftoverChars=true)
 
template<typename T >
void convert (const Anope::string &s, T &x, bool failIfLeftoverChars=true)
 
template<typename T >
convertTo (const Anope::string &s, Anope::string &leftover, bool failIfLeftoverChars=true)
 
template<typename T >
convertTo (const Anope::string &s, bool failIfLeftoverChars=true)
 
template<typename T , typename O >
anope_dynamic_static_cast (O ptr)
 

Variables

static const char *const Anope::compiled = __TIME__ " " __DATE__
 
CoreExport time_t Anope::StartTime = time(NULL)
 
int Anope::ReturnValue = 0
 
sig_atomic_t Anope::Signal = 0
 
CoreExport bool Anope::Quitting = false
 
CoreExport bool Anope::Restarting = false
 
CoreExport Anope::string Anope::QuitReason
 
CoreExport time_t Anope::CurTime = time(NULL)
 
CoreExport int Anope::Debug = 0
 
CoreExport bool Anope::ReadOnly = false
 
CoreExport bool Anope::NoFork = false
 
CoreExport bool Anope::NoThird = false
 
CoreExport bool Anope::NoExpire = false
 
CoreExport bool Anope::ProtocolDebug = false
 
CoreExport Anope::string Anope::ServicesDir
 
CoreExport Anope::string Anope::ServicesBin
 
CoreExport Anope::string Anope::ConfigDir = "conf"
 
CoreExport Anope::string Anope::DataDir = "data"
 
CoreExport Anope::string Anope::ModuleDir = "lib"
 
CoreExport Anope::string Anope::LocaleDir = "locale"
 
CoreExport Anope::string Anope::LogDir = "logs"
 
CoreExport int Anope::CurrentUplink = -1
 

Function Documentation

template<typename T , typename O >
T anope_dynamic_static_cast ( ptr)
inline

Casts to be used instead of dynamic_cast, this uses dynamic_cast for debug builds and static_cast on releass builds to speed up the program because dynamic_cast relies on RTTI.

Definition at line 774 of file anope.h.

Referenced by SSLSocketIO::Accept(), ModeManager::AddChannelMode(), ChannelStatus::BuildModePrefixList(), XOPChanAccess::DetermineLevel(), CommandCSAccess::DoAdd(), CommandCSXOP::DoAdd(), CommandCSFlags::DoModify(), KickerDataImpl::ExtensibleItem::ExtensibleSerialize(), NSCertListImpl::ExtensibleItem::ExtensibleSerialize(), CSSet::KeepModes::ExtensibleSerialize(), NSSet::KeepModes::ExtensibleSerialize(), KickerDataImpl::ExtensibleItem::ExtensibleUnserialize(), NSCertListImpl::ExtensibleItem::ExtensibleUnserialize(), CSSet::KeepModes::ExtensibleUnserialize(), CSSet::Persist::ExtensibleUnserialize(), NSSet::KeepModes::ExtensibleUnserialize(), SSLSocketIO::FinishAccept(), SSLSocketIO::FinishConnect(), Channel::GetModes(), Entry::Matches(), BotServCore::OnJoinChannel(), IDInterface::OnResult(), AccessChanAccess::operator>(), OSDefcon::ParseModeString(), DHAES::ProcessMessage(), DHBS::ProcessMessage(), External::ProcessMessage(), ModeManager::RemoveChannelMode(), Channel::RemoveMode(), Channel::RemoveModeInternal(), IRCDMessageCapab::Run(), Channel::SetMode(), Channel::SetModeInternal(), Channel::SetModesInternal(), IgnoreDataImpl::Unserialize(), ForbidDataImpl::Unserialize(), MyOper::Unserialize(), Exception::Unserialize(), BadWordImpl::Unserialize(), CSSuspendInfo::Unserialize(), Memo::Unserialize(), NSSuspendInfo::Unserialize(), OperInfo::Unserialize(), ModeLockImpl::Unserialize(), EntryMsgImpl::Unserialize(), HostRequest::Unserialize(), AutoKick::Unserialize(), DNSZone::Unserialize(), LogSettingImpl::Unserialize(), XLine::Unserialize(), AJoinEntry::Unserialize(), CSMiscData::Unserialize(), NSMiscData::Unserialize(), NickAlias::Unserialize(), SeenInfo::Unserialize(), BotInfo::Unserialize(), MyNewsItem::Unserialize(), ChannelInfo::Unserialize(), ChanAccess::Unserialize(), NickCore::Unserialize(), and DNSServer::Unserialize().

template<typename T >
void convert ( const Anope::string s,
T &  x,
Anope::string leftover,
bool  failIfLeftoverChars = true 
)
inline

Definition at line 720 of file anope.h.

References Anope::string::clear(), and Anope::string::str().

Referenced by convert(), and convertTo().

template<typename T >
void convert ( const Anope::string s,
T &  x,
bool  failIfLeftoverChars = true 
)
inline

Definition at line 740 of file anope.h.

References convert().

template<typename T >
T convertTo ( const Anope::string s,
Anope::string leftover,
bool  failIfLeftoverChars = true 
)
inline

Definition at line 746 of file anope.h.

References convert().

template<typename T >
T convertTo ( const Anope::string s,
bool  failIfLeftoverChars = true 
)
inline

Definition at line 753 of file anope.h.

References convert().

template<typename T >
Anope::string stringify ( const T &  x)
inline

Convert something to a string

Definition at line 710 of file anope.h.

Referenced by AccessChanAccess::AccessSerialize(), ModeManager::AddChannelMode(), ModeManager::AddUserMode(), DBFlatFile::BackupDatabase(), ProxyConnect::Ban(), SQLiteService::BuildInsert(), MySQLService::BuildInsert(), SocketEngine::Change(), NickServCore::Collide(), CommandOSDNS::DisplayPoolState(), MyXMLRPCEvent::DoChannel(), CommandCSMode::DoClear(), CommandNSAJoin::DoList(), CommandEntryMessage::DoList(), NewsBase::DoList(), CommandOSSession::DoList(), CommandBSBadwords::DoList(), CommandCSFlags::DoList(), CommandCSXOP::DoList(), CommandCSLevels::DoList(), MyXMLRPCEvent::DoStats(), MyXMLRPCEvent::DoUser(), Anope::Duration(), CommandMSList::Execute(), CommandOSChanList::Execute(), CommandHSList::Execute(), CommandCSInfo::Execute(), CommandNSAList::Execute(), CommandBSInfo::Execute(), CommandCSLog::Execute(), CommandHSWaiting::Execute(), SQLiteService::FromUnixtime(), MySQLService::FromUnixtime(), Anope::HandleSignal(), DatabaseRedis::InsertObject(), LoadChannels(), Configuration::Conf::LoadConf(), RedisSocket::OnConnect(), ModuleDNSBL::OnReload(), EBCRYPT::OnReload(), WebCPanel::MemoServ::Memos::OnRequest(), WebCPanel::OperServ::Akill::OnRequest(), WebCPanel::ChanServ::Access::OnRequest(), WebCPanel::NickServ::Alist::OnRequest(), TypeLoader::OnResult(), Deleter::OnResult(), Updater::OnResult(), ModifiedObject::OnResult(), SubscriptionListener::OnResult(), DBMySQL::OnSerializableDestruct(), DBSQL::OnSerializableDestruct(), DatabaseRedis::OnSerializableDestruct(), PCRERegex::PCRERegex(), process_mlock(), CommandOSSXLineBase::ProcessList(), CommandCSAKick::ProcessList(), CommandOSAKill::ProcessList(), CommandCSAccess::ProcessList(), CommandOSException::ProcessList(), ModuleManager::RequireVersion(), MyRedisService::Send(), MemoServCore::SendMemoMail(), IRCDProto::SendNumericInternal(), MyHTTPClient::SendReply(), DNSZone::Serialize(), ChannelInfo::Serialize(), DNSServer::Serialize(), SQL::Query::SetValue(), DNSZone::Unserialize(), DNSServer::Unserialize(), Anope::Version(), Anope::VersionBuildString(), and Anope::VersionShort().