Crossfire Server, Trunk
sockproto.h
Go to the documentation of this file.
1 /* image.c */
2 int is_valid_faceset(int fsn);
3 void set_face_mode_cmd(char *buf, int len, socket_struct *ns);
4 void send_face_cmd(char *buff, int len, socket_struct *ns);
5 void esrv_send_face(socket_struct *ns, const Face *face, int nocache);
7 void send_image_sums(socket_struct *ns, char *params);
8 /* info.c */
9 void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message);
10 void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message);
11 void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format, ...) PRINTF_ARGS(6, 7);
12 void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1);
13 void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1);
14 void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1);
15 void rangetostring(const object *pl, char *obuf, size_t len);
16 void set_title(const object *pl, char *buf, size_t len);
17 void magic_mapping_mark(object *pl, char *map_mark, int strength);
18 void draw_magic_map(object *pl);
19 /* init.c */
20 void init_connection(socket_struct *ns, const char *from_ip);
22 void init_server(void);
23 void free_all_newserver(void);
26 /* item.c */
27 void esrv_draw_look(object *pl);
28 void esrv_send_inventory(object *pl, object *op);
29 void esrv_update_item(int flags, object *pl, object *op);
30 void esrv_send_item(object *pl, object *op);
31 void esrv_del_item(player *pl, object *ob);
32 void examine_cmd(char *buf, int len, player *pl);
33 void apply_cmd(char *buf, int len, player *pl);
34 void lock_item_cmd(uint8_t *data, int len, player *pl);
35 void mark_item_cmd(uint8_t *data, int len, player *pl);
36 void look_at(object *op, int dx, int dy);
37 void look_at_cmd(char *buf, int len, player *pl);
38 void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof);
39 void inscribe_scroll_cmd(char *buf, int len, player *pl);
40 /* loop.c */
41 void request_info_cmd(char *buf, int len, socket_struct *ns);
43 void watchdog(void);
44 void do_server(void);
45 void update_players(void);
46 /* lowlevel.c */
47 void SockList_Init(SockList *sl);
48 void SockList_Term(SockList *sl);
49 void SockList_Reset(SockList *sl);
51 void SockList_AddChar(SockList *sl, unsigned char c);
52 void SockList_AddShort(SockList *sl, uint16_t data);
53 void SockList_AddInt(SockList *sl, uint32_t data);
54 void SockList_AddInt64(SockList *sl, uint64_t data);
55 size_t SockList_Avail(const SockList *sl);
56 void SockList_AddString(SockList *sl, const char *data);
57 void SockList_AddData(SockList *sl, const void *data, size_t len);
58 void SockList_AddLen8Data(SockList *sl, const void *data, size_t len);
59 void SockList_AddLen16Data(SockList *sl, const void *data, size_t len);
60 void SockList_AddPrintf(SockList *sl, const char *format, ...);
63 int GetInt_String(const unsigned char *data);
64 short GetShort_String(const unsigned char *data);
65 int SockList_ReadPacket(int fd, SockList *sl, int len);
67 void reset_stats(struct CS_Stats *stats);
68 void write_cs_stats(void);
69 /* metaserver.c */
70 int count_players(void);
71 void metaserver_update(void);
72 int metaserver2_init(void);
73 void metaserver2_exit();
74 /* request.c */
75 void set_up_cmd(char *buf, int len, socket_struct *ns);
76 void add_me_cmd(char *buf, int len, socket_struct *ns);
77 void toggle_extended_infos_cmd(char *buf, int len, socket_struct *ns);
78 void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns);
79 void ask_smooth_cmd(char *buf, int len, socket_struct *ns);
80 void new_player_cmd(uint8_t *buf, int len, player *pl);
81 void reply_cmd(char *buf, int len, player *pl);
82 void version_cmd(char *buf, int len, socket_struct *ns);
83 void set_sound_cmd(char *buf, int len, socket_struct *ns);
85 void move_cmd(char *buf, int len, player *pl);
86 void send_query(socket_struct *ns, uint8_t flags, const char *text);
88 void esrv_new_player(player *pl, uint32_t weight);
90 void draw_client_map(object *pl);
91 void esrv_map_scroll(socket_struct *ns, int dx, int dy);
92 void send_plugin_custom_message(object *pl, char *buf);
94 void send_skill_info(socket_struct *ns, char *params);
95 void send_skill_extra(socket_struct *ns, char *params);
98 void send_race_info(socket_struct *ns, char *params);
100 void send_class_info(socket_struct *ns, char *params);
102 void esrv_remove_spell(player *pl, object *spell);
103 void esrv_send_pickup(player *pl);
104 void esrv_add_spells(player *pl, object *spell);
105 void send_tick(player *pl);
106 void send_file(socket_struct *ns, const char *file);
107 void account_login_cmd(char *buf, int len, socket_struct *ns);
108 void account_new_cmd(char *buf, int len, socket_struct *ns);
109 void account_add_player_cmd(char *buf, int len, socket_struct *ns);
110 void account_play_cmd(char *buf, int len, socket_struct *ns);
112 void create_player_cmd(char *buf, int len, socket_struct *ns);
113 void account_password(char *buf, int len, socket_struct *ns);
114 /* requestinfo.c */
116 void send_map_info(socket_struct *ns);
117 /* sounds.c */
118 void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action);
119 void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action);
120 void send_background_music(player *pl, const char *music);
121 void player_update_bg_music(object *player);
Face
Definition: face.h:14
send_image_info
void send_image_info(socket_struct *ns)
Definition: image.cpp:113
SockList_AddInt
void SockList_AddInt(SockList *sl, uint32_t data)
Definition: lowlevel.cpp:127
send_image_sums
void send_image_sums(socket_struct *ns, char *params)
Definition: image.cpp:138
reply_cmd
void reply_cmd(char *buf, int len, player *pl)
Definition: request.cpp:589
print_ext_msg
void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message)
Definition: info.cpp:62
SockList_AddInt64
void SockList_AddInt64(SockList *sl, uint64_t data)
Definition: lowlevel.cpp:140
init_connection
void init_connection(socket_struct *ns, const char *from_ip)
Definition: init.cpp:96
request_info_cmd
void request_info_cmd(char *buf, int len, socket_struct *ns)
Definition: loop.cpp:136
player
Definition: player.h:105
esrv_map_scroll
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
Definition: request.cpp:1709
socket_struct
Definition: newserver.h:89
init_server
void init_server(void)
Definition: init.cpp:283
esrv_new_player
void esrv_new_player(player *pl, uint32_t weight)
Definition: request.cpp:1009
esrv_send_inventory
void esrv_send_inventory(object *pl, object *op)
Definition: item.cpp:316
c
static event_registration c
Definition: citylife.cpp:425
SockList_AddString
void SockList_AddString(SockList *sl, const char *data)
Definition: lowlevel.cpp:157
PRINTF_ARGS
#define PRINTF_ARGS(x, y)
Definition: global.h:44
do_server
void do_server(void)
Definition: loop.cpp:535
esrv_send_pickup
void esrv_send_pickup(player *pl)
Definition: request.cpp:1836
guildjoin.ob
ob
Definition: guildjoin.py:42
mark_item_cmd
void mark_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.cpp:767
draw_ext_info_format
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
mad_mage_user.file
file
Definition: mad_mage_user.py:15
play_sound_player_only
void play_sound_player_only(player *pl, int8_t sound_type, object *emitter, int dir, const char *action)
Definition: sounds.cpp:51
send_new_char_info
void send_new_char_info(socket_struct *ns)
Definition: requestinfo.cpp:520
free_all_newserver
void free_all_newserver(void)
Definition: init.cpp:401
play_sound_map
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Definition: sounds.cpp:113
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.cpp:101
send_map_info
void send_map_info(socket_struct *ns)
Definition: requestinfo.cpp:441
esrv_update_spells
void esrv_update_spells(player *pl)
Definition: main.cpp:386
send_exp_table
void send_exp_table(socket_struct *ns)
Definition: requestinfo.cpp:158
send_account_players
void send_account_players(socket_struct *ns)
Definition: request.cpp:2059
esrv_add_spells
void esrv_add_spells(player *pl, object *spell)
Definition: request.cpp:1950
SockList_AddLen16Data
void SockList_AddLen16Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.cpp:191
toggle_extended_infos_cmd
void toggle_extended_infos_cmd(char *buf, int len, socket_struct *ns)
smoking_pipe.color
color
Definition: smoking_pipe.py:5
SockList_Reset
void SockList_Reset(SockList *sl)
Definition: lowlevel.cpp:74
buf
StringBuffer * buf
Definition: readable.cpp:1565
esrv_send_item
void esrv_send_item(object *pl, object *op)
Definition: main.cpp:354
SockList_Avail
size_t SockList_Avail(const SockList *sl)
Definition: lowlevel.cpp:246
GetShort_String
short GetShort_String(const unsigned char *data)
Definition: lowlevel.cpp:258
account_password
void account_password(char *buf, int len, socket_struct *ns)
Definition: request.cpp:3053
send_skill_info
void send_skill_info(socket_struct *ns, char *params)
Definition: requestinfo.cpp:71
account_login_cmd
void account_login_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:2186
look_at_cmd
void look_at_cmd(char *buf, int len, player *pl)
Definition: item.cpp:869
set_title
void set_title(const object *pl, char *buf, size_t len)
Definition: info.cpp:334
esrv_remove_spell
void esrv_remove_spell(player *pl, object *spell)
Definition: request.cpp:1813
disinfect.map
map
Definition: disinfect.py:4
final_free_player
void final_free_player(player *pl)
Definition: init.cpp:453
esrv_send_face
void esrv_send_face(socket_struct *ns, const Face *face, int nocache)
Definition: image.cpp:72
esrv_update_stats
void esrv_update_stats(player *pl)
Definition: request.cpp:867
ext_info_map_except2
void ext_info_map_except2(int color, const mapstruct *map, const object *op1, const object *op2, int type, int subtype, const char *str1)
Definition: info.cpp:245
handle_client
bool handle_client(socket_struct *ns, player *pl)
Definition: loop.cpp:257
SockList_AddShort
void SockList_AddShort(SockList *sl, uint16_t data)
Definition: lowlevel.cpp:116
ext_info_map
void void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
Definition: main.cpp:334
SockList_AddChar
void SockList_AddChar(SockList *sl, unsigned char c)
Definition: lowlevel.cpp:106
convert.action
action
Definition: convert.py:25
metaserver2_init
int metaserver2_init(void)
Definition: metaserver.cpp:332
send_background_music
void send_background_music(player *pl, const char *music)
Definition: sounds.cpp:150
draw_magic_map
void draw_magic_map(object *pl)
Definition: info.cpp:474
send_tick
void send_tick(player *pl)
Definition: request.cpp:2004
navar-midane_time.data
data
Definition: navar-midane_time.py:11
CFweardisguise.tag
tag
Definition: CFweardisguise.py:25
set_sound_cmd
void set_sound_cmd(char *buf, int len, socket_struct *ns)
ask_smooth_cmd
void ask_smooth_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:503
account_add_player_cmd
void account_add_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:2399
tag_t
uint32_t tag_t
Definition: object.h:14
animate.anim
string anim
Definition: animate.py:20
create_player_cmd
void create_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:2633
new_player_cmd
void new_player_cmd(uint8_t *buf, int len, player *pl)
Definition: request.cpp:527
account_play_cmd
void account_play_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:2528
SockList_Init
void SockList_Init(SockList *sl)
Definition: lowlevel.cpp:55
move_cmd
void move_cmd(char *buf, int len, player *pl)
Definition: request.cpp:708
guild_entry.text
text
Definition: guild_entry.py:41
send_class_info
void send_class_info(socket_struct *ns, char *params)
Definition: requestinfo.cpp:413
look_at
void look_at(object *op, int dx, int dy)
Definition: item.cpp:798
esrv_del_item
void esrv_del_item(player *pl, object *ob)
Definition: main.cpp:381
version_cmd
void version_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:651
send_plugin_custom_message
void send_plugin_custom_message(object *pl, char *buf)
Definition: request.cpp:1747
SockList_Term
void SockList_Term(SockList *sl)
Definition: lowlevel.cpp:65
metaserver2_exit
void metaserver2_exit()
Definition: metaserver.cpp:493
StringBuffer
Definition: stringbuffer.cpp:25
set_face_mode_cmd
void set_face_mode_cmd(char *buf, int len, socket_struct *ns)
send_race_list
void send_race_list(socket_struct *ns)
Definition: requestinfo.cpp:326
diamondslots.message
string message
Definition: diamondslots.py:57
esrv_send_animation
void esrv_send_animation(socket_struct *ns, const Animations *anim)
Definition: request.cpp:1039
free_newsocket
void free_newsocket(socket_struct *ns)
Definition: init.cpp:418
ext_info_map_except
void ext_info_map_except(int color, const mapstruct *map, const object *op, uint8_t type, uint8_t subtype, const char *str1)
Definition: info.cpp:219
inscribe_scroll_cmd
void inscribe_scroll_cmd(char *buf, int len, player *pl)
Definition: item.cpp:964
SockList_AddData
void SockList_AddData(SockList *sl, const void *data, size_t len)
Definition: lowlevel.cpp:167
esrv_move_object
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof)
Definition: item.cpp:899
send_class_list
void send_class_list(socket_struct *ns)
Definition: requestinfo.cpp:392
toggle_extended_text_cmd
void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns)
metaserver_update
void metaserver_update(void)
Definition: metaserver.cpp:81
mapstruct
Definition: map.h:313
write_cs_stats
void write_cs_stats(void)
give.op
op
Definition: give.py:33
Animations
Definition: face.h:25
update_players
void update_players(void)
Definition: loop.cpp:681
SockList_AddLen8Data
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.cpp:179
esrv_update_item
void esrv_update_item(int flags, object *pl, object *op)
Definition: main.cpp:359
esrv_draw_look
void esrv_draw_look(object *pl)
Definition: item.cpp:193
reset_stats
void reset_stats(struct CS_Stats *stats)
send_file
void send_file(socket_struct *ns, const char *file)
Definition: requestinfo.cpp:479
roll-o-matic.params
params
Definition: roll-o-matic.py:193
examine_cmd
void examine_cmd(char *buf, int len, player *pl)
Definition: item.cpp:646
magic_mapping_mark
void magic_mapping_mark(object *pl, char *map_mark, int strength)
Definition: info.cpp:427
SockList_ResetRead
void SockList_ResetRead(SockList *sl)
Definition: lowlevel.cpp:83
send_skill_extra
void send_skill_extra(socket_struct *ns, char *params)
Definition: requestinfo.cpp:102
send_spell_paths
void send_spell_paths(socket_struct *ns)
Definition: requestinfo.cpp:132
account_new_cmd
void account_new_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:2285
watchdog
void watchdog(void)
map_newmap_cmd
void map_newmap_cmd(socket_struct *ns)
Definition: request.cpp:687
GetInt_String
int GetInt_String(const unsigned char *data)
Definition: lowlevel.cpp:254
lock_item_cmd
void lock_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.cpp:708
draw_ext_info
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Definition: main.cpp:308
SockList_AddStringBuffer
void SockList_AddStringBuffer(SockList *sl, StringBuffer *sb)
Definition: lowlevel.cpp:225
count_players
int count_players(void)
Definition: metaserver.cpp:49
is_valid_faceset
int is_valid_faceset(int fsn)
Definition: image.cpp:117
SockList_ReadPacket
int SockList_ReadPacket(int fd, SockList *sl, int len)
Definition: lowlevel.cpp:275
set_up_cmd
void set_up_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:143
send_race_info
void send_race_info(socket_struct *ns, char *params)
Definition: requestinfo.cpp:347
CS_Stats
Definition: newclient.h:697
altar_valkyrie.pl
pl
Definition: altar_valkyrie.py:28
add_me_cmd
void add_me_cmd(char *buf, int len, socket_struct *ns)
Definition: request.cpp:415
draw_client_map
void draw_client_map(object *pl)
Definition: request.cpp:1648
send_query
void send_query(socket_struct *ns, uint8_t flags, const char *text)
Definition: request.cpp:746
Send_With_Handling
void Send_With_Handling(socket_struct *ns, SockList *sl)
Definition: lowlevel.cpp:447
SockList
Definition: newclient.h:684
apply_cmd
void apply_cmd(char *buf, int len, player *pl)
Definition: item.cpp:668
SockList_NullTerminate
void SockList_NullTerminate(SockList *sl)
Definition: lowlevel.cpp:237
send_face_cmd
void send_face_cmd(char *buff, int len, socket_struct *ns)
Definition: image.cpp:45
rangetostring
void rangetostring(const object *pl, char *obuf, size_t len)
Definition: info.cpp:264
is_valid_types_gen.type
list type
Definition: is_valid_types_gen.py:25
SockList_AddPrintf
void SockList_AddPrintf(SockList *sl, const char *format,...)
Definition: lowlevel.cpp:202
player_update_bg_music
void player_update_bg_music(object *player)
Definition: sounds.cpp:170
init_listening_socket
void init_listening_socket(socket_struct *ns)
Definition: init.cpp:192