Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
chatdefs.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef CHATDEFS_HEADER
20#define CHATDEFS_HEADER
21
22// gks 11/3/1999: version numbers for SetClientVersion
23// GMU 01/12/01 : bumped CHAT_VERSION_MINOR to 15
24// BGC 6/7/01: now version 16
25#define CHAT_VERSION_MAJOR 1
26#define CHAT_VERSION_MINOR 16
27
28#define CHAT_VERSION ( ( CHAT_VERSION_MAJOR << 16 ) | ( CHAT_VERSION_MINOR ) )
29
30//
31// Response errors (Sent as arguments to the OnFoo calls)
32//
33
34// Your nick is still logged into chat
35#define CHAT_E_NICKINUSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 100)
36// Your password is incorrect during login
37#define CHAT_E_BADPASS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 101)
38// Reference made to non-existant user or channel
39#define CHAT_E_NONESUCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 102)
40// The network layer is down or cannot be initialized for some reason
41#define CHAT_E_CON_NETDOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 103)
42// Name lookup (e.g DNS) failed for some reason
43#define CHAT_E_CON_LOOKUP_FAILED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 104)
44// Some fatal error occured with the net connection
45#define CHAT_E_CON_ERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 105)
46// General request timeout for a request
47#define CHAT_E_TIMEOUT MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 106)
48// Must patch before continuing
49#define CHAT_E_MUSTPATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 107)
50// Miscellaneous internal status error
51#define CHAT_E_STATUSERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 108)
52// Server has returned something we don't recognise
53#define CHAT_E_UNKNOWNRESPONSE MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 109)
54// Tried to join a channel that has enough players already
55#define CHAT_E_CHANNELFULL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 110)
56// Tried to create a channel that already exists
57#define CHAT_E_CHANNELEXISTS MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 111)
58// Tried to join a channel that does not exist
59#define CHAT_E_CHANNELDOESNOTEXIST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 112)
60// Tried to join a channel with the wrong password
61#define CHAT_E_BADCHANNELPASSWORD MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 113)
62// You've been banned from the server / channel
63#define CHAT_E_BANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 114)
64// You tried to do something that required operator status
65#define CHAT_E_NOT_OPER MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 115)
66// Your account is disabled
67#define CHAT_E_DISABLED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 116)
68// Your serial# has been banned
69#define CHAT_E_SERIALBANNED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 117)
70// Somebody else is using your serial#
71#define CHAT_E_SERIALDUP MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 118)
72
73// New error codes -- gks 1/10/2000
74// Serial number does not exist in the database
75#define CHAT_E_SERIALUNKNOWN MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 119)
76// Serial number is for a different product
77#define CHAT_E_SKUSERIALMISMATCH MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 120)
78
79//
80// Response success codes (non-error arguments passed to the OnFoo callbacks)
81// Note: S_OK is the usual success code
82
83// A network connection is underway
84#define CHAT_S_CON_CONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 300)
85// A network connection is complete
86#define CHAT_S_CON_CONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 301)
87// A network connection is going down
88#define CHAT_S_CON_DISCONNECTING MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 302)
89// A network connection is closed
90#define CHAT_S_CON_DISCONNECTED MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 303)
91
92
93// Find - Nick not in system
94#define CHAT_S_FIND_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 304)
95// Find - Not in any channels
96#define CHAT_S_FIND_NOCHAN MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 305)
97// Find - user has find turned off
98#define CHAT_S_FIND_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 306)
99
100
101// Page - Nick not in system
102#define CHAT_S_PAGE_NOTHERE MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 307)
103// Page - user has page turned off
104#define CHAT_S_PAGE_OFF MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 308)
105
106// This channel list is only a ping update
107#define CHAT_S_PINGLIST MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_ITF, 315)
108
109
110
111
112
113
114
115//
116// Request errors (returned from the RequestFoo calls)
117//
118
119// You are not connected to the chat server
120#define CHAT_E_NOTCONNECTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 500)
121// You are not in a channel
122#define CHAT_E_NOCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 501)
123// Feature is not implemented
124#define CHAT_E_NOTIMPLEMENTED MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 502)
125// The request was made while while a conflicting request was still pending
126#define CHAT_E_PENDINGREQUEST MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 503)
127// Invalid parameter passed - usually a NULL pointer
128#define CHAT_E_PARAMERROR MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 504)
129// Tried to create or join a channel before leaving the previous one
130#define CHAT_E_LEAVECHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 508)
131// Tried to send something to a channel when not a member of any channel
132#define CHAT_E_JOINCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 509)
133// Tried to join a non-existant channel
134#define CHAT_E_UNKNOWNCHANNEL MAKE_HRESULT( SEVERITY_ERROR, FACILITY_ITF, 510)
135
136
137//
138// Request success codes
139// Notes: S_OK is the usual success code
140
141//
142// Channel list filter values
143//
144
145#define CHAT_CHANNEL_LIST_ALL -99999
146
147//
148// User flags (bit field)
149//
150// The owner of the current channel
151#define CHAT_USER_CHANNELOWNER 0x0001
152// The person with voice (conch shell...)
153#define CHAT_USER_VOICE 0x0002
154// Squelched?
155#define CHAT_USER_SQUELCHED 0x0004
156// The local user
157#define CHAT_USER_MYSELF 0x8000
158
159//
160// Channel flags (bit field)
161//
162#define CHAN_MODE_PRIVATE 0x0004
163#define CHAN_MODE_SECRET 0x0008
164#define CHAN_MODE_MODERATED 0x0010
165#define CHAN_MODE_TOPICLIMIT 0x0020
166#define CHAN_MODE_INVITEONLY 0x0040
167#define CHAN_MODE_NOPRIVMSGS 0x0080
168#define CHAN_MODE_KEY 0x0100
169#define CHAN_MODE_BAN 0x0200
170#define CHAN_MODE_LIMIT 0x0400
171
172
173#endif