Added amb<536> requested for using sm_kick without putting quotes around reason.
3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #include "ConCmdManager.h"
16 #include "sm_srvcmds.h"
17 #include "AdminCache.h"
18 #include "sm_stringutil.h"
19 #include "PlayerManager.h"
20 #include "Translator.h"
21 #include "HalfLife2.h"
22 #include "ChatTriggers.h"
24 ConCmdManager g_ConCmds;
26 SH_DECL_HOOK0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
27 SH_DECL_HOOK1_void(IServerGameClients, SetCommandClient, SH_NOATTRIB, false, int);
35 typedef List<PlCmdInfo> CmdList;
37 void AddToPlCmdList(CmdList *pList, const PlCmdInfo &info);
39 ConCmdManager::ConCmdManager() : m_Strings(1024)
41 m_pCmds = sm_trie_create();
42 m_pCmdGrps = sm_trie_create();
46 ConCmdManager::~ConCmdManager()
48 sm_trie_destroy(m_pCmds);
49 sm_trie_destroy(m_pCmdGrps);
52 void ConCmdManager::OnSourceModAllInitialized()
54 g_PluginSys.AddPluginsListener(this);
55 g_RootMenu.AddRootConsoleCommand("cmds", "List console commands", this);
56 SH_ADD_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, serverClients, this, &ConCmdManager::SetCommandClient, false);
59 void ConCmdManager::OnSourceModShutdown()
61 /* All commands should already be removed by the time we're done */
62 SH_REMOVE_HOOK_MEMFUNC(IServerGameClients, SetCommandClient, serverClients, this, &ConCmdManager::SetCommandClient, false);
63 g_RootMenu.RemoveRootConsoleCommand("cmds", this);
66 void ConCmdManager::RemoveConCmds(List<CmdHook *> &cmdlist, IPluginContext *pContext)
68 List<CmdHook *>::iterator iter = cmdlist.begin();
71 while (iter != cmdlist.end())
74 if (pHook->pf->GetParentContext() == pContext)
78 iter = cmdlist.erase(iter);
85 void ConCmdManager::OnPluginDestroyed(IPlugin *plugin)
88 List<ConCmdInfo *> removed;
89 if (plugin->GetProperty("CommandList", (void **)&pList, true))
91 IPluginContext *pContext = plugin->GetBaseContext();
92 CmdList::iterator iter;
94 * Only bother if there's an actual command list on this plugin...
96 for (iter=pList->begin();
100 PlCmdInfo &cmd = (*iter);
101 ConCmdInfo *pInfo = cmd.pInfo;
103 /* Has this chain already been fully cleaned/removed? */
104 if (removed.find(pInfo) != removed.end())
109 /* Remove any hooks from us on this command */
110 RemoveConCmds(pInfo->conhooks, pContext);
111 RemoveConCmds(pInfo->srvhooks, pContext);
113 /* See if there are still hooks */
114 if (pInfo->srvhooks.size())
118 if (pInfo->conhooks.size())
123 /* Remove the command, it should be safe now */
125 removed.push_back(pInfo);
131 void CommandCallback()
133 g_ConCmds.InternalDispatch();
136 void ConCmdManager::SetCommandClient(int client)
138 m_CmdClient = client + 1;
141 ResultType ConCmdManager::DispatchClientCommand(int client, ResultType type)
143 const char *cmd = engine->Cmd_Argv(0);
144 int args = engine->Cmd_Argc() - 1;
147 if (sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
149 cell_t result = type;
150 cell_t tempres = result;
151 List<CmdHook *>::iterator iter;
153 for (iter=pInfo->conhooks.begin();
154 iter!=pInfo->conhooks.end();
158 if (!pHook->pf->IsRunnable())
162 if (pHook->pAdmin && !CheckAccess(client, cmd, pHook->pAdmin))
164 if (result < Pl_Handled)
170 pHook->pf->PushCell(client);
171 pHook->pf->PushCell(args);
172 if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
174 if (tempres > result)
178 if (result == Pl_Stop)
184 type = (ResultType)result;
190 void ConCmdManager::InternalDispatch()
193 * Note: Console commands will EITHER go through IServerGameDLL::ClientCommand,
194 * OR this dispatch. They will NEVER go through both.
196 * Whether or not it goes through the callback is determined by FCVAR_GAMEDLL
199 const char *cmd = engine->Cmd_Argv(0);
201 if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
206 cell_t result = Pl_Continue;
207 int args = engine->Cmd_Argc() - 1;
209 List<CmdHook *>::iterator iter;
212 /* Execute server-only commands if viable */
213 if (m_CmdClient == 0 && pInfo->srvhooks.size())
215 cell_t tempres = result;
216 for (iter=pInfo->srvhooks.begin();
217 iter!=pInfo->srvhooks.end();
221 if (!pHook->pf->IsRunnable())
225 pHook->pf->PushCell(args);
226 if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
228 if (tempres > result)
232 if (result == Pl_Stop)
239 /* Check if there's an early stop */
240 if (result >= Pl_Stop)
242 if (!pInfo->sourceMod)
244 RETURN_META(MRES_SUPERCEDE);
250 /* Execute console commands */
251 if (pInfo->conhooks.size())
253 cell_t tempres = result;
254 for (iter=pInfo->conhooks.begin();
255 iter!=pInfo->conhooks.end();
259 if (!pHook->pf->IsRunnable())
265 && !CheckAccess(m_CmdClient, cmd, pHook->pAdmin))
267 if (result < Pl_Handled)
274 /* On a listen server, sometimes the server host's client index can be set as 0.
275 * So index 1 is passed to the command callback to correct this potential problem.
277 if (m_CmdClient == 0 && !engine->IsDedicatedServer())
279 pHook->pf->PushCell(1);
281 pHook->pf->PushCell(m_CmdClient);
284 pHook->pf->PushCell(args);
285 if (pHook->pf->Execute(&tempres) == SP_ERROR_NONE)
287 if (tempres > result)
291 if (result == Pl_Stop)
299 if (result >= Pl_Handled)
301 if (!pInfo->sourceMod)
303 RETURN_META(MRES_SUPERCEDE);
309 bool ConCmdManager::CheckCommandAccess(int client, const char *cmd, FlagBits cmdflags)
316 /* If running listen server, then client 1 is the server host and should have 'root' access */
317 if (client == 1 && !engine->IsDedicatedServer())
322 CPlayer *player = g_Players.GetPlayerByIndex(client);
324 || player->GetEdict() == NULL
325 || player->IsFakeClient())
330 AdminId adm = player->GetAdminId();
331 if (adm != INVALID_ADMIN_ID)
333 FlagBits bits = g_Admins.GetAdminFlags(adm, Access_Effective);
335 /* root knows all, WHOA */
336 if ((bits & ADMFLAG_ROOT) == ADMFLAG_ROOT)
341 /* See if our other flags match */
342 if ((bits & cmdflags) == cmdflags)
347 /* Check for overrides */
348 unsigned int groups = g_Admins.GetAdminGroupCount(adm);
351 bool override = false;
352 for (unsigned int i=0; i<groups; i++)
354 gid = g_Admins.GetAdminGroup(adm, i, NULL);
355 /* First get group-level override */
356 override = g_Admins.GetGroupCommandOverride(gid, cmd, Override_CommandGroup, &rule);
357 /* Now get the specific command override */
358 if (g_Admins.GetGroupCommandOverride(gid, cmd, Override_Command, &rule))
364 if (rule == Command_Allow)
367 } else if (rule == Command_Deny) {
377 bool ConCmdManager::CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmin)
379 if (CheckCommandAccess(client, cmd, pAdmin->eflags))
384 edict_t *pEdict = engine->PEntityOfEntIndex(client);
386 /* If we got here, the command failed... */
388 if (g_Translator.CoreTrans(client, buffer, sizeof(buffer), "No Access", NULL, NULL)
391 snprintf(buffer, sizeof(buffer), "You do not have access to this command");
394 unsigned int replyto = g_ChatTriggers.GetReplyTo();
395 if (replyto == SM_REPLY_CONSOLE)
397 char fullbuffer[192];
398 snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.\n", buffer);
399 engine->ClientPrintf(pEdict, fullbuffer);
400 } else if (replyto == SM_REPLY_CHAT) {
401 char fullbuffer[192];
402 snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.", buffer);
403 g_HL2.TextMsg(client, HUD_PRINTTALK, fullbuffer);
409 bool ConCmdManager::AddConsoleCommand(IPluginFunction *pFunction,
411 const char *description,
414 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
421 CmdHook *pHook = new CmdHook();
423 pHook->pf = pFunction;
424 if (description && description[0])
426 pHook->helptext.assign(description);
428 pInfo->conhooks.push_back(pHook);
430 /* Add to the plugin */
432 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
433 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
435 pList = new CmdList();
436 pPlugin->SetProperty("CommandList", pList);
440 info.type = Cmd_Console;
442 AddToPlCmdList(pList, info);
447 bool ConCmdManager::AddAdminCommand(IPluginFunction *pFunction,
451 const char *description,
454 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
461 CmdHook *pHook = new CmdHook();
462 AdminCmdInfo *pAdmin = new AdminCmdInfo();
464 pHook->pf = pFunction;
465 if (description && description[0])
467 pHook->helptext.assign(description);
469 pHook->pAdmin = pAdmin;
473 if (!sm_trie_retrieve(m_pCmdGrps, group, (void **)&object))
475 grpid = m_Strings.AddString(group);
476 sm_trie_insert(m_pCmdGrps, group, (void *)grpid);
481 pAdmin->cmdGrpId = grpid;
482 pAdmin->flags = adminflags;
484 /* First get the command group override, if any */
485 bool override = g_Admins.GetCommandOverride(group,
486 Override_CommandGroup,
489 /* Next get the command override, if any */
490 if (g_Admins.GetCommandOverride(name,
497 /* Assign normal flags if there were no overrides */
500 pAdmin->eflags = pAdmin->flags;
503 /* Finally, add the hook */
504 pInfo->conhooks.push_back(pHook);
505 pInfo->admin = *(pHook->pAdmin);
507 /* Now add to the plugin */
509 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
510 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
512 pList = new CmdList();
513 pPlugin->SetProperty("CommandList", pList);
517 info.type = Cmd_Admin;
519 AddToPlCmdList(pList, info);
524 bool ConCmdManager::AddServerCommand(IPluginFunction *pFunction,
526 const char *description,
530 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
537 CmdHook *pHook = new CmdHook();
539 pHook->pf = pFunction;
540 if (description && description[0])
542 pHook->helptext.assign(description);
545 pInfo->srvhooks.push_back(pHook);
547 /* Add to the plugin */
549 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
550 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
552 pList = new CmdList();
553 pPlugin->SetProperty("CommandList", pList);
557 info.type = Cmd_Server;
559 AddToPlCmdList(pList, info);
564 void AddToPlCmdList(CmdList *pList, const PlCmdInfo &info)
566 CmdList::iterator iter = pList->begin();
567 bool inserted = false;
568 const char *orig = NULL;
570 orig = info.pInfo->pCmd->GetName();
572 /* Insert this into the help list, SORTED alphabetically. */
573 while (iter != pList->end())
575 PlCmdInfo &obj = (*iter);
576 const char *cmd = obj.pInfo->pCmd->GetName();
577 if (strcmp(orig, cmd) < 0)
579 pList->insert(iter, info);
588 pList->push_back(info);
592 void ConCmdManager::AddToCmdList(ConCmdInfo *info)
594 List<ConCmdInfo *>::iterator iter = m_CmdList.begin();
596 bool inserted = false;
597 const char *orig = NULL;
599 orig = info->pCmd->GetName();
601 /* Insert this into the help list, SORTED alphabetically. */
602 while (iter != m_CmdList.end())
604 const char *cmd = NULL;
606 cmd = pInfo->pCmd->GetName();
607 if (strcmp(orig, cmd) < 0)
609 m_CmdList.insert(iter, info);
618 m_CmdList.push_back(info);
622 void ConCmdManager::UpdateAdminCmdFlags(const char *cmd, OverrideType type, FlagBits bits)
626 if (type == Override_Command)
628 if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
633 List<CmdHook *>::iterator iter;
636 for (iter=pInfo->conhooks.begin(); iter!=pInfo->conhooks.end(); iter++)
643 pHook->pAdmin->eflags = bits;
645 pHook->pAdmin->eflags = pHook->pAdmin->flags;
647 pInfo->admin = *(pHook->pAdmin);
650 } else if (type == Override_CommandGroup) {
652 if (!sm_trie_retrieve(m_pCmdGrps, cmd, &object))
656 int grpid = (int)object;
658 /* This is bad :( loop through all commands */
659 List<ConCmdInfo *>::iterator iter;
661 for (iter=m_CmdList.begin(); iter!=m_CmdList.end(); iter++)
664 for (List<CmdHook *>::iterator citer=pInfo->conhooks.begin();
665 citer!=pInfo->conhooks.end();
669 if (pHook->pAdmin && pHook->pAdmin->cmdGrpId == grpid)
673 pHook->pAdmin->eflags = bits;
675 pHook->pAdmin->eflags = pHook->pAdmin->flags;
677 pInfo->admin = *(pHook->pAdmin);
684 void ConCmdManager::RemoveConCmd(ConCmdInfo *info)
686 /* Remove console-specific information
687 * This should always be true as of right now
691 /* Remove from the trie */
692 sm_trie_delete(m_pCmds, info->pCmd->GetName());
696 /* Unlink from SourceMM */
697 g_SMAPI->UnregisterConCmdBase(g_PLAPI, info->pCmd);
698 /* Delete the command's memory */
699 char *new_help = const_cast<char *>(info->pCmd->GetHelpText());
700 char *new_name = const_cast<char *>(info->pCmd->GetName());
705 /* Remove the external hook */
706 SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, info->pCmd, CommandCallback, false);
710 /* Remove from list */
711 m_CmdList.remove(info);
716 bool ConCmdManager::LookForSourceModCommand(const char *cmd)
720 if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
725 return pInfo->sourceMod && (pInfo->conhooks.size() > 0);
728 ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *description, int flags)
731 if (!sm_trie_retrieve(m_pCmds, name, (void **)&pInfo))
733 pInfo = new ConCmdInfo();
734 /* Find the commandopan */
735 ConCommandBase *pBase = icvar->GetCommands();
736 ConCommand *pCmd = NULL;
739 if (strcmp(pBase->GetName(), name) == 0)
741 /* Don't want to return convar with same name */
742 if (!pBase->IsCommand())
747 pCmd = (ConCommand *)pBase;
750 pBase = const_cast<ConCommandBase *>(pBase->GetNext());
755 /* Note that we have to duplicate because the source might not be
756 * a static string, and these expect static memory.
762 char *new_name = sm_strdup(name);
763 char *new_help = sm_strdup(description);
764 pCmd = new ConCommand(new_name, CommandCallback, new_help, flags);
765 pInfo->sourceMod = true;
767 SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, pCmd, CommandCallback, false);
772 sm_trie_insert(m_pCmds, name, pInfo);
779 void ConCmdManager::OnRootConsoleCommand(const char *command, unsigned int argcount)
783 const char *text = engine->Cmd_Argv(2);
786 CPlugin *pPlugin = g_PluginSys.GetPluginByOrder(id);
790 g_RootMenu.ConsolePrint("[SM] Plugin index %d not found.", id);
794 const sm_plugininfo_t *plinfo = pPlugin->GetPublicInfo();
795 const char *plname = IS_STR_FILLED(plinfo->name) ? plinfo->name : pPlugin->GetFilename();
798 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
800 g_RootMenu.ConsolePrint("[SM] No commands found for: %s", plname);
805 g_RootMenu.ConsolePrint("[SM] No commands found for: %s", plname);
809 CmdList::iterator iter;
810 const char *type = NULL;
813 g_RootMenu.ConsolePrint("[SM] Listing %d commands for: %s", pList->size(), plname);
814 g_RootMenu.ConsolePrint(" %-17.16s %-8.7s %s", "[Name]", "[Type]", "[Help]");
815 for (iter=pList->begin();
819 PlCmdInfo &cmd = (*iter);
820 if (cmd.type == Cmd_Server)
823 } else if (cmd.type == Cmd_Console) {
825 } else if (cmd.type == Cmd_Admin) {
828 name = cmd.pInfo->pCmd->GetName();
829 if (cmd.pHook->helptext.size())
831 help = cmd.pHook->helptext.c_str();
833 help = cmd.pInfo->pCmd->GetHelpText();
835 g_RootMenu.ConsolePrint(" %-17.16s %-12.11s %s", name, type, help);
841 g_RootMenu.ConsolePrint("[SM] Usage: sm cmds <plugin #>");
844 static int g_yam_state = 0;
845 void _YamState(int state)
849 g_RootMenu.ConsolePrint("Welcome to the SourceMod Text Adventure.");
850 g_RootMenu.ConsolePrint("Type sm_text to see the last message.");
851 g_RootMenu.ConsolePrint("Type sm_text <word> to follow a capital word.");
852 g_RootMenu.ConsolePrint("-------------------------------");
853 g_RootMenu.ConsolePrint("You are at VALVE HEADQUARTERS.");
854 g_RootMenu.ConsolePrint("To your LEFT is BAILOPAN, rearranging the letters to spell");
855 g_RootMenu.ConsolePrint("\"A HARD VEAL QUEST\". FORWARD is the entrance to the building.");
856 g_RootMenu.ConsolePrint("To your RIGHT is your last chance to flee in terror.");
857 } else if (state == 1) {
858 g_RootMenu.ConsolePrint("BAILOPAN tells you that his name his pronounced");
859 g_RootMenu.ConsolePrint("\"bye low pahn,\" not \"bay low pan.\" Do you ");
860 g_RootMenu.ConsolePrint("MOCK him, or NOD quietly?");
861 } else if (state == 2) {
862 g_RootMenu.ConsolePrint("You enter the Valve building. You hear screams coming from within.");
863 g_RootMenu.ConsolePrint("A grotesque figure lumbers up to greet you; it is Gabe Newell.");
864 g_RootMenu.ConsolePrint("\"Welcome,\" he belches, \"to my lair.\"");
865 g_RootMenu.ConsolePrint("Do you SHAKE Gaben's hand, WALK past him, or OFFER a donut?");
866 } else if (state == 3) {
867 g_RootMenu.ConsolePrint("You walk into the break room. Alfred \"Adolf\" Reynolds and");
868 g_RootMenu.ConsolePrint("Yahn \"Yeti\" Bernier are discussing something (you overhear ");
869 g_RootMenu.ConsolePrint("the phrase \"and next Steam update, here's what we should break\").");
870 g_RootMenu.ConsolePrint("Should you DIE in a fire, REPORT a bug, REQUEST a feature, or ");
871 g_RootMenu.ConsolePrint("SPRAY them with butter?");
876 void _IntExt_CallYams()
878 const char *arg = engine->Cmd_Argv(1);
880 /* should be impossible */
881 if (!arg || arg[0] == '\0')
883 _YamState(g_yam_state);
886 if (g_yam_state == 1)
888 if (strcasecmp(arg, "mock") == 0)
890 g_RootMenu.ConsolePrint("You mock BAILOPAN's pronunciation. In a fit of rage, ");
891 g_RootMenu.ConsolePrint("he sticks an INT 3 call into your chest, rendering you broken.");
892 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
894 } else if (strcasecmp(arg, "nod") == 0) {
895 g_RootMenu.ConsolePrint("You nod quietly, and then slowly back away into the Valve headquarters.");
898 g_RootMenu.ConsolePrint("Commands are MOCK and NOD.");
900 } else if (g_yam_state == 3) {
901 if (strcasecmp(arg, "report") == 0)
903 g_RootMenu.ConsolePrint("You report a bug to Alfred and Yeti. Immediately, both fall asleep.");
904 g_RootMenu.ConsolePrint("You decay in the break room for two years while they sleep.");
905 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
907 } else if (strcasecmp(arg, "request") == 0) {
908 g_RootMenu.ConsolePrint("You request a feature to Alfred and Yeti. They both mutter something");
909 g_RootMenu.ConsolePrint("about it being implemented \"soon.\" Then, by accident, someone sends");
910 g_RootMenu.ConsolePrint("a message over \"Friends.\" The entire building catches fire.");
911 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
913 } else if (strcasecmp(arg, "die") == 0) {
914 g_RootMenu.ConsolePrint("For no reason, you suddenly catch fire. Alfred and Yeti find this");
915 g_RootMenu.ConsolePrint("deeply disturbing, and cover your flaming corpse with Episode 2");
916 g_RootMenu.ConsolePrint("advertisements. Coming soon, with Team Fortress 2, and Portal!");
917 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
919 } else if (strcasecmp(arg, "spray") == 0) {
920 g_RootMenu.ConsolePrint("You spray Alfred and Yeti with butter. Like Jack Thompson to an");
921 g_RootMenu.ConsolePrint("ambulance, Gabe Newell instantly appears and devours them both.");
922 g_RootMenu.ConsolePrint("You run away, just in time, as Gabe Newell explodes, registering ");
923 g_RootMenu.ConsolePrint("a 5.6 earthquake. Outside, world peace is achieved.");
924 g_RootMenu.ConsolePrint("YOU HAVE WON.");
927 } else if (g_yam_state == 2) {
928 if (strcasecmp(arg, "shake") == 0)
930 g_RootMenu.ConsolePrint("You shake Gaben's hand. It is a terrifying and disgusting experience.");
931 g_RootMenu.ConsolePrint("However, you survive, and continue on.");
933 } else if (strcasecmp(arg, "offer") == 0) {
934 g_RootMenu.ConsolePrint("You offer Gabe Newell one (1) donut. With a gleam in his eyes, ");
935 g_RootMenu.ConsolePrint("he picks you up and devours you whole.");
936 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
938 } else if (strcasecmp(arg, "walk") == 0) {
939 g_RootMenu.ConsolePrint("You walk past Gabe Newell. He can't keep up with your pace!");
942 g_RootMenu.ConsolePrint("Commands are SHAKE, OFFER, and WALK.");
944 } else if (g_yam_state == 0) {
945 if (strcasecmp(arg, "left") == 0)
948 } else if (strcasecmp(arg, "right") == 0) {
949 g_RootMenu.ConsolePrint("You run away from the Valve headquarters in sheer terror.");
950 g_RootMenu.ConsolePrint("While running, you smash into an unknown person, who turns out to be your soul mate.");
951 g_RootMenu.ConsolePrint("You marry and raise a family of 3 kids.");
952 g_RootMenu.ConsolePrint("Many years later, you look back, and realize this was your best choice.");
953 g_RootMenu.ConsolePrint("YOU HAVE WON.");
955 } else if (strcasecmp(arg, "forward") == 0) {
957 } else if (arg[0] != '\0') {
958 g_RootMenu.ConsolePrint("Commands are FORWARD, LEFT, and RIGHT.");
963 void _IntExt_EnableYams()
965 static ConCommand *pCmd = NULL;
968 pCmd = new ConCommand("sm_text", _IntExt_CallYams, "Fountain of Yams Adventure Game", FCVAR_GAMEDLL);
969 g_RootMenu.ConsolePrint("Something is now enabled...");
971 g_RootMenu.ConsolePrint("Something is already enabled...");