[asterisk-commits] twilson: branch twilson/config_work r367119 - in /team/twilson/config_work: a...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun May 20 11:28:09 CDT 2012


Author: twilson
Date: Sun May 20 11:27:57 2012
New Revision: 367119

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367119
Log:
Update config, move some comments

Modified:
    team/twilson/config_work/apps/app_skel.c
    team/twilson/config_work/configs/app_skel.conf.sample

Modified: team/twilson/config_work/apps/app_skel.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/apps/app_skel.c?view=diff&rev=367119&r1=367118&r2=367119
==============================================================================
--- team/twilson/config_work/apps/app_skel.c (original)
+++ team/twilson/config_work/apps/app_skel.c Sun May 20 11:27:57 2012
@@ -355,11 +355,11 @@
 	game->cheat = ast_test_flag(&flags, OPTION_CHEAT) || cfg->global->cheat;
 
 	for (game->games_left = game->total_games; game->games_left; game->games_left--) {
+		uint32_t num = ast_random() % level->max_num; /* random number between 0 and level->max_num */
+
+		ast_debug(1, "They should totally should guess %u\n", num);
+
 		/* Play the prompt */
-		uint32_t num = ast_random() % level->max_num; /* random number between 0 and level->max_num */
-
-		ast_debug(1, "They should totally should guess %u\n", num);
-
 		play_files_helper(chan, cfg->global->prompt);
 		ast_say_number(chan, level->max_num, "", ast_channel_language(chan), "");
 
@@ -368,11 +368,14 @@
 			char buf[buflen];
 			int guess;
 			buf[buflen] = '\0';
+
 			/* Read the number pressed */
 			ast_readstring(chan, buf, buflen - 1, 2000, 10000, "");
 			if (ast_parse_arg(buf, PARSE_INT32 | PARSE_IN_RANGE, &guess, 0, level->max_num)) {
 				continue;
 			}
+
+			/* Inform whether the guess was right, low, or high */
 			if (guess == num && !game->cheat) {
 				/* win */
 				win = 1;

Modified: team/twilson/config_work/configs/app_skel.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/twilson/config_work/configs/app_skel.conf.sample?view=diff&rev=367119&r1=367118&r2=367119
==============================================================================
--- team/twilson/config_work/configs/app_skel.conf.sample (original)
+++ team/twilson/config_work/configs/app_skel.conf.sample Sun May 20 11:27:57 2012
@@ -3,9 +3,12 @@
 cheat=no
 
 [sounds]
-;prompt=please-enter-your,number,queue-less-than
+prompt=please-enter-your,number,queue-less-than
 wrong_guess=vm-pls-try-again
 right_guess=auth-thankyou
+too_high=high
+too_low=low
+lose=vm-goodbye
 
 [easy]
 max_number=10




More information about the asterisk-commits mailing list