#include <users.h>
Inheritance diagram for userrec:
Public Methods | |
userrec () | |
virtual | ~userrec () |
virtual char * | GetFullHost () |
Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. | |
virtual char * | GetFullRealHost () |
Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. | |
virtual bool | IsInvited (char *channel) |
Returns true if a user is invited to a channel. | |
virtual void | InviteTo (char *channel) |
Adds a channel to a users invite list (invites them to a channel). | |
virtual void | RemoveInvite (char *channel) |
Removes a channel from a users invite list. | |
Public Attributes | |
char | nick [NICKMAX] |
The users nickname. | |
char | ident [64] |
The users ident reply. | |
char | dhost [256] |
The host displayed to non-opers (used for cloaking etc). | |
char | fullname [128] |
The users full name. | |
char | modes [32] |
The user's mode string. | |
ucrec | chans [MAXCHANS] |
char | server [256] |
The server the user is connected to. | |
char | awaymsg [512] |
The user's away message. | |
char | result [256] |
Stores the result of the last GetFullHost or GetRealHost call. | |
Private Attributes | |
InvitedList | invites |
A list of channels the user has a pending invite to. |
Everything about a connection is stored here primarily, from the user's socket ID (file descriptor) through to the user's nickname and hostname. Use the Find method of the server class to locate a specific user by nickname.
Definition at line 58 of file users.h.
|
Definition at line 11 of file users.cpp. References connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, connection::fd, connection::haspassed, connection::idle_lastmsg, invites, connection::ip, connection::lastping, connection::nping, connection::port, connection::registered, and connection::signon.
00012 { 00013 // the PROPER way to do it, AVOID bzero at *ALL* costs 00014 strcpy(nick,""); 00015 ip = 0; 00016 strcpy(ident,""); 00017 strcpy(host,""); 00018 strcpy(dhost,""); 00019 strcpy(fullname,""); 00020 strcpy(modes,""); 00021 strcpy(inbuf,""); 00022 strcpy(server,""); 00023 strcpy(awaymsg,""); 00024 fd = lastping = signon = idle_lastmsg = nping = registered = 0; 00025 port = bytes_in = bytes_out = cmds_in = cmds_out = 0; 00026 haspassed = false; 00027 strcpy(result,""); 00028 for (int i = 0; i < MAXCHANS; i++) 00029 { 00030 chans[i].channel = NULL; 00031 } 00032 invites.clear(); 00033 } |
|
Definition at line 110 of file users.h.
00110 { } |
|
Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.
Definition at line 36 of file users.cpp. References result.
00037 { 00038 sprintf(result,"%s!%s@%s",nick,ident,dhost); 00039 return result; 00040 } |
|
Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname. Definition at line 43 of file users.cpp. References result.
00044 { 00045 sprintf(result,"%s!%s@%s",nick,ident,host); 00046 return result; 00047 } |
|
Adds a channel to a users invite list (invites them to a channel).
Definition at line 60 of file users.cpp. References Invited::channel, and invites.
|
|
Returns true if a user is invited to a channel.
Definition at line 49 of file users.cpp. References invites.
|
|
Removes a channel from a users invite list. This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation. Definition at line 67 of file users.cpp. References invites.
|
|
The user's away message. If this string is empty, the user is not marked as away. |
|
Definition at line 92 of file users.h. Referenced by userrec(). |
|
The host displayed to non-opers (used for cloaking etc). This usually matches the value of userrec::host. |
|
The users full name.
|
|
The users ident reply.
|
|
A list of channels the user has a pending invite to.
Definition at line 64 of file users.h. Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec(). |
|
The user's mode string. This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. |
|
The users nickname. An invalid nickname indicates an unregistered connection prior to the NICK command. |
|
Stores the result of the last GetFullHost or GetRealHost call. You may use this to increase the speed of use of this class. Definition at line 106 of file users.h. Referenced by GetFullHost(), and GetFullRealHost(). |
|
The server the user is connected to.
|