summaryrefslogtreecommitdiff
path: root/docs/man/man3/userrec.3
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-27 01:44:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-27 01:44:46 +0000
commitcd9f9a8add02597a2998ba74b803ed3fbf81314c (patch)
treeb53e3ea035c25a0580e9b31dc31f27ee33c36c96 /docs/man/man3/userrec.3
parent91755849c3bdf089f4583c119fcbb90ff99bed5b (diff)
Added new documentation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1966 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/man/man3/userrec.3')
-rw-r--r--docs/man/man3/userrec.3704
1 files changed, 415 insertions, 289 deletions
diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3
index e5d14b57f..dd6cda28e 100644
--- a/docs/man/man3/userrec.3
+++ b/docs/man/man3/userrec.3
@@ -1,4 +1,4 @@
-.TH "userrec" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "userrec" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -50,7 +50,7 @@ Inherits \fBconnection\fP.
.br
.RI "\fICalls read() to read some data for this user using their fd. \fP"
.ti -1c
-.RI "bool \fBAddBuffer\fP (std::string a)"
+.RI "bool \fBAddBuffer\fP (\fBstd::string\fP a)"
.br
.RI "\fIThis method adds data to the buffer of the user. \fP"
.ti -1c
@@ -62,19 +62,19 @@ Inherits \fBconnection\fP.
.br
.RI "\fIThis function clears the entire buffer by setting it to an empty string. \fP"
.ti -1c
-.RI "std::string \fBGetBuffer\fP ()"
+.RI "\fBstd::string\fP \fBGetBuffer\fP ()"
.br
.RI "\fIThis method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. \fP"
.ti -1c
-.RI "void \fBSetWriteError\fP (std::string error)"
+.RI "void \fBSetWriteError\fP (\fBstd::string\fP error)"
.br
.RI "\fISets the write error for a connection. \fP"
.ti -1c
-.RI "std::string \fBGetWriteError\fP ()"
+.RI "\fBstd::string\fP \fBGetWriteError\fP ()"
.br
.RI "\fIReturns the write error which last occured on this connection or an empty string if none occured. \fP"
.ti -1c
-.RI "void \fBAddWriteBuf\fP (std::string data)"
+.RI "void \fBAddWriteBuf\fP (\fBstd::string\fP data)"
.br
.RI "\fIAdds to the user's write buffer. \fP"
.ti -1c
@@ -149,11 +149,11 @@ Inherits \fBconnection\fP.
.br
.RI "\fIPassword specified by the user when they registered. \fP"
.ti -1c
-.RI "std::string \fBrecvq\fP"
+.RI "\fBstd::string\fP \fBrecvq\fP"
.br
.RI "\fIUser's receive queue. \fP"
.ti -1c
-.RI "std::string \fBsendq\fP"
+.RI "\fBstd::string\fP \fBsendq\fP"
.br
.RI "\fIUser's send queue. \fP"
.ti -1c
@@ -167,7 +167,7 @@ Inherits \fBconnection\fP.
.RI "long \fBthreshold\fP"
.br
.ti -1c
-.RI "std::string \fBWriteError\fP"
+.RI "\fBstd::string\fP \fBWriteError\fP"
.br
.ti -1c
.RI "long \fBsendqmax\fP"
@@ -190,401 +190,475 @@ Inherits \fBconnection\fP.
.PP
Holds all information about a user This class stores all information about a user connected to the irc server.
-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.
+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.
.PP
Definition at line 108 of file users.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "userrec::userrec ()"
.PP
-Definition at line 32 of file users.cpp.
+Definition at line 33 of file users.cpp.
.PP
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, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes.
.PP
.nf
-33 {
-34 // the PROPER way to do it, AVOID bzero at *ALL* costs
-35 strcpy(nick,'');
-36 strcpy(ip,'127.0.0.1');
-37 timeout = 0;
-38 strcpy(ident,'');
-39 strcpy(host,'');
-40 strcpy(dhost,'');
-41 strcpy(fullname,'');
-42 strcpy(modes,'');
-43 server = (char*)FindServerNamePtr(ServerName);
-44 strcpy(awaymsg,'');
-45 strcpy(oper,'');
-46 reset_due = TIME;
-47 lines_in = 0;
-48 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-49 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-50 haspassed = false;
-51 dns_done = false;
-52 recvq = '';
-53 sendq = '';
-54 for (int i = 0; i < MAXCHANS; i++)
-55 {
-56 this->chans[i].channel = NULL;
-57 this->chans[i].uc_modes = 0;
-58 }
-59 invites.clear();
-60 }
+34 {
+35 // the PROPER way to do it, AVOID bzero at *ALL* costs
+36 strcpy(nick,'');
+37 strcpy(ip,'127.0.0.1');
+38 timeout = 0;
+39 strcpy(ident,'');
+40 strcpy(host,'');
+41 strcpy(dhost,'');
+42 strcpy(fullname,'');
+43 strcpy(modes,'');
+44 server = (char*)FindServerNamePtr(ServerName);
+45 strcpy(awaymsg,'');
+46 strcpy(oper,'');
+47 reset_due = TIME;
+48 lines_in = 0;
+49 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+50 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+51 haspassed = false;
+52 dns_done = false;
+53 recvq = '';
+54 sendq = '';
+55 for (int i = 0; i < MAXCHANS; i++)
+56 {
+57 this->chans[i].channel = NULL;
+58 this->chans[i].uc_modes = 0;
+59 }
+60 invites.clear();
+61 }
.fi
-.SS "virtual userrec::~\fBuserrec\fP ()\fC [inline, virtual]\fP"
+.PP
+.SS "virtual userrec::~userrec ()\fC [inline, virtual]\fP"
.PP
Definition at line 221 of file users.h.
.PP
.nf
221 { }
.fi
+.PP
.SH "Member Function Documentation"
.PP
-.SS "bool userrec::AddBuffer (std::string a)"
+.SS "bool userrec::AddBuffer (\fBstd::string\fP a)"
+.PP
+This method adds data to the buffer of the user.
.PP
-This method adds data to the buffer of the user. The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.Definition at line 192 of file users.cpp.
+The buffer can grow to any size within limits of the available memory, managed by the size of a \fBstd::string\fP, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.
+.PP
+Definition at line 194 of file users.cpp.
.PP
References recvq, recvqmax, and SetWriteError().
.PP
.nf
-193 {
-194 std::string b = '';
-195 for (int i = 0; i < a.length(); i++)
-196 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
-197 b = b + a[i];
-198 std::stringstream stream(recvq);
-199 stream << b;
-200 recvq = stream.str();
-201 int i = 0;
-202 // count the size of the first line in the buffer.
-203 while (i < recvq.length())
-204 {
-205 if (recvq[i++] == '\n')
-206 break;
-207 }
-208 if (recvq.length() > this->recvqmax)
-209 {
-210 this->SetWriteError('RecvQ exceeded');
-211 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
-212 }
-213 // return false if we've had more than 600 characters WITHOUT
-214 // a carriage return (this is BAD, drop the socket)
-215 return (i < 600);
-216 }
+195 {
+196 std::string b = '';
+197 for (unsigned int i = 0; i < a.length(); i++)
+198 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+199 b = b + a[i];
+200 std::stringstream stream(recvq);
+201 stream << b;
+202 recvq = stream.str();
+203 unsigned int i = 0;
+204 // count the size of the first line in the buffer.
+205 while (i < recvq.length())
+206 {
+207 if (recvq[i++] == '\n')
+208 break;
+209 }
+210 if (recvq.length() > (unsigned)this->recvqmax)
+211 {
+212 this->SetWriteError('RecvQ exceeded');
+213 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
+214 }
+215 // return false if we've had more than 600 characters WITHOUT
+216 // a carriage return (this is BAD, drop the socket)
+217 return (i < 600);
+218 }
.fi
-.SS "void userrec::AddWriteBuf (std::string data)"
.PP
-Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.Definition at line 248 of file users.cpp.
+.SS "void userrec::AddWriteBuf (\fBstd::string\fP data)"
+.PP
+Adds to the user's write buffer.
.PP
-References GetWriteError(), sendq, sendqmax, and SetWriteError().
+You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.
+.PP
+Definition at line 250 of file users.cpp.
+.PP
+References sendq, sendqmax, and SetWriteError().
.PP
.nf
-249 {
-250 if (this->GetWriteError() != '')
-251 return;
-252 if (sendq.length() + data.length() > this->sendqmax)
-253 {
-254 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
-255 this->SetWriteError('SendQ exceeded');
-256 return;
-257 }
-258 std::stringstream stream;
-259 stream << sendq << data;
-260 sendq = stream.str();
-261 }
+251 {
+252 if (this->GetWriteError() != '')
+253 return;
+254 if (sendq.length() + data.length() > (unsigned)this->sendqmax)
+255 {
+256 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
+257 this->SetWriteError('SendQ exceeded');
+258 return;
+259 }
+260 std::stringstream stream;
+261 stream << sendq << data;
+262 sendq = stream.str();
+263 }
.fi
+.PP
.SS "bool userrec::BufferIsReady ()"
.PP
-This method returns true if the buffer contains at least one carriage return character (e.g. one complete line may be read)Definition at line 218 of file users.cpp.
+This method returns true if the buffer contains at least one carriage return character (e.g.
+.PP
+one complete line may be read)
+.PP
+Definition at line 220 of file users.cpp.
.PP
References recvq.
.PP
.nf
-219 {
-220 for (int i = 0; i < recvq.length(); i++)
-221 if (recvq[i] == '\n')
-222 return true;
-223 return false;
-224 }
+221 {
+222 for (unsigned int i = 0; i < recvq.length(); i++)
+223 if (recvq[i] == '\n')
+224 return true;
+225 return false;
+226 }
.fi
+.PP
.SS "void userrec::ClearBuffer ()"
.PP
-This function clears the entire buffer by setting it to an empty string. Definition at line 226 of file users.cpp.
+This function clears the entire buffer by setting it to an empty string.
+.PP
+Definition at line 228 of file users.cpp.
.PP
References recvq.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.PP
.nf
-227 {
-228 recvq = '';
-229 }
+229 {
+230 recvq = '';
+231 }
.fi
+.PP
.SS "void userrec::CloseSocket ()"
.PP
-Shuts down and closes the user's socket. Definition at line 62 of file users.cpp.
+Shuts down and closes the user's socket.
+.PP
+Definition at line 63 of file users.cpp.
.PP
.nf
-63 {
-64 shutdown(this->fd,2);
-65 close(this->fd);
-66 }
+64 {
+65 shutdown(this->fd,2);
+66 close(this->fd);
+67 }
.fi
+.PP
.SS "void userrec::FlushWriteBuf ()"
.PP
-Flushes as much of the user's buffer to the file descriptor as possible. This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.Definition at line 264 of file users.cpp.
+Flushes as much of the user's buffer to the file descriptor as possible.
+.PP
+This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.
+.PP
+Definition at line 266 of file users.cpp.
.PP
References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError().
.PP
.nf
-265 {
-266 if (sendq.length())
-267 {
-268 char* tb = (char*)this->sendq.c_str();
-269 int n_sent = write(this->fd,tb,this->sendq.length());
-270 if (n_sent == -1)
-271 {
-272 this->SetWriteError(strerror(errno));
-273 }
-274 else
-275 {
-276 // advance the queue
-277 tb += n_sent;
-278 this->sendq = tb;
-279 // update the user's stats counters
-280 this->bytes_out += n_sent;
-281 this->cmds_out++;
-282 }
-283 }
-284 }
+267 {
+268 if (sendq.length())
+269 {
+270 char* tb = (char*)this->sendq.c_str();
+271 int n_sent = write(this->fd,tb,this->sendq.length());
+272 if (n_sent == -1)
+273 {
+274 this->SetWriteError(strerror(errno));
+275 }
+276 else
+277 {
+278 // advance the queue
+279 tb += n_sent;
+280 this->sendq = tb;
+281 // update the user's stats counters
+282 this->bytes_out += n_sent;
+283 this->cmds_out++;
+284 }
+285 }
+286 }
.fi
-.SS "std::string userrec::GetBuffer ()"
.PP
-This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.Definition at line 231 of file users.cpp.
+.SS "\fBstd::string\fP userrec::GetBuffer ()"
+.PP
+This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string.
+.PP
+This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.
+.PP
+Definition at line 233 of file users.cpp.
.PP
References recvq.
.PP
.nf
-232 {
-233 if (recvq == '')
-234 return '';
-235 char* line = (char*)recvq.c_str();
-236 std::string ret = '';
-237 while ((*line != '\n') && (strlen(line)))
-238 {
-239 ret = ret + *line;
-240 line++;
-241 }
-242 if ((*line == '\n') || (*line == '\r'))
-243 line++;
-244 recvq = line;
-245 return ret;
-246 }
+234 {
+235 if (recvq == '')
+236 return '';
+237 char* line = (char*)recvq.c_str();
+238 std::string ret = '';
+239 while ((*line != '\n') && (strlen(line)))
+240 {
+241 ret = ret + *line;
+242 line++;
+243 }
+244 if ((*line == '\n') || (*line == '\r'))
+245 line++;
+246 recvq = line;
+247 return ret;
+248 }
.fi
+.PP
.SS "char * userrec::GetFullHost ()\fC [virtual]\fP"
.PP
-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 68 of file users.cpp.
+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.
+.PP
+Definition at line 69 of file users.cpp.
.PP
References dhost, ident, and nick.
.PP
.nf
-69 {
-70 static char result[MAXBUF];
-71 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
-72 return result;
-73 }
+70 {
+71 static char result[MAXBUF];
+72 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
+73 return result;
+74 }
.fi
+.PP
.SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP"
.PP
-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 85 of file users.cpp.
+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.
+.PP
+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.
+.PP
+Definition at line 87 of file users.cpp.
.PP
References connection::host, ident, and nick.
.PP
.nf
-86 {
-87 static char fresult[MAXBUF];
-88 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
-89 return fresult;
-90 }
+88 {
+89 static char fresult[MAXBUF];
+90 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
+91 return fresult;
+92 }
.fi
+.PP
.SS "\fBInvitedList\fP * userrec::GetInviteList ()"
.PP
-Returns the list of channels this user has been invited to but has not yet joined. Definition at line 106 of file users.cpp.
+Returns the list of channels this user has been invited to but has not yet joined.
.PP
-References InvitedList, and invites.
+Definition at line 108 of file users.cpp.
+.PP
+References invites.
.PP
.nf
-107 {
-108 return &invites;
-109 }
+109 {
+110 return &invites;
+111 }
.fi
-.SS "std::string userrec::GetWriteError ()"
.PP
-Returns the write error which last occured on this connection or an empty string if none occured. Definition at line 294 of file users.cpp.
+.SS "\fBstd::string\fP userrec::GetWriteError ()"
.PP
-References WriteError.
+Returns the write error which last occured on this connection or an empty string if none occured.
.PP
-Referenced by AddWriteBuf().
+Definition at line 296 of file users.cpp.
+.PP
+References WriteError.
.PP
.nf
-295 {
-296 return this->WriteError;
-297 }
+297 {
+298 return this->WriteError;
+299 }
.fi
+.PP
.SS "bool userrec::HasPermission (char * command)"
.PP
-Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.Definition at line 140 of file users.cpp.
+Returns true or false for if a user can execute a privilaged oper command.
+.PP
+This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.
+.PP
+Definition at line 142 of file users.cpp.
.PP
References config_f, and DEBUG.
.PP
.nf
-141 {
-142 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-143 char* mycmd;
-144 char* savept;
-145 char* savept2;
-146
-147 // are they even an oper at all?
-148 if (strchr(this->modes,'o'))
-149 {
-150 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
-151 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
-152 {
-153 ConfValue('type','name',j,TypeName,&config_f);
-154 if (!strcmp(TypeName,this->oper))
-155 {
-156 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
-157 ConfValue('type','classes',j,Classes,&config_f);
-158 char* myclass = strtok_r(Classes,' ',&savept);
-159 while (myclass)
-160 {
-161 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
-162 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
-163 {
-164 ConfValue('class','name',k,ClassName,&config_f);
-165 if (!strcmp(ClassName,myclass))
-166 {
-167 ConfValue('class','commands',k,CommandList,&config_f);
-168 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
-169
-170
-171 mycmd = strtok_r(CommandList,' ',&savept2);
-172 while (mycmd)
-173 {
-174 if (!strcasecmp(mycmd,command))
-175 {
-176 log(DEBUG,'*** Command %s found, returning true',command);
-177 return true;
-178 }
-179 mycmd = strtok_r(NULL,' ',&savept2);
-180 }
-181 }
-182 }
-183 myclass = strtok_r(NULL,' ',&savept);
-184 }
-185 }
-186 }
-187 }
-188 return false;
-189 }
+143 {
+144 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+145 char* mycmd;
+146 char* savept;
+147 char* savept2;
+148
+149 // are they even an oper at all?
+150 if (strchr(this->modes,'o'))
+151 {
+152 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
+153 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
+154 {
+155 ConfValue('type','name',j,TypeName,&config_f);
+156 if (!strcmp(TypeName,this->oper))
+157 {
+158 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
+159 ConfValue('type','classes',j,Classes,&config_f);
+160 char* myclass = strtok_r(Classes,' ',&savept);
+161 while (myclass)
+162 {
+163 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
+164 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
+165 {
+166 ConfValue('class','name',k,ClassName,&config_f);
+167 if (!strcmp(ClassName,myclass))
+168 {
+169 ConfValue('class','commands',k,CommandList,&config_f);
+170 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
+171
+172
+173 mycmd = strtok_r(CommandList,' ',&savept2);
+174 while (mycmd)
+175 {
+176 if (!strcasecmp(mycmd,command))
+177 {
+178 log(DEBUG,'*** Command %s found, returning true',command);
+179 return true;
+180 }
+181 mycmd = strtok_r(NULL,' ',&savept2);
+182 }
+183 }
+184 }
+185 myclass = strtok_r(NULL,' ',&savept);
+186 }
+187 }
+188 }
+189 }
+190 return false;
+191 }
.fi
+.PP
.SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP"
.PP
-Adds a channel to a users invite list (invites them to a channel). Definition at line 111 of file users.cpp.
+Adds a channel to a users invite list (invites them to a channel).
+.PP
+Definition at line 113 of file users.cpp.
.PP
References Invited::channel, and invites.
.PP
.nf
-112 {
-113 Invited i;
-114 strlcpy(i.channel,channel,CHANMAX);
-115 invites.push_back(i);
-116 }
+114 {
+115 Invited i;
+116 strlcpy(i.channel,channel,CHANMAX);
+117 invites.push_back(i);
+118 }
.fi
+.PP
.SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP"
.PP
-Returns true if a user is invited to a channel. Definition at line 92 of file users.cpp.
+Returns true if a user is invited to a channel.
+.PP
+Definition at line 94 of file users.cpp.
.PP
References invites.
.PP
.nf
-93 {
-94 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-95 {
-96 if (i->channel) {
-97 if (!strcasecmp(i->channel,channel))
-98 {
-99 return true;
-100 }
-101 }
-102 }
-103 return false;
-104 }
+95 {
+96 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+97 {
+98 if (i->channel) {
+99 if (!strcasecmp(i->channel,channel))
+100 {
+101 return true;
+102 }
+103 }
+104 }
+105 return false;
+106 }
.fi
+.PP
.SS "int userrec::ReadData (void * buffer, size_t size)"
.PP
-Calls read() to read some data for this user using their fd. Definition at line 75 of file users.cpp.
+Calls read() to read some data for this user using their fd.
+.PP
+Definition at line 76 of file users.cpp.
.PP
-References connection::fd.
+References DEBUG.
.PP
.nf
-76 {
-77 if (this->fd > -1)
-78 {
-79 return read(this->fd, buffer, size);
-80 }
-81 else return 0;
-82 }
+77 {
+78 if (this->fd > -1)
+79 {
+80 log(DEBUG,'userrec::ReadData on fd %d',this->fd);
+81 return read(this->fd, buffer, size);
+82 }
+83 else return 0;
+84 }
.fi
+.PP
.SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP"
.PP
-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 118 of file users.cpp.
+Removes a channel from a users invite list.
+.PP
+This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.
+.PP
+Definition at line 120 of file users.cpp.
.PP
References DEBUG, and invites.
.PP
.nf
-119 {
-120 log(DEBUG,'Removing invites');
-121 if (channel)
-122 {
-123 if (invites.size())
-124 {
-125 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-126 {
-127 if (i->channel)
-128 {
-129 if (!strcasecmp(i->channel,channel))
-130 {
-131 invites.erase(i);
-132 return;
-133 }
-134 }
-135 }
-136 }
-137 }
-138 }
+121 {
+122 log(DEBUG,'Removing invites');
+123 if (channel)
+124 {
+125 if (invites.size())
+126 {
+127 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+128 {
+129 if (i->channel)
+130 {
+131 if (!strcasecmp(i->channel,channel))
+132 {
+133 invites.erase(i);
+134 return;
+135 }
+136 }
+137 }
+138 }
+139 }
+140 }
.fi
-.SS "void userrec::SetWriteError (std::string error)"
.PP
-Sets the write error for a connection. This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.Definition at line 286 of file users.cpp.
+.SS "void userrec::SetWriteError (\fBstd::string\fP error)"
+.PP
+Sets the write error for a connection.
+.PP
+This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.
+.PP
+Definition at line 288 of file users.cpp.
.PP
References DEBUG, and WriteError.
.PP
Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
.PP
.nf
-287 {
-288 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
-289 // don't try to set the error twice, its already set take the first string.
-290 if (this->WriteError == '')
-291 this->WriteError = error;
-292 }
+289 {
+290 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
+291 // don't try to set the error twice, its already set take the first string.
+292 if (this->WriteError == '')
+293 this->WriteError = error;
+294 }
.fi
+.PP
.SH "Member Data Documentation"
.PP
.SS "char \fBuserrec::awaymsg\fP[MAXAWAY+1]"
.PP
-The user's away message. If this string is empty, the user is not marked as away.Definition at line 155 of file users.h.
+The user's away message.
+.PP
+If this string is empty, the user is not marked as away.
+.PP
+Definition at line 155 of file users.h.
.PP
Referenced by userrec().
.SS "\fBucrec\fP \fBuserrec::chans\fP[MAXCHANS]"
@@ -594,68 +668,110 @@ Definition at line 146 of file users.h.
Referenced by Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::dhost\fP[160]"
.PP
-The host displayed to non-opers (used for cloaking etc). This usually matches the value of \fBuserrec::host\fP.Definition at line 131 of file users.h.
+The host displayed to non-opers (used for cloaking etc).
+.PP
+This usually matches the value of \fBuserrec::host\fP.
+.PP
+Definition at line 131 of file users.h.
.PP
Referenced by GetFullHost(), and userrec().
.SS "bool \fBuserrec::dns_done\fP"
.PP
-True when \fBDNS\fP lookups are completed. Definition at line 178 of file users.h.
+True when \fBDNS\fP lookups are completed.
+.PP
+Definition at line 178 of file users.h.
.PP
Referenced by userrec().
.SS "int \fBuserrec::flood\fP"
.PP
-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 161 of file users.h.
+Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.
+.PP
+Definition at line 161 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::fullname\fP[MAXGECOS+1]"
.PP
-The users full name. Definition at line 135 of file users.h.
+The users full name.
+.PP
+Definition at line 135 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::ident\fP[IDENTMAX+2]"
.PP
-The users ident reply. Two characters are added to the user-defined limit to compensate for the tilde etc.Definition at line 126 of file users.h.
+The users ident reply.
+.PP
+Two characters are added to the user-defined limit to compensate for the tilde etc.
+.PP
+Definition at line 126 of file users.h.
.PP
Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().
.SS "\fBInvitedList\fP \fBuserrec::invites\fP\fC [private]\fP"
.PP
-A list of channels the user has a pending invite to. Definition at line 114 of file users.h.
+A list of channels the user has a pending invite to.
+.PP
+Definition at line 114 of file users.h.
.PP
Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec().
.SS "int \fBuserrec::lines_in\fP"
.PP
-Flood counters. Definition at line 203 of file users.h.
+Flood counters.
+.PP
+Definition at line 203 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::modes\fP[54]"
.PP
-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. it is limited to length 54, as there can only be a maximum of 52 user modes (26 upper, 26 lower case) a null terminating char, and an optional + character.Definition at line 144 of file users.h.
+The user's mode string.
+.PP
+This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. it is limited to length 54, as there can only be a maximum of 52 user modes (26 upper, 26 lower case) a null terminating char, and an optional + character.
+.PP
+Definition at line 144 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::nick\fP[NICKMAX]"
.PP
-The users nickname. An invalid nickname indicates an unregistered connection prior to the NICK command.Definition at line 121 of file users.h.
+The users nickname.
+.PP
+An invalid nickname indicates an unregistered connection prior to the NICK command.
+.PP
+Definition at line 121 of file users.h.
.PP
Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::oper\fP[NICKMAX]"
.PP
-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 174 of file users.h.
+The oper type they logged in as, if they are an oper.
+.PP
+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.
+.PP
+Definition at line 174 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::password\fP[MAXBUF]"
.PP
-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 188 of file users.h.
+Password specified by the user when they registered.
+.PP
+This is stored even if the <connect> block doesnt need a password, so that modules may check it.
+.PP
+Definition at line 188 of file users.h.
.SS "unsigned int \fBuserrec::pingmax\fP"
.PP
-Number of seconds between PINGs for this user (set from <connect:allow> tag. Definition at line 182 of file users.h.
-.SS "std::string \fBuserrec::recvq\fP"
+Number of seconds between PINGs for this user (set from <connect:allow> tag.
.PP
-User's receive queue. Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.Definition at line 194 of file users.h.
+Definition at line 182 of file users.h.
+.SS "\fBstd::string\fP \fBuserrec::recvq\fP"
+.PP
+User's receive queue.
+.PP
+Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.
+.PP
+Definition at line 194 of file users.h.
.PP
Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec().
.SS "long \fBuserrec::recvqmax\fP"
.PP
-Maximum size this user's recvq can become. Definition at line 217 of file users.h.
+Maximum size this user's recvq can become.
+.PP
+Definition at line 217 of file users.h.
.PP
Referenced by AddBuffer().
.SS "time_t \fBuserrec::reset_due\fP"
@@ -663,19 +779,27 @@ Referenced by AddBuffer().
Definition at line 204 of file users.h.
.PP
Referenced by userrec().
-.SS "std::string \fBuserrec::sendq\fP"
+.SS "\fBstd::string\fP \fBuserrec::sendq\fP"
+.PP
+User's send queue.
.PP
-User's send queue. Lines waiting to be sent are stored here until their buffer is flushed.Definition at line 199 of file users.h.
+Lines waiting to be sent are stored here until their buffer is flushed.
+.PP
+Definition at line 199 of file users.h.
.PP
Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec().
.SS "long \fBuserrec::sendqmax\fP"
.PP
-Maximum size this user's sendq can become. Definition at line 213 of file users.h.
+Maximum size this user's sendq can become.
+.PP
+Definition at line 213 of file users.h.
.PP
Referenced by AddWriteBuf().
.SS "char* \fBuserrec::server\fP"
.PP
-The server the user is connected to. Definition at line 150 of file users.h.
+The server the user is connected to.
+.PP
+Definition at line 150 of file users.h.
.PP
Referenced by userrec().
.SS "long \fBuserrec::threshold\fP"
@@ -683,10 +807,12 @@ Referenced by userrec().
Definition at line 205 of file users.h.
.SS "unsigned int \fBuserrec::timeout\fP"
.PP
-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 167 of file users.h.
+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.
+.PP
+Definition at line 167 of file users.h.
.PP
Referenced by userrec().
-.SS "std::string \fBuserrec::WriteError\fP"
+.SS "\fBstd::string\fP \fBuserrec::WriteError\fP"
.PP
Definition at line 209 of file users.h.
.PP