コード例 #1
0
ファイル: command_send.c プロジェクト: reiszner/judged
void com_send(struct message_proc_t *input, wchar_t word[][MSGLEN], Game *game, Whois *whois, struct buffer_t *out) {
	int option;

	option = take_option(input, word, MSGIN__WORDS);
	switch (option) {

		case MSGIN_SEND_DEDICATION:
			append_to_message(out, L"SEND_DEDICATION gefunden.\n");
			break;

		case MSGIN_SEND_LOGFILE:
			append_to_message(out, L"SEND_LOGFILE gefunden.\n");
			break;

		case MSGIN_SEND_PACKAGE:
			append_to_message(out, L"SEND_PACKAGE gefunden.\n");
			break;

		case MSGIN_SEND_RESULT:
			append_to_message(out, L"SEND_RESULT gefunden.\n");
			break;

		default:
			append_to_message(out, L"SEND unbekannt.\n");
			break;
	}
	return;
}
コード例 #2
0
ファイル: command_become.c プロジェクト: reiszner/judged
void com_become(struct message_proc_t *input, wchar_t word[][MSGLEN], Game *game, Whois *whois, struct buffer_t *out) {
	int option;

	if (!game) {
		append_to_message(out, L"Sie sind in keinem Spiel eingeloggt.\n");
		append_to_message(out, L"Brauche zuerst ein SIGNON.\n");
		return;
	}

	option = take_option(input, word, MSGIN__WORDS);
	switch (option) {

		case MSGIN_BECOME_MASTER:
			append_to_message(out, L"BECOME_MASTER gefunden.\n");
			break;

		default:
			append_to_message(out, L"BECOME unbekannt.\n");
			break;
	}
	return;
}
コード例 #3
0
static void
add_option_u64 (GHashTable *options, const ReqOption *requests, guint option, guint64 value)
{
	if (options)
		take_option (options, requests, option, g_strdup_printf ("%" G_GUINT64_FORMAT, value));
}
コード例 #4
0
static void
add_option_u32 (GHashTable *options, const ReqOption *requests, guint option, guint32 value)
{
	if (options)
		take_option (options, requests, option, g_strdup_printf ("%u", value));
}
コード例 #5
0
static void
add_option (GHashTable *options, const ReqOption *requests, guint option, const char *value)
{
	if (options)
		take_option (options, requests, option, g_strdup (value));
}