Go to the documentation of this file.
41 const char *
const directions[] = {
"stay",
"north",
"northeast",
42 "east",
"southeast",
"south",
43 "southwest",
"west",
"northwest"};
54 void new_player(
long tag,
char *name,
long weight,
long face) {
55 Spell *spell, *spnext;
62 if (strlen(name) != 0) {
135 snprintf(buf,
sizeof(buf),
"fire %d", dir);
153 snprintf(buf,
sizeof(buf),
"run %d", dir);
165 for (
int i = 0; i < 9; i++) {
223 return strncmp(prefix, str, strlen(prefix)) == 0;
236 static char last_command[
MAX_BUF]=
"";
240 LOG(
LOG_ERROR,
"common::send_command",
"Wont send command '%s' - since in reply mode!",
272 fprintf(stderr,
"Wont send command %s - window oversized %d %d\n",
281 strcpy(last_command, command);
302 if (
drun == -1 && dir != -1) {
321 LOG(
LOG_ERROR,
"common::CompleteCmd",
"Invalid length %d - ignoring", len);
328 gint64 now = g_get_monotonic_time();
330 printf(
"profile/comc\t%d\t%" G_GINT64_FORMAT
"\t%d\t%d\n",
337 if (
drun == -1 && dir != -1) {
361 "There is nothing in the container to move");
short GetShort_String(const unsigned char *data)
void client_send_move(int loc, int tag, int nrof)
void SockList_Init(SockList *sl, guint8 *buf)
void script_sync(int commdiff)
int SockList_Send(SockList *sl, GSocketConnection *c)
void SockList_AddShort(SockList *sl, guint16 data)
void new_player(long tag, char *name, long weight, long face)
int GetInt_String(const unsigned char *data)
void keybindings_init(const char *character_name)
void SockList_AddInt(SockList *sl, guint32 data)
struct Spell_struct * next
const char *const directions[]
void command_take(const char *command, const char *cpnext)
void SockList_AddString(SockList *sl, const char *str)
void script_monitor(const char *command, int repeat, int must_send)
void LOG(LogLevel level, const char *origin, const char *format,...)
int cs_print_string(GSocketConnection *fd, const char *str,...)
void draw_ext_info(int orig_color, int type, int subtype, const char *message)
static bool starts_with(const char *prefix, const char *str)
int command_to_direction(const char *dir)
int send_command(const char *command, int repeat, int must_send)
@ LOG_ERROR
Warning that something definitely didn't work.
void predict_scroll(int dir)
void client_send_apply(int tag)
const char * dir_to_command(int dir)
#define MSG_TYPE_CLIENT_NOTICE
gint16 use_config[CONFIG_NUMS]
void look_at(int x, int y)
void client_send_examine(int tag)
void CompleteCmd(unsigned char *data, int len)