From 620d7602a2c32973b33a079159f56f632bbd983d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 Jan 2014 22:05:50 +0300 Subject: add chat command for uploading log file. New chat command: /uploadlog --- src/commands.cpp | 7 +++++++ src/commands.h | 3 +++ 2 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/commands.cpp b/src/commands.cpp index ee41b04d0..8ebcfd5fd 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1342,6 +1342,13 @@ impHandler0(uploadConfig) "?xml"); } +impHandler0(uploadLog) +{ + uploadFile(_("Uploaded log into:"), + client->getLogFileName(), + "?txt"); +} + impHandler0(testsdlfont) { #if defined USE_OPENGL && defined DEBUG_SDLFONT diff --git a/src/commands.h b/src/commands.h index 1a28f9fa7..6c2101f42 100644 --- a/src/commands.h +++ b/src/commands.h @@ -131,6 +131,7 @@ namespace Commands decHandler(talkRaw); decHandler(talkPet); decHandler(uploadConfig); + decHandler(uploadLog); void replaceVars(std::string &str); } // namespace Commands @@ -229,6 +230,7 @@ enum COMMAND_TALKRAW, COMMAND_TALKPET, COMMAND_UPLOADCONFIG, + COMMAND_UPLOADLOG, COMMAND_HACK, END_COMMANDS }; @@ -327,6 +329,7 @@ static const CommandInfo commands[] = {"talkraw", &Commands::talkRaw, -1, true}, {"talkpet", &Commands::talkPet, -1, true}, {"uploadconfig", &Commands::uploadConfig, -1, false}, + {"uploadlog", &Commands::uploadLog, -1, false}, {"hack", &Commands::hack, -1, true} }; -- cgit v1.2.3-60-g2f50