-
+ |
userrec::userrec |
( |
- |
- ) |
+ |
+ ) |
|
@@ -102,47 +122,49 @@ Definition at line 78 of fi
-Definition at line 13 of file users.cpp.
-
-References connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, connection::fd, flood, connection::haspassed, connection::idle_lastmsg, invites, connection::lastping, connection::nping, connection::port, connection::registered, connection::signon, timeout, and ucrec::uc_modes.
-
- 00014 {
-00015
-00016 strcpy(nick,"");
-00017 strcpy(ip,"127.0.0.1");
-00018 timeout = 0;
-00019 strcpy(ident,"");
-00020 strcpy(host,"");
-00021 strcpy(dhost,"");
-00022 strcpy(fullname,"");
-00023 strcpy(modes,"");
-00024 strcpy(inbuf,"");
-00025 strcpy(server,"");
-00026 strcpy(awaymsg,"");
-00027 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-00028 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-00029 haspassed = false;
-00030 strcpy(result,"");
-00031 for (int i = 0; i < MAXCHANS; i++)
-00032 {
-00033 this->chans[i].channel = NULL;
-00034 this->chans[i].uc_modes = 0;
-00035 }
-00036 invites.clear();
-00037 }
+Definition at line 28 of file users.cpp.
+
+References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, connection::inbuf, invites, connection::ip, connection::lastping, modes, nick, connection::nping, oper, connection::port, connection::registered, result, server, connection::signon, timeout, and ucrec::uc_modes.
+
+ 00029 {
+00030
+00031 strcpy(nick,"");
+00032 strcpy(ip,"127.0.0.1");
+00033 timeout = 0;
+00034 strcpy(ident,"");
+00035 strcpy(host,"");
+00036 strcpy(dhost,"");
+00037 strcpy(fullname,"");
+00038 strcpy(modes,"");
+00039 strcpy(inbuf,"");
+00040 strcpy(server,"");
+00041 strcpy(awaymsg,"");
+00042 strcpy(oper,"");
+00043 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+00044 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+00045 haspassed = false;
+00046 dns_done = false;
+00047 strcpy(result,"");
+00048 for (int i = 0; i < MAXCHANS; i++)
+00049 {
+00050 this->chans[i].channel = NULL;
+00051 this->chans[i].uc_modes = 0;
+00052 }
+00053 invites.clear();
+00054 }
-
+
-
+ |
Member Function Documentation
-
+
-
+ |
char * userrec::GetFullHost |
( |
- |
- ) |
+ |
+ ) |
[virtual] |
@@ -192,31 +214,31 @@ Definition at line 149 of f
-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.
+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 41 of file users.cpp.
+Definition at line 58 of file users.cpp.
-References result.
+References dhost, ident, nick, and result.
- 00042 {
-00043 sprintf(result,"%s!%s@%s",nick,ident,dhost);
-00044 return result;
-00045 }
+00059 {
+00060 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
+00061 return result;
+00062 }
|
-
+
-
+ |
char * userrec::GetFullRealHost |
( |
- |
- ) |
+ |
+ ) |
[virtual] |
@@ -232,32 +254,32 @@ References result.
-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.
+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 48 of file users.cpp.
+Definition at line 65 of file users.cpp.
-References result.
+References connection::host, ident, nick, and result.
- 00049 {
-00050 sprintf(result,"%s!%s@%s",nick,ident,host);
-00051 return result;
-00052 }
+00066 {
+00067 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
+00068 return result;
+00069 }
|
-
+
-
+ |
bool userrec::HasPermission |
( |
char * |
- command |
- ) |
+ command |
+ ) |
|
@@ -273,76 +295,77 @@ References result.
-Returns true or false for if a user can execute a privilaged oper command.
-
-This is done by looking up their oper type from userrec::oper, then referencing this to their oper classes and checking the commands they can execute.
-
-Definition at line 97 of file users.cpp.
-
- 00098 {
-00099 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-00100 char* myclass;
-00101 char* mycmd;
-00102 char* savept;
-00103 char* savept2;
-00104
-00105
-00106 if (strchr(this->modes,'o'))
-00107 {
-00108 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
-00109 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
-00110 {
-00111 ConfValue("type","name",j,TypeName,&config_f);
-00112 if (!strcmp(TypeName,this->oper))
-00113 {
-00114 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
-00115 ConfValue("type","classes",j,Classes,&config_f);
-00116 char* myclass = strtok_r(Classes," ",&savept);
-00117 while (myclass)
-00118 {
-00119 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
-00120 for (int k =0; k < ConfValueEnum("class",&config_f); k++)
-00121 {
-00122 ConfValue("class","name",k,ClassName,&config_f);
-00123 if (!strcmp(ClassName,myclass))
-00124 {
-00125 ConfValue("class","commands",k,CommandList,&config_f);
-00126 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
-00127
-00128
-00129 mycmd = strtok_r(CommandList," ",&savept2);
-00130 while (mycmd)
-00131 {
-00132 if (!strcasecmp(mycmd,command))
-00133 {
-00134 log(DEBUG,"*** Command %s found, returning true",command);
-00135 return true;
-00136 }
-00137 mycmd = strtok_r(NULL," ",&savept2);
-00138 }
-00139 }
-00140 }
-00141 myclass = strtok_r(NULL," ",&savept);
-00142 }
-00143 }
-00144 }
-00145 }
-00146 return false;
-00147 }
+Returns true or false for if a user can execute a privilaged oper command.
+
+This is done by looking up their oper type from userrec::oper, then referencing this to their oper classes and checking the commands they can execute.
+
+Definition at line 114 of file users.cpp.
+
+References config_f, and DEBUG.
+
+ 00115 {
+00116 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+00117 char* mycmd;
+00118 char* savept;
+00119 char* savept2;
+00120
+00121
+00122 if (strchr(this->modes,'o'))
+00123 {
+00124 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
+00125 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
+00126 {
+00127 ConfValue("type","name",j,TypeName,&config_f);
+00128 if (!strcmp(TypeName,this->oper))
+00129 {
+00130 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
+00131 ConfValue("type","classes",j,Classes,&config_f);
+00132 char* myclass = strtok_r(Classes," ",&savept);
+00133 while (myclass)
+00134 {
+00135 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
+00136 for (int k =0; k < ConfValueEnum("class",&config_f); k++)
+00137 {
+00138 ConfValue("class","name",k,ClassName,&config_f);
+00139 if (!strcmp(ClassName,myclass))
+00140 {
+00141 ConfValue("class","commands",k,CommandList,&config_f);
+00142 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
+00143
+00144
+00145 mycmd = strtok_r(CommandList," ",&savept2);
+00146 while (mycmd)
+00147 {
+00148 if (!strcasecmp(mycmd,command))
+00149 {
+00150 log(DEBUG,"*** Command %s found, returning true",command);
+00151 return true;
+00152 }
+00153 mycmd = strtok_r(NULL," ",&savept2);
+00154 }
+00155 }
+00156 }
+00157 myclass = strtok_r(NULL," ",&savept);
+00158 }
+00159 }
+00160 }
+00161 }
+00162 return false;
+00163 }
|
-
+
-
+ |
void userrec::InviteTo |
( |
char * |
- channel |
- ) |
+ channel |
+ ) |
[virtual] |
@@ -358,33 +381,33 @@ Definition at line 97 of
-Adds a channel to a users invite list (invites them to a channel).
+Adds a channel to a users invite list (invites them to a channel).
-Definition at line 68 of file users.cpp.
+Definition at line 85 of file users.cpp.
-References Invited::channel, and invites.
+References Invited::channel, and invites.
- |
-
+
-
+ |
bool userrec::IsInvited |
( |
char * |
- channel |
- ) |
+ channel |
+ ) |
[virtual] |
@@ -400,40 +423,40 @@ References Invited::channel
-Returns true if a user is invited to a channel.
+Returns true if a user is invited to a channel.
-Definition at line 54 of file users.cpp.
+Definition at line 71 of file users.cpp.
-References invites.
+References invites.
- 00055 {
-00056 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00057 {
-00058 if (i->channel) {
-00059 if (!strcasecmp(i->channel,channel))
-00060 {
-00061 return true;
-00062 }
-00063 }
-00064 }
-00065 return false;
-00066 }
+00072 {
+00073 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00074 {
+00075 if (i->channel) {
+00076 if (!strcasecmp(i->channel,channel))
+00077 {
+00078 return true;
+00079 }
+00080 }
+00081 }
+00082 return false;
+00083 }
|
-
+
-
+ |
void userrec::RemoveInvite |
( |
char * |
- channel |
- ) |
+ channel |
+ ) |
[virtual] |
@@ -449,45 +472,45 @@ References invites.
-Removes a channel from a users invite list.
+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 75 of file users.cpp.
-
-References invites.
-
- 00076 {
-00077 log(DEBUG,"Removing invites");
-00078 if (channel)
-00079 {
-00080 if (invites.size())
-00081 {
-00082 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00083 {
-00084 if (i->channel)
-00085 {
-00086 if (!strcasecmp(i->channel,channel))
-00087 {
-00088 invites.erase(i);
-00089 return;
-00090 }
-00091 }
-00092 }
-00093 }
-00094 }
-00095 }
+Definition at line 92 of file users.cpp.
+
+References DEBUG, and invites.
+
+ 00093 {
+00094 log(DEBUG,"Removing invites");
+00095 if (channel)
+00096 {
+00097 if (invites.size())
+00098 {
+00099 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00100 {
+00101 if (i->channel)
+00102 {
+00103 if (!strcasecmp(i->channel,channel))
+00104 {
+00105 invites.erase(i);
+00106 return;
+00107 }
+00108 }
+00109 }
+00110 }
+00111 }
+00112 }
|
Member Data Documentation
-
-
+
+
-
+ |
|
@@ -500,20 +523,22 @@ References invites.
-The user's away message.
+The user's away message.
If this string is empty, the user is not marked as away.
-Definition at line 121 of file users.h. |
+Definition at line 136 of file users.h.
+
+Referenced by userrec().
-
-
+
+
+
+
+
-
-
+
+
-
+ |
|
@@ -552,20 +605,22 @@ Referenced by userrec().
-The host displayed to non-opers (used for cloaking etc).
+True when DNS lookups are completed.
+
+
-This usually matches the value of userrec::host.
+Definition at line 164 of file users.h.
-Definition at line 100 of file users.h. |
+Referenced by userrec().
-
-
+
+
-
+ |
|
@@ -578,22 +633,22 @@ Definition at line 100 of f
-Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
+Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
-Definition at line 132 of file users.h.
+Definition at line 147 of file users.h.
-Referenced by userrec(). |
+Referenced by userrec().
-
-
+
+
-
+ |
|
@@ -606,20 +661,22 @@ Referenced by userrec().
-The users full name.
+The users full name.
-Definition at line 104 of file users.h. |
+Definition at line 119 of file users.h.
+
+Referenced by userrec().
-
-
+
+
-
-
+
+
-
-
+
+
-
+ |
|
@@ -686,20 +745,22 @@ Referenced by InviteTo(),
-The user's mode string.
+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.
-Definition at line 110 of file users.h. |
+Definition at line 125 of file users.h.
+
+Referenced by userrec().
-
-
+
+
-
-
+
+
-
+ |
|
@@ -740,20 +801,22 @@ Referenced by Server::QuitU
-The oper type they logged in as, if they are an oper.
+The oper type they logged in as, if they are an oper.
This is used to check permissions in operclasses, so that we can say 'yay' or 'nay' to any commands they issue. The value of this is the value of a valid 'type name=' tag.
-Definition at line 145 of file users.h. |
+Definition at line 160 of file users.h.
+
+Referenced by userrec().
-
-
+
+
-
+ |
|
@@ -766,22 +829,74 @@ Definition at line 145 of f
-Stores the result of the last GetFullHost or GetRealHost call.
+Password specified by the user when they registered.
+
+This is stored even if the block doesnt need a password, so that modules may check it.
+
+Definition at line 174 of file users.h. |
+
+
+
+
+
+
+
+
+ |
+
+
+
+Number of seconds between PINGs for this user (set from <connect:allow> tag.
+
+
+
+Definition at line 168 of file users.h. |
+
+
+
+
+
-
-
+
+
-
+ |
|
@@ -794,20 +909,22 @@ Referenced by GetFullHost()
-The server the user is connected to.
+The server the user is connected to.
-Definition at line 116 of file users.h. |
+Definition at line 131 of file users.h.
+
+Referenced by userrec().
-
-
+
+
-
+ |
|
@@ -820,20 +937,20 @@ Definition at line 116 of f
-Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.
+Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.
-Definition at line 138 of file users.h.
+Definition at line 153 of file users.h.
-Referenced by userrec(). |
+Referenced by userrec().
The documentation for this class was generated from the following files:
- Generated on Sat May 1 17:50:35 2004 for InspIRCd by
+ Generated on Tue Apr 26 17:11:52 2005 for InspIRCd by
- 1.3-rc3
+
+1.3.3
| | | | | | | |