line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=pod |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Net::OSCAR::Common -- Net::OSCAR public constants |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
version 1.928 |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Net::OSCAR::Common; |
14
|
|
|
|
|
|
|
BEGIN { |
15
|
5
|
|
|
5
|
|
160
|
$Net::OSCAR::Common::VERSION = '1.928'; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$REVISION = '$Revision$'; |
19
|
|
|
|
|
|
|
|
20
|
5
|
|
|
5
|
|
25
|
use strict; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
184
|
|
21
|
5
|
|
|
5
|
|
29
|
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
334
|
|
22
|
5
|
|
|
5
|
|
26
|
use Scalar::Util qw(dualvar); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
852
|
|
23
|
|
|
|
|
|
|
require Exporter; |
24
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
%EXPORT_TAGS = ( |
27
|
|
|
|
|
|
|
standard => [qw( |
28
|
|
|
|
|
|
|
ADMIN_TYPE_PASSWORD_CHANGE |
29
|
|
|
|
|
|
|
ADMIN_TYPE_EMAIL_CHANGE |
30
|
|
|
|
|
|
|
ADMIN_TYPE_SCREENNAME_FORMAT |
31
|
|
|
|
|
|
|
ADMIN_TYPE_ACCOUNT_CONFIRM |
32
|
|
|
|
|
|
|
ADMIN_ERROR_UNKNOWN |
33
|
|
|
|
|
|
|
ADMIN_ERROR_DIFFSN |
34
|
|
|
|
|
|
|
ADMIN_ERROR_BADPASS |
35
|
|
|
|
|
|
|
ADMIN_ERROR_BADINPUT |
36
|
|
|
|
|
|
|
ADMIN_ERROR_BADLENGTH |
37
|
|
|
|
|
|
|
ADMIN_ERROR_TRYLATER |
38
|
|
|
|
|
|
|
ADMIN_ERROR_REQPENDING |
39
|
|
|
|
|
|
|
ADMIN_ERROR_CONNREF |
40
|
|
|
|
|
|
|
ADMIN_ERROR_EMAILLIM |
41
|
|
|
|
|
|
|
ADMIN_ERROR_EMAILBAD |
42
|
|
|
|
|
|
|
VISMODE_PERMITALL |
43
|
|
|
|
|
|
|
VISMODE_DENYALL |
44
|
|
|
|
|
|
|
VISMODE_PERMITSOME |
45
|
|
|
|
|
|
|
VISMODE_DENYSOME |
46
|
|
|
|
|
|
|
VISMODE_PERMITBUDS |
47
|
|
|
|
|
|
|
MODBL_ACTION_ADD |
48
|
|
|
|
|
|
|
MODBL_ACTION_DEL |
49
|
|
|
|
|
|
|
MODBL_WHAT_BUDDY |
50
|
|
|
|
|
|
|
MODBL_WHAT_GROUP |
51
|
|
|
|
|
|
|
MODBL_WHAT_PERMIT |
52
|
|
|
|
|
|
|
MODBL_WHAT_DENY |
53
|
|
|
|
|
|
|
TYPINGSTATUS_STARTED |
54
|
|
|
|
|
|
|
TYPINGSTATUS_TYPING |
55
|
|
|
|
|
|
|
TYPINGSTATUS_FINISHED |
56
|
|
|
|
|
|
|
RATE_CLEAR |
57
|
|
|
|
|
|
|
RATE_ALERT |
58
|
|
|
|
|
|
|
RATE_LIMIT |
59
|
|
|
|
|
|
|
RATE_DISCONNECT |
60
|
|
|
|
|
|
|
OSCAR_RATE_MANAGE_NONE |
61
|
|
|
|
|
|
|
OSCAR_RATE_MANAGE_AUTO |
62
|
|
|
|
|
|
|
OSCAR_RATE_MANAGE_MANUAL |
63
|
|
|
|
|
|
|
GROUPPERM_OSCAR |
64
|
|
|
|
|
|
|
GROUPPERM_AOL |
65
|
|
|
|
|
|
|
OSCAR_SVC_AIM |
66
|
|
|
|
|
|
|
OSCAR_SVC_ICQ |
67
|
|
|
|
|
|
|
OSCAR_DIRECT_IM |
68
|
|
|
|
|
|
|
OSCAR_DIRECT_FILESHARE |
69
|
|
|
|
|
|
|
OSCAR_DIRECT_FILEXFER |
70
|
|
|
|
|
|
|
OSCAR_RV_AUTO |
71
|
|
|
|
|
|
|
OSCAR_RV_NOPROXY |
72
|
|
|
|
|
|
|
OSCAR_RV_NODIRECT |
73
|
|
|
|
|
|
|
OSCAR_RV_MANUAL |
74
|
|
|
|
|
|
|
)], |
75
|
|
|
|
|
|
|
loglevels => [qw( |
76
|
|
|
|
|
|
|
OSCAR_DBG_NONE |
77
|
|
|
|
|
|
|
OSCAR_DBG_WARN |
78
|
|
|
|
|
|
|
OSCAR_DBG_INFO |
79
|
|
|
|
|
|
|
OSCAR_DBG_SIGNON |
80
|
|
|
|
|
|
|
OSCAR_DBG_NOTICE |
81
|
|
|
|
|
|
|
OSCAR_DBG_DEBUG |
82
|
|
|
|
|
|
|
OSCAR_DBG_PACKETS |
83
|
|
|
|
|
|
|
OSCAR_DBG_XML |
84
|
|
|
|
|
|
|
OSCAR_DBG_XML2 |
85
|
|
|
|
|
|
|
)] |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
$EXPORT_TAGS{all} = [@{$EXPORT_TAGS{standard}}, @{$EXPORT_TAGS{loglevels}}]; |
88
|
|
|
|
|
|
|
@EXPORT_OK = @{$EXPORT_TAGS{all}}; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# Log levels |
91
|
5
|
|
|
5
|
|
118
|
use constant OSCAR_DBG_NONE => 0; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
362
|
|
92
|
5
|
|
|
5
|
|
27
|
use constant OSCAR_DBG_WARN => 1; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
216
|
|
93
|
5
|
|
|
5
|
|
22
|
use constant OSCAR_DBG_INFO => 2; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
207
|
|
94
|
5
|
|
|
5
|
|
22
|
use constant OSCAR_DBG_SIGNON => 3; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
203
|
|
95
|
5
|
|
|
5
|
|
36
|
use constant OSCAR_DBG_NOTICE => 4; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
183
|
|
96
|
5
|
|
|
5
|
|
19
|
use constant OSCAR_DBG_DEBUG => 6; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
218
|
|
97
|
5
|
|
|
5
|
|
22
|
use constant OSCAR_DBG_PACKETS => 10; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
180
|
|
98
|
5
|
|
|
5
|
|
22
|
use constant OSCAR_DBG_XML => 30; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
199
|
|
99
|
5
|
|
|
5
|
|
24
|
use constant OSCAR_DBG_XML2 => 35; |
|
5
|
|
|
|
|
63
|
|
|
5
|
|
|
|
|
255
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
# Buddylist modification |
102
|
5
|
|
|
5
|
|
22
|
use constant MODBL_ACTION_ADD => dualvar(1, "add"); |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
300
|
|
103
|
5
|
|
|
5
|
|
23
|
use constant MODBL_ACTION_DEL => dualvar(2, "delete"); |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
398
|
|
104
|
5
|
|
|
5
|
|
22
|
use constant MODBL_WHAT_BUDDY => dualvar(1, "buddy"); |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
261
|
|
105
|
5
|
|
|
5
|
|
22
|
use constant MODBL_WHAT_GROUP => dualvar(2, "group"); |
|
5
|
|
|
|
|
28
|
|
|
5
|
|
|
|
|
263
|
|
106
|
5
|
|
|
5
|
|
26
|
use constant MODBL_WHAT_PERMIT => dualvar(3, "permit"); |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
225
|
|
107
|
5
|
|
|
5
|
|
21
|
use constant MODBL_WHAT_DENY => dualvar(4, "deny"); |
|
5
|
|
|
|
|
6476
|
|
|
5
|
|
|
|
|
477
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
# Typing statuses |
110
|
5
|
|
|
5
|
|
33
|
use constant TYPINGSTATUS_STARTED => dualvar(2, "typing started"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
277
|
|
111
|
5
|
|
|
5
|
|
21
|
use constant TYPINGSTATUS_TYPING => dualvar(1, "typing in progress"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
236
|
|
112
|
5
|
|
|
5
|
|
22
|
use constant TYPINGSTATUS_FINISHED => dualvar(0, "typing completed"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
255
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# Administrative functions |
115
|
5
|
|
|
5
|
|
24
|
use constant ADMIN_TYPE_PASSWORD_CHANGE => dualvar(1, "password change"); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
261
|
|
116
|
5
|
|
|
5
|
|
21
|
use constant ADMIN_TYPE_EMAIL_CHANGE => dualvar(2, "email change"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
242
|
|
117
|
5
|
|
|
5
|
|
24
|
use constant ADMIN_TYPE_SCREENNAME_FORMAT => dualvar(3, "screenname format"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
260
|
|
118
|
5
|
|
|
5
|
|
34
|
use constant ADMIN_TYPE_ACCOUNT_CONFIRM => dualvar(4, "account confirm"); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
269
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
# Adminsitrative responses |
121
|
5
|
|
|
5
|
|
22
|
use constant ADMIN_ERROR_UNKNOWN => dualvar(0, "unknown error"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
249
|
|
122
|
5
|
|
|
5
|
|
24
|
use constant ADMIN_ERROR_BADPASS => dualvar(1, "incorrect password"); |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
243
|
|
123
|
5
|
|
|
5
|
|
20
|
use constant ADMIN_ERROR_BADINPUT => dualvar(2, "invalid input"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
268
|
|
124
|
5
|
|
|
5
|
|
23
|
use constant ADMIN_ERROR_BADLENGTH => dualvar(3, "screenname/email/password is too long or too short"); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
321
|
|
125
|
5
|
|
|
5
|
|
23
|
use constant ADMIN_ERROR_TRYLATER => dualvar(4, "request could not be processed; wait a few minutes and try again"); |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
296
|
|
126
|
5
|
|
|
5
|
|
21
|
use constant ADMIN_ERROR_REQPENDING => dualvar(5, "request pending"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
273
|
|
127
|
5
|
|
|
5
|
|
22
|
use constant ADMIN_ERROR_CONNREF => dualvar(6, "couldn't connect to the admin server"); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
870
|
|
128
|
5
|
|
|
5
|
|
27
|
use constant ADMIN_ERROR_DIFFSN => dualvar(7, "the new screenname is not equivalent to the old screenname"); |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
260
|
|
129
|
5
|
|
|
5
|
|
23
|
use constant ADMIN_ERROR_EMAILLIM => dualvar(8, "the email address has too many screennames"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
356
|
|
130
|
5
|
|
|
5
|
|
23
|
use constant ADMIN_ERROR_EMAILBAD => dualvar(9, "the email address is invalid"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
269
|
|
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
# Direct connect types |
133
|
5
|
|
|
5
|
|
23
|
use constant OSCAR_DIRECT_IM => dualvar(1, "direct IM"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
212
|
|
134
|
5
|
|
|
5
|
|
20
|
use constant OSCAR_DIRECT_FILESHARE => dualvar(2, "file sharing"); |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
217
|
|
135
|
5
|
|
|
5
|
|
27
|
use constant OSCAR_DIRECT_FILEXFER => dualvar(3, "file transfer"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
186
|
|
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
# Rendezvous autonegotiate modes |
138
|
5
|
|
|
5
|
|
21
|
use constant OSCAR_RV_AUTO => "auto"; |
|
5
|
|
|
|
|
18
|
|
|
5
|
|
|
|
|
202
|
|
139
|
5
|
|
|
5
|
|
21
|
use constant OSCAR_RV_NOPROXY => "never proxy"; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
231
|
|
140
|
5
|
|
|
5
|
|
20
|
use constant OSCAR_RV_NODIRECT => "always proxy"; |
|
5
|
|
|
|
|
6
|
|
|
5
|
|
|
|
|
200
|
|
141
|
5
|
|
|
5
|
|
19
|
use constant OSCAR_RV_MANUAL => "manual negotiation"; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
221
|
|
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
# Visibility modes |
145
|
5
|
|
|
5
|
|
34
|
use constant VISMODE_PERMITALL => dualvar(0x1, "permit all"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
246
|
|
146
|
5
|
|
|
5
|
|
23
|
use constant VISMODE_DENYALL => dualvar(0x2, "deny all"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
208
|
|
147
|
5
|
|
|
5
|
|
23
|
use constant VISMODE_PERMITSOME => dualvar(0x3, "permit some"); |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
249
|
|
148
|
5
|
|
|
5
|
|
22
|
use constant VISMODE_DENYSOME => dualvar(0x4, "deny some"); |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
340
|
|
149
|
5
|
|
|
5
|
|
30
|
use constant VISMODE_PERMITBUDS => dualvar(0x5, "permit buddies"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
276
|
|
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
# Rate warning types |
152
|
5
|
|
|
5
|
|
21
|
use constant RATE_CLEAR => dualvar(1, "clear"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
4273
|
|
153
|
5
|
|
|
5
|
|
193
|
use constant RATE_ALERT => dualvar(2, "alert"); |
|
5
|
|
|
|
|
38
|
|
|
5
|
|
|
|
|
1243
|
|
154
|
5
|
|
|
5
|
|
198
|
use constant RATE_LIMIT => dualvar(3, "limit"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
1079
|
|
155
|
5
|
|
|
5
|
|
24
|
use constant RATE_DISCONNECT => dualvar(4, "disconnect"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
265
|
|
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
# Rate handling modes |
158
|
5
|
|
|
5
|
|
25
|
use constant OSCAR_RATE_MANAGE_NONE => dualvar(0, "none"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
1127
|
|
159
|
5
|
|
|
5
|
|
26
|
use constant OSCAR_RATE_MANAGE_AUTO => dualvar(1, "auto"); |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
272
|
|
160
|
5
|
|
|
5
|
|
89
|
use constant OSCAR_RATE_MANAGE_MANUAL => dualvar(2, "manual"); |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
256
|
|
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
# Group permissions |
163
|
5
|
|
|
5
|
|
121
|
use constant GROUPPERM_OSCAR => dualvar(0x18, "AOL Instant Messenger users"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
223
|
|
164
|
5
|
|
|
5
|
|
189
|
use constant GROUPPERM_AOL => dualvar(0x04, "AOL subscribers"); |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
361
|
|
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# Services - deprecated, modules should no longer use these directly |
167
|
5
|
|
|
|
|
409
|
use constant OSCAR_SVC_AIM => ( |
168
|
|
|
|
|
|
|
host => 'login.oscar.aol.com', |
169
|
|
|
|
|
|
|
port => 5190, |
170
|
|
|
|
|
|
|
supermajor => 0x0109, |
171
|
|
|
|
|
|
|
major => 5, |
172
|
|
|
|
|
|
|
minor => 9, |
173
|
|
|
|
|
|
|
subminor => 0, |
174
|
|
|
|
|
|
|
build => 0x0E76, |
175
|
|
|
|
|
|
|
subbuild => 0x00000111, |
176
|
|
|
|
|
|
|
clistr => "AOL Instant Messenger, version 5.9.3702/WIN32", |
177
|
|
|
|
|
|
|
hashlogin => 0, |
178
|
|
|
|
|
|
|
betainfo => "", |
179
|
5
|
|
|
5
|
|
25
|
); |
|
5
|
|
|
|
|
7
|
|
180
|
5
|
|
|
|
|
389
|
use constant OSCAR_SVC_ICQ => ( # Courtesy of SDiZ Cheng |
181
|
|
|
|
|
|
|
host => 'login.icq.com', |
182
|
|
|
|
|
|
|
port => 5190, |
183
|
|
|
|
|
|
|
supermajor => 0x010A, |
184
|
|
|
|
|
|
|
major => 5, |
185
|
|
|
|
|
|
|
minor => 0x2D, |
186
|
|
|
|
|
|
|
subminor => 0, |
187
|
|
|
|
|
|
|
build => 0xEC1, |
188
|
|
|
|
|
|
|
subbuild => 0x55, |
189
|
|
|
|
|
|
|
clistr => "ICQ Inc. - Product of ICQ (TM).2003a.5.45.1.3777.85", |
190
|
|
|
|
|
|
|
hashlogin => 1, |
191
|
5
|
|
|
5
|
|
24
|
); |
|
5
|
|
|
|
|
15
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
1; |