Add a "Get" command to the notes module which allows you to lookup a note via the key

This commit is contained in:
Kyle Fuller
2011-03-12 19:19:58 +00:00
parent 9506d7e32b
commit 0537a6cbae

View File

@@ -159,8 +159,16 @@ public:
} else {
PutModule("Unable to delete note [" + sKey + "]");
}
} else if (sCmd.Equals("GET")) {
CString sNote = GetNV(sLine.Token(1, true));
if (sNote.empty()) {
PutModule("This note doesn't exist.");
} else {
PutModule(sNote);
}
} else {
PutModule("Commands are: Help, List, Add <key> <note>, Del <key>, Mod <key> <note>");
PutModule("Commands are: Help, List, Add <key> <note>, Del <key>, Mod <key> <note>, Get <key>");
}
}