📄 commands.h
字号:
/************************************************************************************
Copyright (c) 2000 Aaron O'Neil
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1) Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2) Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3) Redistributions in binary form must reproduce the above copyright notice on
program startup. Additional credits for program modification are acceptable
but original copyright and credits must be visible at startup.
4) You may charge a reasonable copying fee for any distribution of Mud Master.
You may charge any fee you choose for support of Mud Master. You may not
charge a fee for Mud Master itself.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**************************************************************************************/
extern void Action(CString &strLine);
extern void Alias(CString &strLine);
extern void AltGr(CString &strLine);
extern void Array(CString &strLine);
extern void Assign(CString &strLine);
extern void AutoAccept(CString &strLine);
extern void BarBack(CString &strLine);
extern void BarFore(CString &strLine);
extern void BarItem(CString &strLine);
extern void BarItemBack(CString &strLine);
extern void BarItemFore(CString &strLine);
extern void BarItemShift(CString &strLine);
extern void BarSeparator(CString &strLine);
extern void Bell(CString &strLine);
extern void CacheSize(CString &strLine);
extern void Call(CString &strLine);
extern void CallDLL(CString &strLine);
extern void Changes(CString &strLine);
extern void Char(CString &strLine);
extern void Chat(CString &strLine);
extern void ChatAll(CString &strLine);
extern void ChatBack(CString &strLine);
extern void ChatCommands(CString &strLine);
extern void ChatFore(CString &strLine);
extern void ChatGroupRemove(CString &strLine);
extern void ChatGroupSet(CString &strLine);
extern void ChatIgnore(CString &strLine);
extern void ChatIgnoreAll(CString &strLine);
extern void ChatName(CString &strLine);
extern void ChatPrivate(CString &strLine);
extern void ChatServe(CString &strLine);
extern void ChatSnoop(CString &strLine);
extern void ChatTransfers(CString &strLine);
extern void ChatVersions(CString &strLine);
extern void CheckVersion(CString &strLine);
extern void ClearList(CString &strLine);
extern void CR(CString &strLine);
extern void DebugDepth(CString &strLine);
extern void DebugMessages(CString &strLine);
extern void Default(CString &strLine);
extern void Dir(CString &strLine);
extern void DisableAction(CString &strLine);
extern void DisableAlias(CString &strLine);
extern void DisableBarItem(CString &strLine);
extern void DisableEvent(CString &strLine);
extern void DisableGag(CString &strLine);
extern void DisableGroup(CString &strLine);
extern void DisableHighlight(CString &strLine);
extern void DisableMacro(CString &strLine);
extern void DisableSub(CString &strLine);
extern void Disconnect(CString &strLine);
extern void Dll(CString &strLine);
extern void Dnd(CString &strLine);
extern void DoEvents(CString &strLine);
extern void DownloadPath(CString &strLine);
extern void Echo(CString &strLine);
extern void EchoActions(CString &strLine);
extern void EditAction(CString &strLine);
extern void EditAlias(CString &strLine);
extern void EditBack(CString &strLine);
extern void EditBarItem(CString &strLine);
extern void EditEvent(CString &strLine);
extern void EditFore(CString &strLine);
extern void EditGag(CString &strLine);
extern void EditHighlight(CString &strLine);
extern void EditMacro(CString &strLine);
extern void EditSub(CString &strLine);
extern void EditVariable(CString &strLine);
extern void Emote(CString &strLine);
extern void EmoteAll(CString &strLine);
extern void Empty(CString &strLine);
extern void EnableAction(CString &strLine);
extern void EnableAlias(CString &strLine);
extern void EnableBarItem(CString &strLine);
extern void EnableEvent(CString &strLine);
extern void EnableGag(CString &strLine);
extern void EnableGroup(CString &strLine);
extern void EnableHighlight(CString &strLine);
extern void EnableMacro(CString &strLine);
extern void EnableSub(CString &strLine);
extern void Event(CString &strLine);
extern void FileCancel(CString &strLine);
extern void FileDelete(CString &strLine);
extern void FileStatus(CString &strLine);
extern void FullEditAction(CString &strLine);
extern void FullEditAlias(CString &strLine);
extern void FullEditBarItem(CString &strLine);
extern void FullEditEvent(CString &strLine);
extern void FullEditGag(CString &strLine);
extern void FullEditHighlight(CString &strLine);
extern void FullEditMacro(CString &strLine);
extern void FullEditSub(CString &strLine);
extern void FullEditVariable(CString &strLine);
extern void FireEvent(CString &strLine);
extern void FreeLibrary(CString &strLine);
extern void Gag(CString &strLine);
extern void GroupActions(CString &strLine);
extern void GroupAliases(CString &strLine);
extern void GroupBarItems(CString &strLine);
extern void GroupChat(CString &strLine);
extern void GroupEmote(CString &strLine);
extern void GroupEvents(CString &strLine);
extern void GroupLists(CString &strLine);
extern void GroupMacros(CString &strLine);
extern void GroupSubs(CString &strLine);
extern void GroupTablist(CString &strLine);
extern void GroupVariables(CString &strLine);
extern void Help(CString &strLine);
extern void Highlight(CString &strLine);
extern void If(CString &strLine);
extern void Ignore(CString &strLine);
extern void IgnoreAliases(CString &strLine);
extern void Information(CString &strLine);
extern void ItemAdd(CString &strLine);
extern void ItemDelete(CString &strLine);
extern void KillAll(CString &strLine);
extern void KillGroup(CString &strLine);
extern void ListAdd(CString &strLine);
extern void ListDelete(CString &strLine);
extern void ListItems(CString &strLine);
extern void Lists(CString &strLine);
extern void LogClose(CString &strLine);
extern void LogOpen(CString &strLine);
extern void LogOpenAppend(CString &strLine);
extern void LogStatus(CString &strLine);
extern void Loop(CString &strLine);
extern void Macro(CString &strLine);
extern void Math(CString &strLine);
extern void Message(CString &strLine);
extern void MMLoadLibrary(CString &strLine);
extern void Mode(CString &strLine);
extern void Msp(CString &strLine);
extern void MultipleActions(CString &strLine);
extern void NoDefault(CString &strLine);
extern void NotifyDll(CString &strLine);
extern void OpenPort(CString &strLine);
extern void Pace(CString &strLine);
extern void Pause(CString &strLine);
extern void PeekConnections(CString &strLine);
extern void Ping(CString &strLine);
extern void PlayMidi(CString &strLine);
extern void PlayWav(CString &strLine);
extern void Presubstitute(CString &strLine);
extern void PromptOverwrite(CString &strLine);
extern void Read(CString &strLine);
extern void RequestConnects(CString &strLine);
extern void ResetEvent(CString &strLine);
extern void SaveScrollback(CString &strLine);
extern void ScriptPath(CString &strLine);
extern void SendAction(CString &strLine);
extern void SendAlias(CString &strLine);
extern void SendArray(CString &strLine);
extern void SendBarItem(CString &strLine);
extern void SendEvent(CString &strLine);
extern void SendFile(CString &strLine);
extern void SendGag(CString &strLine);
extern void SendGroup(CString &strLine);
extern void SendHighlight(CString &strLine);
extern void SendList(CString &strLine);
extern void SendMacro(CString &strLine);
extern void SendSub(CString &strLine);
extern void SendVariable(CString &strLine);
extern void Session(CString &strLine);
extern void SetEventTime(CString &strLine);
extern void SetIP(CString &strLine);
extern void ShowMe(CString &strLine);
extern void ShowMismatchErrors(CString &strLine);
extern void Snoop(CString &strLine);
extern void SoundPath(CString &strLine);
extern void SpeedWalk(CString &strLine);
extern void StatusBar(CString &strLine);
extern void Substitute(CString &strLine);
extern void TabAdd(CString &strLine);
extern void TabDelete(CString &strLine);
extern void TabList(CString &strLine);
extern void TextIn(CString &strLine);
extern void UnAction(CString &strLine);
extern void UnAlias(CString &strLine);
extern void UnArray(CString &strLine);
extern void UnBarItem(CString &strLine);
extern void UnChat(CString &strLine);
extern void UnDo(CString &strLine);
extern void UnEvent(CString &strLine);
extern void UnGag(CString &strLine);
extern void UnHighlight(CString &strLine);
extern void UnMacro(CString &strLine);
extern void UnSubstitute(CString &strLine);
extern void UnVariable(CString &strLine);
extern void UpdateBarItem(CString &strLine);
extern void UpdateStatusBar(CString &strLine);
extern void UploadPath(CString &strLine);
extern void Variable(CString &strLine);
extern void Version(CString &strLine);
extern void VolumeBits(CString &strLine);
extern void VolumeDefault(CString &strLine);
extern void VolumeMax(CString &strLine);
extern void While(CString &strLine);
extern void WinMessages(CString &strLine);
extern void Write(CString &strLine);
extern void WriteGroup(CString &strLine);
extern void Zap(CString &strLine);
/////////////////////////////////////////////////////////////
// Support for command functions.
//
// Creates a backup of the file.
void BackupFile(const char *pszPath);
// Take a conditional statement and deals with the parens.
BOOL EvaluateLine(const char *pszLine);
// Takes a conditional statement that does NOT contain parens
// and evaluates it using EvaluateCondition. This function
// handles && and || operators.
BOOL EvaluateStatement(const char *pszStatement);
// pszText is text to be searched for pszToken. Pass in an index
// to start from in pszText. It searches either left or right from
// the start position looking for pszToken. The return value is
// index of the text up to the token, not including the token.
int LeftToToken(const char *pszText, int nStart, const char *pszToken);
int RightToToken(const char *pszText, int nStart, const char *pszToken);
// This evaluates the most broken down form of an expression.
// It handles have 1 operator being =,==,>,<,>=,<=,!= and will
// determines if the condition is true. This function will
// return FALSE if the condition is not a valid condition.
BOOL EvaluateCondition(const char *pszCondition);
// Pass in a string representing a math formula. All of the variables
// must be replaced before being passed to the function. Returns TRUE
// if no errors were encountered. The value is returned in lNum.
// Operators supported: * / % + -
BOOL CalculateMath(const char *pszParam, long &lNum);
BOOL EvaluateMultDivMod(CString &strFormula);
BOOL EvaluatePlusMinus(CString &strFormula);
// Print a prompt on the terminal telling the user to press Ctrl+C
// to abort listing, or any other key to exit. The function
// returns TRUE to continue the listing or FALSE if Ctrl+C is
// pressed.
BOOL PausePrompt();
// Displays a text file to the terminal screen. The text is not
// send to the mud. Returns FALSE if the file was not found.
BOOL ShowFile(const char *pszFilename);
BOOL ShowHelpFile(const char *pszFilename);
// This is used by the /write routines to prepare data storage
// objects like vars for writing. The problem is if somebody
// stores an @ in data. When the file is read back in the @
// get interpreted ot mean an procedure. This function looks
// for any special chars that need to escaped and escapes them.
// Data passes in as "@$" would be changed to "\@\$"
void PrepareForWrite(const char *pszText, CString &strOut);
// Takes a string of numbers and formats it with commas.
// 12345 = 12,345.
void Commatize(CString &strNum);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -