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, ...);
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 write_cs_stats(void);
68 /* metaserver.c */
69 int count_players(void);
70 int count_all_players(void);
71 void metaserver_init(void);
72 void metaserver_update(void);
73 int metaserver2_init(void);
74 void *metaserver2_thread(void *junk);
75 /* request.c */
76 void set_up_cmd(char *buf, int len, socket_struct *ns);
77 void add_me_cmd(char *buf, int len, socket_struct *ns);
78 void toggle_extended_infos_cmd(char *buf, int len, socket_struct *ns);
79 void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns);
80 void ask_smooth_cmd(char *buf, int len, socket_struct *ns);
81 void new_player_cmd(uint8_t *buf, int len, player *pl);
82 void reply_cmd(char *buf, int len, player *pl);
83 void version_cmd(char *buf, int len, socket_struct *ns);
84 void set_sound_cmd(char *buf, int len, socket_struct *ns);
86 void move_cmd(char *buf, int len, player *pl);
87 void send_query(socket_struct *ns, uint8_t flags, const char *text);
89 void esrv_new_player(player *pl, uint32_t weight);
91 void draw_client_map(object *pl);
92 void esrv_map_scroll(socket_struct *ns, int dx, int dy);
93 void send_plugin_custom_message(object *pl, char *buf);
95 void send_skill_info(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.c:121
SockList_AddInt
void SockList_AddInt(SockList *sl, uint32_t data)
Definition: lowlevel.c:124
send_image_sums
void send_image_sums(socket_struct *ns, char *params)
Definition: image.c:142
reply_cmd
void reply_cmd(char *buf, int len, player *pl)
Definition: request.c:522
print_ext_msg
void print_ext_msg(socket_struct *ns, int color, uint8_t type, uint8_t subtype, const char *message)
Definition: info.c:62
SockList_AddInt64
void SockList_AddInt64(SockList *sl, uint64_t data)
Definition: lowlevel.c:137
init_connection
void init_connection(socket_struct *ns, const char *from_ip)
Definition: init.c:85
request_info_cmd
void request_info_cmd(char *buf, int len, socket_struct *ns)
Definition: loop.c:134
esrv_map_scroll
void esrv_map_scroll(socket_struct *ns, int dx, int dy)
Definition: request.c:1613
socket_struct
Definition: newserver.h:89
init_server
void init_server(void)
Definition: init.c:263
esrv_new_player
void esrv_new_player(player *pl, uint32_t weight)
Definition: request.c:942
esrv_send_inventory
void esrv_send_inventory(object *pl, object *op)
Definition: item.c:315
c
static event_registration c
Definition: citylife.cpp:427
SockList_AddString
void SockList_AddString(SockList *sl, const char *data)
Definition: lowlevel.c:154
pl
Definition: player.h:105
do_server
void do_server(void)
Definition: loop.c:556
esrv_send_pickup
void esrv_send_pickup(player *pl)
Definition: request.c:1740
guildjoin.ob
ob
Definition: guildjoin.py:42
mark_item_cmd
void mark_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.c:762
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.c:51
send_new_char_info
void send_new_char_info(socket_struct *ns)
Definition: requestinfo.c:511
free_all_newserver
void free_all_newserver(void)
Definition: init.c:394
play_sound_map
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Definition: sounds.c:113
send_map_info
void send_map_info(socket_struct *ns)
Definition: requestinfo.c:447
esrv_update_spells
void esrv_update_spells(player *pl)
Definition: main.c:387
send_exp_table
void send_exp_table(socket_struct *ns)
Definition: requestinfo.c:127
flags
static const flag_definition flags[]
Definition: gridarta-types-convert.c:101
ext_info_map
void ext_info_map(int color, const mapstruct *map, uint8_t type, uint8_t subtype, const char *str1)
Definition: main.c:335
send_account_players
void send_account_players(socket_struct *ns)
Definition: request.c:1981
esrv_add_spells
void esrv_add_spells(player *pl, object *spell)
Definition: request.c:1854
SockList_AddLen16Data
void SockList_AddLen16Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:188
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.c:71
esrv_send_item
void esrv_send_item(object *pl, object *op)
Definition: main.c:355
SockList_Avail
size_t SockList_Avail(const SockList *sl)
Definition: lowlevel.c:243
GetShort_String
short GetShort_String(const unsigned char *data)
Definition: lowlevel.c:255
account_password
void account_password(char *buf, int len, socket_struct *ns)
Definition: request.c:2981
send_skill_info
void send_skill_info(socket_struct *ns, char *params)
Definition: requestinfo.c:70
account_login_cmd
void account_login_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2113
look_at_cmd
void look_at_cmd(char *buf, int len, player *pl)
Definition: item.c:858
set_title
void set_title(const object *pl, char *buf, size_t len)
Definition: info.c:334
esrv_remove_spell
void esrv_remove_spell(player *pl, object *spell)
Definition: request.c:1717
disinfect.map
map
Definition: disinfect.py:4
final_free_player
void final_free_player(player *pl)
Definition: init.c:443
esrv_send_face
void esrv_send_face(socket_struct *ns, const Face *face, int nocache)
Definition: image.c:71
esrv_update_stats
void esrv_update_stats(player *pl)
Definition: request.c:800
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.c:245
handle_client
bool handle_client(socket_struct *ns, player *pl)
Definition: loop.c:253
SockList_AddShort
void SockList_AddShort(SockList *sl, uint16_t data)
Definition: lowlevel.c:113
count_all_players
int count_all_players(void)
Definition: metaserver.c:72
SockList_AddChar
void SockList_AddChar(SockList *sl, unsigned char c)
Definition: lowlevel.c:103
convert.action
action
Definition: convert.py:25
metaserver2_init
int metaserver2_init(void)
Definition: metaserver.c:171
send_background_music
void send_background_music(player *pl, const char *music)
Definition: sounds.c:141
draw_magic_map
void draw_magic_map(object *pl)
Definition: info.c:474
send_tick
void send_tick(player *pl)
Definition: request.c:1913
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.c:437
account_add_player_cmd
void account_add_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2326
tag_t
uint32_t tag_t
Definition: object.h:12
animate.anim
string anim
Definition: animate.py:20
create_player_cmd
void create_player_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2561
mapdef
Definition: map.h:324
new_player_cmd
void new_player_cmd(uint8_t *buf, int len, player *pl)
Definition: request.c:461
account_play_cmd
void account_play_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2455
SockList_Init
void SockList_Init(SockList *sl)
Definition: lowlevel.c:52
move_cmd
void move_cmd(char *buf, int len, player *pl)
Definition: request.c:641
guild_entry.text
text
Definition: guild_entry.py:44
send_class_info
void send_class_info(socket_struct *ns, char *params)
Definition: requestinfo.c:396
look_at
void look_at(object *op, int dx, int dy)
Definition: item.c:793
esrv_del_item
void esrv_del_item(player *pl, object *ob)
Definition: main.c:382
version_cmd
void version_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:584
send_plugin_custom_message
void send_plugin_custom_message(object *pl, char *buf)
Definition: request.c:1651
SockList_Term
void SockList_Term(SockList *sl)
Definition: lowlevel.c:62
StringBuffer
Definition: stringbuffer.c: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.c:305
metaserver_init
void metaserver_init(void)
diamondslots.message
string message
Definition: diamondslots.py:57
animations_struct
Definition: face.h:25
esrv_send_animation
void esrv_send_animation(socket_struct *ns, const Animations *anim)
Definition: request.c:972
free_newsocket
void free_newsocket(socket_struct *ns)
Definition: init.c:411
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.c:219
inscribe_scroll_cmd
void inscribe_scroll_cmd(char *buf, int len, player *pl)
Definition: item.c:953
SockList_AddData
void SockList_AddData(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:164
esrv_move_object
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof)
Definition: item.c:888
send_class_list
void send_class_list(socket_struct *ns)
Definition: requestinfo.c:375
toggle_extended_text_cmd
void toggle_extended_text_cmd(char *buf, int len, socket_struct *ns)
metaserver_update
void metaserver_update(void)
Definition: metaserver.c:85
write_cs_stats
void write_cs_stats(void)
give.op
op
Definition: give.py:33
update_players
void update_players(void)
Definition: loop.c:699
SockList_AddLen8Data
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
Definition: lowlevel.c:176
metaserver2_thread
void * metaserver2_thread(void *junk)
Definition: metaserver.c:516
esrv_update_item
void esrv_update_item(int flags, object *pl, object *op)
Definition: main.c:360
esrv_draw_look
void esrv_draw_look(object *pl)
Definition: item.c:192
send_file
void send_file(socket_struct *ns, const char *file)
Definition: requestinfo.c:470
roll-o-matic.params
params
Definition: roll-o-matic.py:193
examine_cmd
void examine_cmd(char *buf, int len, player *pl)
Definition: item.c:641
magic_mapping_mark
void magic_mapping_mark(object *pl, char *map_mark, int strength)
Definition: info.c:427
buf
StringBuffer * buf
Definition: readable.c:1610
SockList_ResetRead
void SockList_ResetRead(SockList *sl)
Definition: lowlevel.c:80
send_spell_paths
void send_spell_paths(socket_struct *ns)
Definition: requestinfo.c:101
account_new_cmd
void account_new_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:2212
watchdog
void watchdog(void)
map_newmap_cmd
void map_newmap_cmd(socket_struct *ns)
Definition: request.c:620
GetInt_String
int GetInt_String(const unsigned char *data)
Definition: lowlevel.c:251
lock_item_cmd
void lock_item_cmd(uint8_t *data, int len, player *pl)
Definition: item.c:703
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.c:309
SockList_AddStringBuffer
void SockList_AddStringBuffer(SockList *sl, StringBuffer *sb)
Definition: lowlevel.c:222
count_players
int count_players(void)
Definition: metaserver.c:46
is_valid_faceset
int is_valid_faceset(int fsn)
Definition: image.c:116
SockList_ReadPacket
int SockList_ReadPacket(int fd, SockList *sl, int len)
Definition: lowlevel.c:272
set_up_cmd
void set_up_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:95
send_race_info
void send_race_info(socket_struct *ns, char *params)
Definition: requestinfo.c:326
add_me_cmd
void add_me_cmd(char *buf, int len, socket_struct *ns)
Definition: request.c:349
draw_client_map
void draw_client_map(object *pl)
Definition: request.c:1552
send_query
void send_query(socket_struct *ns, uint8_t flags, const char *text)
Definition: request.c:679
Send_With_Handling
void Send_With_Handling(socket_struct *ns, SockList *sl)
Definition: lowlevel.c:440
SockList
Definition: newclient.h:681
apply_cmd
void apply_cmd(char *buf, int len, player *pl)
Definition: item.c:663
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,...)
Definition: main.c:319
SockList_NullTerminate
void SockList_NullTerminate(SockList *sl)
Definition: lowlevel.c:234
send_face_cmd
void send_face_cmd(char *buff, int len, socket_struct *ns)
Definition: image.c:44
rangetostring
void rangetostring(const object *pl, char *obuf, size_t len)
Definition: info.c: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.c:199
player_update_bg_music
void player_update_bg_music(object *player)
init_listening_socket
void init_listening_socket(socket_struct *ns)
Definition: init.c:172