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::CheckAccess(int client, const char *cmd, AdminCmdInfo *pAdmin)
311 FlagBits cmdflags = pAdmin->eflags;
317 /* If running listen server, then client 1 is the server host and should have 'root' access */
318 if (client == 1 && !engine->IsDedicatedServer())
323 CPlayer *player = g_Players.GetPlayerByIndex(client);
329 AdminId adm = player->GetAdminId();
330 if (adm != INVALID_ADMIN_ID)
332 FlagBits bits = g_Admins.GetAdminFlags(adm, Access_Effective);
334 /* root knows all, WHOA */
335 if ((bits & ADMFLAG_ROOT) == ADMFLAG_ROOT)
340 /* See if our other flags match */
341 if ((bits & cmdflags) == cmdflags)
346 /* Check for overrides */
347 unsigned int groups = g_Admins.GetAdminGroupCount(adm);
350 bool override = false;
351 for (unsigned int i=0; i<groups; i++)
353 gid = g_Admins.GetAdminGroup(adm, i, NULL);
354 /* First get group-level override */
355 override = g_Admins.GetGroupCommandOverride(gid, cmd, Override_CommandGroup, &rule);
356 /* Now get the specific command override */
357 if (g_Admins.GetGroupCommandOverride(gid, cmd, Override_Command, &rule))
363 if (rule == Command_Allow)
366 } else if (rule == Command_Deny) {
373 if (player->IsFakeClient()
374 || player->GetEdict() == NULL)
379 /* If we got here, the command failed... */
381 if (g_Translator.CoreTrans(client, buffer, sizeof(buffer), "No Access", NULL, NULL)
384 snprintf(buffer, sizeof(buffer), "You do not have access to this command");
387 unsigned int replyto = g_ChatTriggers.GetReplyTo();
388 if (replyto == SM_REPLY_CONSOLE)
390 char fullbuffer[192];
391 snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.\n", buffer);
392 engine->ClientPrintf(player->GetEdict(), fullbuffer);
393 } else if (replyto == SM_REPLY_CHAT) {
394 char fullbuffer[192];
395 snprintf(fullbuffer, sizeof(fullbuffer), "[SM] %s.", buffer);
396 g_HL2.TextMsg(client, HUD_PRINTTALK, fullbuffer);
402 bool ConCmdManager::AddConsoleCommand(IPluginFunction *pFunction,
404 const char *description,
407 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
414 CmdHook *pHook = new CmdHook();
416 pHook->pf = pFunction;
417 if (description && description[0])
419 pHook->helptext.assign(description);
421 pInfo->conhooks.push_back(pHook);
423 /* Add to the plugin */
425 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
426 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
428 pList = new CmdList();
429 pPlugin->SetProperty("CommandList", pList);
433 info.type = Cmd_Console;
435 AddToPlCmdList(pList, info);
440 bool ConCmdManager::AddAdminCommand(IPluginFunction *pFunction,
444 const char *description,
447 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
454 CmdHook *pHook = new CmdHook();
455 AdminCmdInfo *pAdmin = new AdminCmdInfo();
457 pHook->pf = pFunction;
458 if (description && description[0])
460 pHook->helptext.assign(description);
462 pHook->pAdmin = pAdmin;
466 if (!sm_trie_retrieve(m_pCmdGrps, group, (void **)&object))
468 grpid = m_Strings.AddString(group);
469 sm_trie_insert(m_pCmdGrps, group, (void *)grpid);
474 pAdmin->cmdGrpId = grpid;
475 pAdmin->flags = adminflags;
477 /* First get the command group override, if any */
478 bool override = g_Admins.GetCommandOverride(group,
479 Override_CommandGroup,
482 /* Next get the command override, if any */
483 if (g_Admins.GetCommandOverride(name,
490 /* Assign normal flags if there were no overrides */
493 pAdmin->eflags = pAdmin->flags;
496 /* Finally, add the hook */
497 pInfo->conhooks.push_back(pHook);
499 /* Now add to the plugin */
501 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
502 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
504 pList = new CmdList();
505 pPlugin->SetProperty("CommandList", pList);
509 info.type = Cmd_Admin;
511 AddToPlCmdList(pList, info);
516 bool ConCmdManager::AddServerCommand(IPluginFunction *pFunction,
518 const char *description,
522 ConCmdInfo *pInfo = AddOrFindCommand(name, description, flags);
529 CmdHook *pHook = new CmdHook();
531 pHook->pf = pFunction;
532 if (description && description[0])
534 pHook->helptext.assign(description);
537 pInfo->srvhooks.push_back(pHook);
539 /* Add to the plugin */
541 IPlugin *pPlugin = g_PluginSys.GetPluginByCtx(pFunction->GetParentContext()->GetContext());
542 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
544 pList = new CmdList();
545 pPlugin->SetProperty("CommandList", pList);
549 info.type = Cmd_Server;
551 AddToPlCmdList(pList, info);
556 void AddToPlCmdList(CmdList *pList, const PlCmdInfo &info)
558 CmdList::iterator iter = pList->begin();
559 bool inserted = false;
560 const char *orig = NULL;
562 orig = info.pInfo->pCmd->GetName();
564 /* Insert this into the help list, SORTED alphabetically. */
565 while (iter != pList->end())
567 PlCmdInfo &obj = (*iter);
568 const char *cmd = obj.pInfo->pCmd->GetName();
569 if (strcmp(orig, cmd) < 0)
571 pList->insert(iter, info);
580 pList->push_back(info);
584 void ConCmdManager::AddToCmdList(ConCmdInfo *info)
586 List<ConCmdInfo *>::iterator iter = m_CmdList.begin();
588 bool inserted = false;
589 const char *orig = NULL;
591 orig = info->pCmd->GetName();
593 /* Insert this into the help list, SORTED alphabetically. */
594 while (iter != m_CmdList.end())
596 const char *cmd = NULL;
598 cmd = pInfo->pCmd->GetName();
599 if (strcmp(orig, cmd) < 0)
601 m_CmdList.insert(iter, info);
610 m_CmdList.push_back(info);
614 void ConCmdManager::UpdateAdminCmdFlags(const char *cmd, OverrideType type, FlagBits bits)
618 if (type == Override_Command)
620 if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
625 List<CmdHook *>::iterator iter;
628 for (iter=pInfo->conhooks.begin(); iter!=pInfo->conhooks.end(); iter++)
635 pHook->pAdmin->eflags = bits;
637 pHook->pAdmin->eflags = pHook->pAdmin->flags;
641 } else if (type == Override_CommandGroup) {
643 if (!sm_trie_retrieve(m_pCmdGrps, cmd, &object))
647 int grpid = (int)object;
649 /* This is bad :( loop through all commands */
650 List<ConCmdInfo *>::iterator iter;
652 for (iter=m_CmdList.begin(); iter!=m_CmdList.end(); iter++)
655 for (List<CmdHook *>::iterator citer=pInfo->conhooks.begin();
656 citer!=pInfo->conhooks.end();
660 if (pHook->pAdmin && pHook->pAdmin->cmdGrpId == grpid)
664 pHook->pAdmin->eflags = bits;
666 pHook->pAdmin->eflags = pHook->pAdmin->flags;
674 void ConCmdManager::RemoveConCmd(ConCmdInfo *info)
676 /* Remove console-specific information
677 * This should always be true as of right now
681 /* Remove from the trie */
682 sm_trie_delete(m_pCmds, info->pCmd->GetName());
686 /* Unlink from SourceMM */
687 g_SMAPI->UnregisterConCmdBase(g_PLAPI, info->pCmd);
688 /* Delete the command's memory */
689 char *new_help = const_cast<char *>(info->pCmd->GetHelpText());
690 char *new_name = const_cast<char *>(info->pCmd->GetName());
695 /* Remove the external hook */
696 SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, info->pCmd, CommandCallback, false);
700 /* Remove from list */
701 m_CmdList.remove(info);
706 bool ConCmdManager::LookForSourceModCommand(const char *cmd)
710 if (!sm_trie_retrieve(m_pCmds, cmd, (void **)&pInfo))
715 return pInfo->sourceMod && (pInfo->conhooks.size() > 0);
718 ConCmdInfo *ConCmdManager::AddOrFindCommand(const char *name, const char *description, int flags)
721 if (!sm_trie_retrieve(m_pCmds, name, (void **)&pInfo))
723 pInfo = new ConCmdInfo();
724 /* Find the commandopan */
725 ConCommandBase *pBase = icvar->GetCommands();
726 ConCommand *pCmd = NULL;
729 if (strcmp(pBase->GetName(), name) == 0)
731 /* Don't want to return convar with same name */
732 if (!pBase->IsCommand())
737 pCmd = (ConCommand *)pBase;
740 pBase = const_cast<ConCommandBase *>(pBase->GetNext());
745 /* Note that we have to duplicate because the source might not be
746 * a static string, and these expect static memory.
752 char *new_name = sm_strdup(name);
753 char *new_help = sm_strdup(description);
754 pCmd = new ConCommand(new_name, CommandCallback, new_help, flags);
755 pInfo->sourceMod = true;
757 SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, pCmd, CommandCallback, false);
762 sm_trie_insert(m_pCmds, name, pInfo);
769 void ConCmdManager::OnRootConsoleCommand(const char *command, unsigned int argcount)
773 const char *text = engine->Cmd_Argv(2);
776 CPlugin *pPlugin = g_PluginSys.GetPluginByOrder(id);
780 g_RootMenu.ConsolePrint("[SM] Plugin index %d not found.", id);
784 const sm_plugininfo_t *plinfo = pPlugin->GetPublicInfo();
785 const char *plname = IS_STR_FILLED(plinfo->name) ? plinfo->name : pPlugin->GetFilename();
788 if (!pPlugin->GetProperty("CommandList", (void **)&pList))
790 g_RootMenu.ConsolePrint("[SM] No commands found for: %s", plname);
795 g_RootMenu.ConsolePrint("[SM] No commands found for: %s", plname);
799 CmdList::iterator iter;
800 const char *type = NULL;
803 g_RootMenu.ConsolePrint("[SM] Listing %d commands for: %s", pList->size(), plname);
804 g_RootMenu.ConsolePrint(" %-17.16s %-8.7s %s", "[Name]", "[Type]", "[Help]");
805 for (iter=pList->begin();
809 PlCmdInfo &cmd = (*iter);
810 if (cmd.type == Cmd_Server)
813 } else if (cmd.type == Cmd_Console) {
815 } else if (cmd.type == Cmd_Admin) {
818 name = cmd.pInfo->pCmd->GetName();
819 if (cmd.pHook->helptext.size())
821 help = cmd.pHook->helptext.c_str();
823 help = cmd.pInfo->pCmd->GetHelpText();
825 g_RootMenu.ConsolePrint(" %-17.16s %-12.11s %s", name, type, help);
831 g_RootMenu.ConsolePrint("[SM] Usage: sm cmds <plugin #>");
834 static int g_yam_state = 0;
835 void _YamState(int state)
839 g_RootMenu.ConsolePrint("Welcome to the SourceMod Text Adventure.");
840 g_RootMenu.ConsolePrint("Type sm_text to see the last message.");
841 g_RootMenu.ConsolePrint("Type sm_text <word> to follow a capital word.");
842 g_RootMenu.ConsolePrint("-------------------------------");
843 g_RootMenu.ConsolePrint("You are at VALVE HEADQUARTERS.");
844 g_RootMenu.ConsolePrint("To your LEFT is BAILOPAN, rearranging the letters to spell");
845 g_RootMenu.ConsolePrint("\"A HARD VEAL QUEST\". FORWARD is the entrance to the building.");
846 g_RootMenu.ConsolePrint("To your RIGHT is your last chance to flee in terror.");
847 } else if (state == 1) {
848 g_RootMenu.ConsolePrint("BAILOPAN tells you that his name his pronounced");
849 g_RootMenu.ConsolePrint("\"bye low pahn,\" not \"bay low pan.\" Do you ");
850 g_RootMenu.ConsolePrint("MOCK him, or NOD quietly?");
851 } else if (state == 2) {
852 g_RootMenu.ConsolePrint("You enter the Valve building. You hear screams coming from within.");
853 g_RootMenu.ConsolePrint("A grotesque figure lumbers up to greet you; it is Gabe Newell.");
854 g_RootMenu.ConsolePrint("\"Welcome,\" he belches, \"to my lair.\"");
855 g_RootMenu.ConsolePrint("Do you SHAKE Gaben's hand, WALK past him, or OFFER a donut?");
856 } else if (state == 3) {
857 g_RootMenu.ConsolePrint("You walk into the break room. Alfred \"Adolf\" Reynolds and");
858 g_RootMenu.ConsolePrint("Yahn \"Yeti\" Bernier are discussing something (you overhear ");
859 g_RootMenu.ConsolePrint("the phrase \"and next Steam update, here's what we should break\").");
860 g_RootMenu.ConsolePrint("Should you DIE in a fire, REPORT a bug, REQUEST a feature, or ");
861 g_RootMenu.ConsolePrint("SPRAY them with butter?");
866 void _IntExt_CallYams()
868 const char *arg = engine->Cmd_Argv(1);
870 /* should be impossible */
871 if (!arg || arg[0] == '\0')
873 _YamState(g_yam_state);
876 if (g_yam_state == 1)
878 if (strcasecmp(arg, "mock") == 0)
880 g_RootMenu.ConsolePrint("You mock BAILOPAN's pronunciation. In a fit of rage, ");
881 g_RootMenu.ConsolePrint("he sticks an INT 3 call into your chest, rendering you broken.");
882 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
884 } else if (strcasecmp(arg, "nod") == 0) {
885 g_RootMenu.ConsolePrint("You nod quietly, and then slowly back away into the Valve headquarters.");
888 g_RootMenu.ConsolePrint("Commands are MOCK and NOD.");
890 } else if (g_yam_state == 3) {
891 if (strcasecmp(arg, "report") == 0)
893 g_RootMenu.ConsolePrint("You report a bug to Alfred and Yeti. Immediately, both fall asleep.");
894 g_RootMenu.ConsolePrint("You decay in the break room for two years while they sleep.");
895 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
897 } else if (strcasecmp(arg, "request") == 0) {
898 g_RootMenu.ConsolePrint("You request a feature to Alfred and Yeti. They both mutter something");
899 g_RootMenu.ConsolePrint("about it being implemented \"soon.\" Then, by accident, someone sends");
900 g_RootMenu.ConsolePrint("a message over \"Friends.\" The entire building catches fire.");
901 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
903 } else if (strcasecmp(arg, "die") == 0) {
904 g_RootMenu.ConsolePrint("For no reason, you suddenly catch fire. Alfred and Yeti find this");
905 g_RootMenu.ConsolePrint("deeply disturbing, and cover your flaming corpse with Episode 2");
906 g_RootMenu.ConsolePrint("advertisements. Coming soon, with Team Fortress 2, and Portal!");
907 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
909 } else if (strcasecmp(arg, "spray") == 0) {
910 g_RootMenu.ConsolePrint("You spray Alfred and Yeti with butter. Like Jack Thompson to an");
911 g_RootMenu.ConsolePrint("ambulance, Gabe Newell instantly appears and devours them both.");
912 g_RootMenu.ConsolePrint("You run away, just in time, as Gabe Newell explodes, registering ");
913 g_RootMenu.ConsolePrint("a 5.6 earthquake. Outside, world peace is achieved.");
914 g_RootMenu.ConsolePrint("YOU HAVE WON.");
917 } else if (g_yam_state == 2) {
918 if (strcasecmp(arg, "shake") == 0)
920 g_RootMenu.ConsolePrint("You shake Gaben's hand. It is a terrifying and disgusting experience.");
921 g_RootMenu.ConsolePrint("However, you survive, and continue on.");
923 } else if (strcasecmp(arg, "offer") == 0) {
924 g_RootMenu.ConsolePrint("You offer Gabe Newell one (1) donut. With a gleam in his eyes, ");
925 g_RootMenu.ConsolePrint("he picks you up and devours you whole.");
926 g_RootMenu.ConsolePrint("YOU HAVE DIED. GAME OVER.");
928 } else if (strcasecmp(arg, "walk") == 0) {
929 g_RootMenu.ConsolePrint("You walk past Gabe Newell. He can't keep up with your pace!");
932 g_RootMenu.ConsolePrint("Commands are SHAKE, OFFER, and WALK.");
934 } else if (g_yam_state == 0) {
935 if (strcasecmp(arg, "left") == 0)
938 } else if (strcasecmp(arg, "right") == 0) {
939 g_RootMenu.ConsolePrint("You run away from the Valve headquarters in sheer terror.");
940 g_RootMenu.ConsolePrint("While running, you smash into an unknown person, who turns out to be your soul mate.");
941 g_RootMenu.ConsolePrint("You marry and raise a family of 3 kids.");
942 g_RootMenu.ConsolePrint("Many years later, you look back, and realize this was your best choice.");
943 g_RootMenu.ConsolePrint("YOU HAVE WON.");
945 } else if (strcasecmp(arg, "forward") == 0) {
947 } else if (arg[0] != '\0') {
948 g_RootMenu.ConsolePrint("Commands are FORWARD, LEFT, and RIGHT.");
953 void _IntExt_EnableYams()
955 static ConCommand *pCmd = NULL;
958 pCmd = new ConCommand("sm_text", _IntExt_CallYams, "Fountain of Yams Adventure Game", FCVAR_GAMEDLL);
959 g_RootMenu.ConsolePrint("Something is now enabled...");
961 g_RootMenu.ConsolePrint("Something is already enabled...");