1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
22 #include "nel/misc/command.h"
25 #include "game_share/utils.h"
28 #include "gus_net_types.h"
29 #include "ce_contest_executor.h"
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
37 using namespace NLMISC
;
38 using namespace GUSNET
;
42 //-----------------------------------------------------------------------------
43 // CContestExecutor Commands
44 //-----------------------------------------------------------------------------
46 NLMISC_CATEGORISED_COMMAND(ContestExecutor
,ceAnswer
,"submit an answer","<player_id> <answer>")
48 CNLSmartLogOverride
logOverride(&log
);
53 CContestExecutor::getInstance()->submitAnswer(TDataSetRow(), args
[0], ucstring(args
[1]));
58 NLMISC_CATEGORISED_COMMAND(ContestExecutor
,ceChatTexts
,"load the file of static chat messages","<file name>")
60 CNLSmartLogOverride
logOverride(&log
);
65 if (CContestExecutor::getInstance()->readChatTextFile(args
[0]))
67 log
.displayNL("Chat text file '%s' loaded", args
[0].c_str());
71 log
.displayNL("FAILED to load file '%s'", args
[0].c_str());
77 NLMISC_CATEGORISED_COMMAND(ContestExecutor
,ceDisplayState
,"display the state of the contest executor module","")
79 CNLSmartLogOverride
logOverride(&log
);
84 CContestExecutor::getInstance()->display();
90 //-----------------------------------------------------------------------------