summaryrefslogtreecommitdiff
path: root/docs/man/man3/userrec.3
blob: 8fc0aa420e059feb6ae07b047c95e7c8ab266c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
.TH "userrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
userrec \- Holds all information about a user This class stores all information about a user connected to the irc server.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <users.h>\fP
.PP
Inherits \fBconnection\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBuserrec\fP ()"
.br
.ti -1c
.RI "virtual char * \fBGetFullHost\fP ()"
.br
.RI "\fIReturns 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. \fP"
.ti -1c
.RI "virtual char * \fBGetFullRealHost\fP ()"
.br
.RI "\fIReturns 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. \fP"
.ti -1c
.RI "virtual bool \fBIsInvited\fP (char *channel)"
.br
.RI "\fIReturns true if a user is invited to a channel. \fP"
.ti -1c
.RI "virtual void \fBInviteTo\fP (char *channel)"
.br
.RI "\fIAdds a channel to a users invite list (invites them to a channel). \fP"
.ti -1c
.RI "virtual void \fBRemoveInvite\fP (char *channel)"
.br
.RI "\fIRemoves a channel from a users invite list. \fP"
.ti -1c
.RI "bool \fBHasPermission\fP (char *command)"
.br
.RI "\fIReturns true or false for if a user can execute a privilaged oper command. \fP"
.ti -1c
.RI "int \fBReadData\fP (void *buffer, size_t size)"
.br
.RI "\fICalls read() to read some data for this user using their fd. \fP"
.ti -1c
.RI "bool \fBAddBuffer\fP (\fBstd::string\fP a)"
.br
.RI "\fIThis method adds data to the buffer of the user. \fP"
.ti -1c
.RI "bool \fBBufferIsReady\fP ()"
.br
.RI "\fIThis method returns true if the buffer contains at least one carriage return character (e.g. \fP"
.ti -1c
.RI "void \fBClearBuffer\fP ()"
.br
.RI "\fIThis function clears the entire buffer by setting it to an empty string. \fP"
.ti -1c
.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 (\fBstd::string\fP error)"
.br
.RI "\fISets the write error for a connection. \fP"
.ti -1c
.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 (\fBstd::string\fP data)"
.br
.RI "\fIAdds to the user's write buffer. \fP"
.ti -1c
.RI "void \fBFlushWriteBuf\fP ()"
.br
.RI "\fIFlushes as much of the user's buffer to the file descriptor as possible. \fP"
.ti -1c
.RI "\fBInvitedList\fP * \fBGetInviteList\fP ()"
.br
.RI "\fIReturns the list of channels this user has been invited to but has not yet joined. \fP"
.ti -1c
.RI "void \fBCloseSocket\fP ()"
.br
.RI "\fIShuts down and closes the user's socket. \fP"
.ti -1c
.RI "virtual \fB~userrec\fP ()"
.br
.in -1c
.SS "Public Attributes"

.in +1c
.ti -1c
.RI "char \fBnick\fP [NICKMAX]"
.br
.RI "\fIThe users nickname. \fP"
.ti -1c
.RI "char \fBident\fP [IDENTMAX+2]"
.br
.RI "\fIThe users ident reply. \fP"
.ti -1c
.RI "char \fBdhost\fP [160]"
.br
.RI "\fIThe host displayed to non-opers (used for cloaking etc). \fP"
.ti -1c
.RI "char \fBfullname\fP [MAXGECOS+1]"
.br
.RI "\fIThe users full name. \fP"
.ti -1c
.RI "char \fBmodes\fP [54]"
.br
.RI "\fIThe user's mode string. \fP"
.ti -1c
.RI "\fBucrec\fP \fBchans\fP [MAXCHANS]"
.br
.ti -1c
.RI "char * \fBserver\fP"
.br
.RI "\fIThe server the user is connected to. \fP"
.ti -1c
.RI "char \fBawaymsg\fP [MAXAWAY+1]"
.br
.RI "\fIThe user's away message. \fP"
.ti -1c
.RI "int \fBflood\fP"
.br
.RI "\fINumber of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood. \fP"
.ti -1c
.RI "unsigned int \fBtimeout\fP"
.br
.RI "\fINumber 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. \fP"
.ti -1c
.RI "char \fBoper\fP [NICKMAX]"
.br
.RI "\fIThe oper type they logged in as, if they are an oper. \fP"
.ti -1c
.RI "bool \fBdns_done\fP"
.br
.RI "\fITrue when \fBDNS\fP lookups are completed. \fP"
.ti -1c
.RI "unsigned int \fBpingmax\fP"
.br
.RI "\fINumber of seconds between PINGs for this user (set from <connect:allow> tag. \fP"
.ti -1c
.RI "char \fBpassword\fP [MAXBUF]"
.br
.RI "\fIPassword specified by the user when they registered. \fP"
.ti -1c
.RI "\fBstd::string\fP \fBrecvq\fP"
.br
.RI "\fIUser's receive queue. \fP"
.ti -1c
.RI "\fBstd::string\fP \fBsendq\fP"
.br
.RI "\fIUser's send queue. \fP"
.ti -1c
.RI "int \fBlines_in\fP"
.br
.RI "\fIFlood counters. \fP"
.ti -1c
.RI "time_t \fBreset_due\fP"
.br
.ti -1c
.RI "long \fBthreshold\fP"
.br
.ti -1c
.RI "\fBstd::string\fP \fBWriteError\fP"
.br
.ti -1c
.RI "long \fBsendqmax\fP"
.br
.RI "\fIMaximum size this user's sendq can become. \fP"
.ti -1c
.RI "long \fBrecvqmax\fP"
.br
.RI "\fIMaximum size this user's recvq can become. \fP"
.in -1c
.SS "Private Attributes"

.in +1c
.ti -1c
.RI "\fBInvitedList\fP \fBinvites\fP"
.br
.RI "\fIA list of channels the user has a pending invite to. \fP"
.in -1c
.SH "Detailed Description"
.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.
.PP
Definition at line 111 of file users.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "userrec::userrec ()"
.PP
Definition at line 38 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
39 {
40         // the PROPER way to do it, AVOID bzero at *ALL* costs
41         strcpy(nick,'');
42         strcpy(ip,'127.0.0.1');
43         timeout = 0;
44         strcpy(ident,'');
45         strcpy(host,'');
46         strcpy(dhost,'');
47         strcpy(fullname,'');
48         strcpy(modes,'');
49         server = (char*)FindServerNamePtr(ServerName);
50         strcpy(awaymsg,'');
51         strcpy(oper,'');
52         reset_due = TIME;
53         lines_in = 0;
54         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
55         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
56         haspassed = false;
57         dns_done = false;
58         recvq = '';
59         sendq = '';
60         for (int i = 0; i < MAXCHANS; i++)
61         {
62                 this->chans[i].channel = NULL;
63                 this->chans[i].uc_modes = 0;
64         }
65         invites.clear();
66 }
.fi
.PP
.SS "userrec::~userrec ()\fC [virtual]\fP"
.PP
Definition at line 68 of file users.cpp.
.PP
.nf
69 {
70 }
.fi
.PP
.SH "Member Function Documentation"
.PP 
.SS "bool userrec::AddBuffer (\fBstd::string\fP a)"
.PP
This method adds data to the buffer of the user. 
.PP
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 205 of file users.cpp.
.PP
References recvq, recvqmax, and SetWriteError().
.PP
.nf
206 {
207         std::string b = '';
208         for (unsigned int i = 0; i < a.length(); i++)
209                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
210                         b = b + a[i];
211         std::stringstream stream(recvq);
212         stream << b;
213         recvq = stream.str();
214         unsigned int i = 0;
215         // count the size of the first line in the buffer.
216         while (i < recvq.length())
217         {
218                 if (recvq[i++] == '\n')
219                         break;
220         }
221         if (recvq.length() > (unsigned)this->recvqmax)
222         {
223                 this->SetWriteError('RecvQ exceeded');
224                 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
225         }
226         // return false if we've had more than 600 characters WITHOUT
227         // a carriage return (this is BAD, drop the socket)
228         return (i < 600);
229 }
.fi
.PP
.SS "void userrec::AddWriteBuf (\fBstd::string\fP data)"
.PP
Adds to the user's write buffer. 
.PP
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 261 of file users.cpp.
.PP
References sendq, sendqmax, and SetWriteError().
.PP
.nf
262 {
263         if (this->GetWriteError() != '')
264                 return;
265         if (sendq.length() + data.length() > (unsigned)this->sendqmax)
266         {
267                 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
268                 this->SetWriteError('SendQ exceeded');
269                 return;
270         }
271         std::stringstream stream;
272         stream << sendq << data;
273         sendq = stream.str();
274 }
.fi
.PP
.SS "bool userrec::BufferIsReady ()"
.PP
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 231 of file users.cpp.
.PP
References recvq.
.PP
.nf
232 {
233         for (unsigned int i = 0; i < recvq.length(); i++)
234                 if (recvq[i] == '\n')
235                         return true;
236         return false;
237 }
.fi
.PP
.SS "void userrec::ClearBuffer ()"
.PP
This function clears the entire buffer by setting it to an empty string. 
.PP
Definition at line 239 of file users.cpp.
.PP
References recvq.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.PP
.nf
240 {
241         recvq = '';
242 }
.fi
.PP
.SS "void userrec::CloseSocket ()"
.PP
Shuts down and closes the user's socket. 
.PP
Definition at line 72 of file users.cpp.
.PP
.nf
73 {
74         shutdown(this->fd,2);
75         close(this->fd);
76 }
.fi
.PP
.SS "void userrec::FlushWriteBuf ()"
.PP
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 277 of file users.cpp.
.PP
References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError().
.PP
.nf
278 {
279         if (sendq.length())
280         {
281                 char* tb = (char*)this->sendq.c_str();
282                 int n_sent = write(this->fd,tb,this->sendq.length());
283                 if (n_sent == -1)
284                 {
285                         this->SetWriteError(strerror(errno));
286                 }
287                 else
288                 {
289                         // advance the queue
290                         tb += n_sent;
291                         this->sendq = tb;
292                         // update the user's stats counters
293                         this->bytes_out += n_sent;
294                         this->cmds_out++;
295                 }
296         }
297 }
.fi
.PP
.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 244 of file users.cpp.
.PP
References recvq.
.PP
.nf
245 {
246         if (recvq == '')
247                 return '';
248         char* line = (char*)recvq.c_str();
249         std::string ret = '';
250         while ((*line != '\n') && (strlen(line)))
251         {
252                 ret = ret + *line;
253                 line++;
254         }
255         if ((*line == '\n') || (*line == '\r'))
256                 line++;
257         recvq = line;
258         return ret;
259 }
.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. 
.PP
Definition at line 78 of file users.cpp.
.PP
References dhost, ident, and nick.
.PP
.nf
79 {
80         static char result[MAXBUF];
81         snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
82         return result;
83 }
.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. 
.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 96 of file users.cpp.
.PP
References connection::host, ident, and nick.
.PP
.nf
97 {
98         static char fresult[MAXBUF];
99         snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
100         return fresult;
101 }
.fi
.PP
.SS "\fBInvitedList\fP * userrec::GetInviteList ()"
.PP
Returns the list of channels this user has been invited to but has not yet joined. 
.PP
Definition at line 117 of file users.cpp.
.PP
References invites.
.PP
.nf
118 {
119         return &invites;
120 }
.fi
.PP
.SS "\fBstd::string\fP userrec::GetWriteError ()"
.PP
Returns the write error which last occured on this connection or an empty string if none occured. 
.PP
Definition at line 307 of file users.cpp.
.PP
References WriteError.
.PP
.nf
308 {
309         return this->WriteError;
310 }
.fi
.PP
.SS "bool userrec::HasPermission (char * command)"
.PP
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 151 of file users.cpp.
.PP
References config_f, and is_uline().
.PP
.nf
152 {
153         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
154         char* mycmd;
155         char* savept;
156         char* savept2;
157         
158         // users on u-lined servers can completely bypass
159         // all permissions based checks.
160         //
161         // of course, if this is sent to a remote server and this
162         // server is not ulined there, then that other server
163         // silently drops the command.
164         if (is_uline(this->server))
165                 return true;
166         
167         // are they even an oper at all?
168         if (strchr(this->modes,'o'))
169         {
170                 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
171                 {
172                         ConfValue('type','name',j,TypeName,&config_f);
173                         if (!strcmp(TypeName,this->oper))
174                         {
175                                 ConfValue('type','classes',j,Classes,&config_f);
176                                 char* myclass = strtok_r(Classes,' ',&savept);
177                                 while (myclass)
178                                 {
179                                         for (int k =0; k < ConfValueEnum('class',&config_f); k++)
180                                         {
181                                                 ConfValue('class','name',k,ClassName,&config_f);
182                                                 if (!strcmp(ClassName,myclass))
183                                                 {
184                                                         ConfValue('class','commands',k,CommandList,&config_f);
185                                                         mycmd = strtok_r(CommandList,' ',&savept2);
186                                                         while (mycmd)
187                                                         {
188                                                                 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*'))
189                                                                 {
190                                                                         return true;
191                                                                 }
192                                                                 mycmd = strtok_r(NULL,' ',&savept2);
193                                                         }
194                                                 }
195                                         }
196                                         myclass = strtok_r(NULL,' ',&savept);
197                                 }
198                         }
199                 }
200         }
201         return false;
202 }
.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). 
.PP
Definition at line 122 of file users.cpp.
.PP
References Invited::channel, and invites.
.PP
.nf
123 {
124         Invited i;
125         strlcpy(i.channel,channel,CHANMAX);
126         invites.push_back(i);
127 }
.fi
.PP
.SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP"
.PP
Returns true if a user is invited to a channel. 
.PP
Definition at line 103 of file users.cpp.
.PP
References invites.
.PP
.nf
104 {
105         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
106         {
107                 if (i->channel) {
108                         if (!strcasecmp(i->channel,channel))
109                         {
110                                 return true;
111                         }
112                 }
113         }
114         return false;
115 }
.fi
.PP
.SS "int userrec::ReadData (void * buffer, size_t size)"
.PP
Calls read() to read some data for this user using their fd. 
.PP
Definition at line 85 of file users.cpp.
.PP
References DEBUG.
.PP
.nf
86 {
87         if (this->fd > -1)
88         {
89                 log(DEBUG,'userrec::ReadData on fd %d',this->fd);
90                 return read(this->fd, buffer, size);
91         }
92         else return 0;
93 }
.fi
.PP
.SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP"
.PP
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 129 of file users.cpp.
.PP
References DEBUG, and invites.
.PP
.nf
130 {
131         log(DEBUG,'Removing invites');
132         if (channel)
133         {
134                 if (invites.size())
135                 {
136                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
137                         {
138                                 if (i->channel)
139                                 {
140                                         if (!strcasecmp(i->channel,channel))
141                                         {
142                                                 invites.erase(i);
143                                                 return;
144                                         }
145                                 }
146                         }
147                 }
148         }
149 }
.fi
.PP
.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 299 of file users.cpp.
.PP
References DEBUG, and WriteError.
.PP
Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
.PP
.nf
300 {
301         log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
302         // don't try to set the error twice, its already set take the first string.
303         if (this->WriteError == '')
304                 this->WriteError = error;
305 }
.fi
.PP
.SH "Member Data Documentation"
.PP 
.SS "char \fBuserrec::awaymsg\fP[MAXAWAY+1]"
.PP
The user's away message. 
.PP
If this string is empty, the user is not marked as away.
.PP
Definition at line 158 of file users.h.
.PP
Referenced by userrec().
.SS "\fBucrec\fP \fBuserrec::chans\fP[MAXCHANS]"
.PP
Definition at line 149 of file users.h.
.PP
Referenced by Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::dhost\fP[160]"
.PP
The host displayed to non-opers (used for cloaking etc). 
.PP
This usually matches the value of \fBuserrec::host\fP.
.PP
Definition at line 134 of file users.h.
.PP
Referenced by GetFullHost(), and userrec().
.SS "bool \fBuserrec::dns_done\fP"
.PP
True when \fBDNS\fP lookups are completed. 
.PP
Definition at line 181 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. 
.PP
Definition at line 164 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::fullname\fP[MAXGECOS+1]"
.PP
The users full name. 
.PP
Definition at line 138 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::ident\fP[IDENTMAX+2]"
.PP
The users ident reply. 
.PP
Two characters are added to the user-defined limit to compensate for the tilde etc.
.PP
Definition at line 129 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. 
.PP
Definition at line 117 of file users.h.
.PP
Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec().
.SS "int \fBuserrec::lines_in\fP"
.PP
Flood counters. 
.PP
Definition at line 206 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::modes\fP[54]"
.PP
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 147 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::nick\fP[NICKMAX]"
.PP
The users nickname. 
.PP
An invalid nickname indicates an unregistered connection prior to the NICK command.
.PP
Definition at line 124 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. 
.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 177 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::password\fP[MAXBUF]"
.PP
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 191 of file users.h.
.SS "unsigned int \fBuserrec::pingmax\fP"
.PP
Number of seconds between PINGs for this user (set from <connect:allow> tag. 
.PP
Definition at line 185 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 197 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. 
.PP
Definition at line 220 of file users.h.
.PP
Referenced by AddBuffer().
.SS "time_t \fBuserrec::reset_due\fP"
.PP
Definition at line 207 of file users.h.
.PP
Referenced by userrec().
.SS "\fBstd::string\fP \fBuserrec::sendq\fP"
.PP
User's send queue. 
.PP
Lines waiting to be sent are stored here until their buffer is flushed.
.PP
Definition at line 202 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. 
.PP
Definition at line 216 of file users.h.
.PP
Referenced by AddWriteBuf().
.SS "char* \fBuserrec::server\fP"
.PP
The server the user is connected to. 
.PP
Definition at line 153 of file users.h.
.PP
Referenced by userrec().
.SS "long \fBuserrec::threshold\fP"
.PP
Definition at line 208 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. 
.PP
Definition at line 170 of file users.h.
.PP
Referenced by userrec().
.SS "\fBstd::string\fP \fBuserrec::WriteError\fP"
.PP
Definition at line 212 of file users.h.
.PP
Referenced by GetWriteError(), and SetWriteError().

.SH "Author"
.PP 
Generated automatically by Doxygen for InspIRCd from the source code.