InspIRCd
3.0
|
Public Member Functions | |
LocalUser (int fd, irc::sockets::sockaddrs *client, irc::sockets::sockaddrs *server) | |
LocalUser (int fd, const std::string &uuid, Serializable::Data &data) | |
CullResult | cull () CXX11_OVERRIDE |
ConnectClass * | GetClass () const |
void | CheckClass (bool clone_count=true) |
bool | CheckLines (bool doZline=false) |
void | FullConnect () |
void | SetClass (const std::string &explicit_name="") |
bool | SetClientIP (const std::string &address) CXX11_OVERRIDE |
void | SetClientIP (const irc::sockets::sockaddrs &sa) CXX11_OVERRIDE |
void | WriteRemoteNotice (const std::string &text) CXX11_OVERRIDE |
bool | HasCommandPermission (const std::string &command) CXX11_OVERRIDE |
bool | HasPrivPermission (const std::string &privstr) CXX11_OVERRIDE |
bool | HasModePermission (const ModeHandler *mh) const CXX11_OVERRIDE |
bool | HasSnomaskPermission (char chr) const CXX11_OVERRIDE |
void | OverruleNick () |
void | Send (ClientProtocol::Event &protoev) |
void | Send (ClientProtocol::EventProvider &protoevprov, ClientProtocol::Message &msg) |
bool | Deserialize (Data &data) CXX11_OVERRIDE |
bool | Serialize (Serializable::Data &data) CXX11_OVERRIDE |
![]() | |
const std::string & | GetIPString () |
const std::string & | GetHost (bool uncloak) const |
const std::string & | GetDisplayedHost () const |
const std::string & | GetRealHost () const |
const std::string & | GetRealName () const |
irc::sockets::cidr_mask | GetCIDRMask () |
User (const std::string &uid, Server *srv, UserType objtype) | |
virtual const std::string & | GetFullHost () |
virtual const std::string & | GetFullRealHost () |
void | InvalidateCache () |
bool | IsAway () const |
bool | IsOper () const |
bool | IsNoticeMaskSet (unsigned char sm) |
std::string | GetModeLetters (bool includeparams=false) const |
bool | IsModeSet (unsigned char m) const |
bool | IsModeSet (const ModeHandler *mh) const |
bool | IsModeSet (const ModeHandler &mh) const |
bool | IsModeSet (UserModeReference &moderef) const |
void | SetMode (ModeHandler *mh, bool value) |
void | SetMode (ModeHandler &mh, bool value) |
const std::string & | MakeHost () |
const std::string & | MakeHostIP () |
void | Oper (OperInfo *info) |
void | UnOper () |
void | WriteNotice (const std::string &text) |
virtual void | WriteRemoteNumeric (const Numeric::Numeric &numeric) |
template<typename T1 > | |
void | WriteRemoteNumeric (unsigned int numeric, T1 p1) |
template<typename T1 , typename T2 > | |
void | WriteRemoteNumeric (unsigned int numeric, T1 p1, T2 p2) |
template<typename T1 , typename T2 , typename T3 > | |
void | WriteRemoteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
void | WriteRemoteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | WriteRemoteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5) |
void | WriteNumeric (const Numeric::Numeric &numeric) |
template<typename T1 > | |
void | WriteNumeric (unsigned int numeric, T1 p1) |
template<typename T1 , typename T2 > | |
void | WriteNumeric (unsigned int numeric, T1 p1, T2 p2) |
template<typename T1 , typename T2 , typename T3 > | |
void | WriteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
void | WriteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
void | WriteNumeric (unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5) |
void | WriteCommonRaw (ClientProtocol::Event &protoev, bool include_self=true) |
void | ForEachNeighbor (ForEachNeighborHandler &handler, bool include_self=true) |
bool | SharesChannelWith (User *other) |
bool | ChangeDisplayedHost (const std::string &host) |
void | ChangeRealHost (const std::string &host, bool resetdisplay) |
bool | ChangeIdent (const std::string &newident) |
bool | ChangeRealName (const std::string &real) |
bool | ChangeNick (const std::string &newnick, time_t newts=0) |
void | PurgeEmptyChannels () |
virtual | ~User () |
![]() | |
const ExtensibleStore & | GetExtList () const |
void | doUnhookExtensions (const std::vector< reference< ExtensionItem > > &toRemove) |
void | FreeAllExtItems () |
Public Attributes | |
UserIOHandler | eh |
ClientProtocol::Serializer * | serializer |
unsigned int | bytes_in |
unsigned int | bytes_out |
unsigned int | cmds_in |
unsigned int | cmds_out |
std::string | password |
reference< ConnectClass > | MyClass |
irc::sockets::sockaddrs | server_sa |
unsigned int | quitting_sendq:1 |
unsigned int | lastping:1 |
unsigned int | exempt:1 |
time_t | nextping |
time_t | idle_lastmsg |
unsigned int | CommandFloodPenalty |
already_sent_t | already_sent |
![]() | |
time_t | age |
time_t | signon |
irc::sockets::sockaddrs | client_sa |
std::string | nick |
const std::string | uuid |
std::string | ident |
std::bitset< 64 > | snomasks |
ChanList | chans |
Server * | server |
std::string | awaymsg |
time_t | awaytime |
reference< OperInfo > | oper |
unsigned int | registered:3 |
unsigned int | quitting:1 |
const unsigned int | usertype:2 |
Additional Inherited Members | |
![]() | |
typedef insp::intrusive_list< Membership > | ChanList |
![]() | |
typedef insp::flat_map< reference< ExtensionItem >, void * > | ExtensibleStore |
void LocalUser::CheckClass | ( | bool | clone_count = true | ) |
Call this method to find the matching <connect> for a user, and to check them against it.
bool LocalUser::CheckLines | ( | bool | doZline = false | ) |
Check if the user matches a G- or K-line, and disconnect them if they do.
doZline | True if Z-lines should be checked (if IP has changed since initial connect) Returns true if the user matched a ban, false else. |
|
virtual |
Called just prior to destruction via cull list.
Reimplemented from User.
|
virtual |
Deserializes the specified Data instance into this object.
data | The Data object to deserialize from. |
Reimplemented from User.
void LocalUser::FullConnect | ( | ) |
Use this method to fully connect a user. This will send the message of the day, check G/K/E-lines, etc.
|
inline |
Get the connect class which this user belongs to.
|
virtual |
Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from User::oper, then referencing this to their oper classes and checking the commands they can execute.
command | A command (should be all CAPS) |
Reimplemented from User.
|
virtual |
Returns true or false if a user can set a privileged user or channel mode. This is done by looking up their oper type from User::oper, then referencing this to their oper classes, and checking the modes they can set.
mh | Mode to check |
Reimplemented from User.
|
virtual |
Returns true if a user has a given permission. This is used to check whether or not users may perform certain actions which admins may not wish to give to all operators, yet are not commands. An example might be oper override, mass messaging (/notice $*), etc.
privstr | The priv to chec, e.g. "users/override/topic". These are loaded free-form from the config file. |
Reimplemented from User.
|
virtual |
Determines whether this user can set the specified snomask.
chr | The server notice mask character to look up. |
Reimplemented from User.
void LocalUser::OverruleNick | ( | ) |
Change nick to uuid, unset REG_NICK and send a nickname overruled numeric. This is called when another user (either local or remote) needs the nick of this user and this user isn't registered.
void LocalUser::Send | ( | ClientProtocol::Event & | protoev | ) |
Send a protocol event to the user, consisting of one or more messages.
protoev | Event to send, may contain any number of messages. |
|
inline |
Send a single message to the user.
protoevprov | Protocol event provider. |
msg | Message to send. |
|
virtual |
Deserializes the specified Data instance into this object.
data | The Data object to deserialize from. |
Reimplemented from User.
void LocalUser::SetClass | ( | const std::string & | explicit_name = "" | ) |
Set the connect class to which this user belongs to.
explicit_name | Set this string to tie the user to a specific class name. Otherwise, the class is fitted by checking <connect> tags from the configuration file. |
|
virtual |
Sets the client IP for this user
Reimplemented from User.
|
virtual |
Send a NOTICE message from the local server to the user. The message will be sent even if the user is connected to a remote server.
text | Text to send |
Reimplemented from User.
unsigned int LocalUser::bytes_in |
Stats counter for bytes inbound
unsigned int LocalUser::bytes_out |
Stats counter for bytes outbound
unsigned int LocalUser::cmds_in |
Stats counter for commands inbound
unsigned int LocalUser::cmds_out |
Stats counter for commands outbound
unsigned int LocalUser::CommandFloodPenalty |
This value contains how far into the penalty threshold the user is. This is used either to enable fake lag or for excess flood quits
unsigned int LocalUser::exempt |
This is true if the user matched an exception (E-line). It is used to save time on ban checks.
time_t LocalUser::idle_lastmsg |
Time that the connection last sent a message, used to calculate idle time
unsigned int LocalUser::lastping |
has the user responded to their previous ping?
reference<ConnectClass> LocalUser::MyClass |
Contains a pointer to the connect class a user is on from
time_t LocalUser::nextping |
The time at which this user should be pinged next.
std::string LocalUser::password |
Password specified by the user when they registered (if any). This is stored even if the <connect> block doesnt need a password, so that modules may check it.
unsigned int LocalUser::quitting_sendq |
Recursion fix: user is out of SendQ and will be quit as soon as possible. This can't be handled normally because QuitUser itself calls Write on other users, which could trigger their SendQ to overrun.
ClientProtocol::Serializer* LocalUser::serializer |
Serializer to use when communicating with the user
irc::sockets::sockaddrs LocalUser::server_sa |
Server address and port that this user is connected to.