-
Notifications
You must be signed in to change notification settings - Fork 0
/
PBUSER.CPP
104 lines (76 loc) · 2.46 KB
/
PBUSER.CPP
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
#define Use_MsgBase
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include "proboard.hpp"
void User::list( char *s,
bool aliases )
{
struct User tuser;
io << S_USER_LIST_HEADER
<< '\n';
linecounter( 2 );
io.enablestop();
for ( int rec = 0; ; rec++ )
{
if ( ! tuser.read( rec ) )
{
break;
}
if (
tuser.uFlags & (
UFLAG_DELETED |
UFLAG_HIDDEN
)
)
{
continue;
}
if ( s[ 0 ] &&
fuzzy_search( s,
( aliases
? tuser.alias
: tuser.name ),
75 ) < 0 )
{
continue;
}
if ( ! strcmpl( ( aliases
? tuser.alias
: tuser.name ),
cfg.sysopname ) &&
cfg.discrete )
{
continue;
}
String id;
for ( int i = 0; i < num_limits; i++ )
{
if ( limit[ i ].level == tuser.level )
{
id = limit[ i ].id;
}
}
if ( io.send( form( "\3%-30.30s \6%-18.18s \2%02d %s %02d, %02d:%02d \6%5ld \7%s\n",
( aliases
? tuser.alias
: tuser.name ),
tuser.city,
tuser.lastDate[ 0 ],
months_short[ tuser.lastDate[ 1 ] ],
tuser.lastDate[ 2 ] % 100, // Y2K FIXED!
// tuser.lastDate[ 2 ], // Y2K BUG!
tuser.lastTime[ 0 ],
tuser.lastTime[ 1 ],
tuser.timesCalled,
(char *) id ) ) )
{
break;
}
if ( linecounter() )
{
break;
}
}
}