From 67f8b40f80368dad17a9da50c78923433e266f54 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 24 Oct 2014 22:03:11 +0300 Subject: Fix code style. --- src/actions/chat.cpp | 9 +++++++++ src/actions/commands.cpp | 14 ++++---------- src/actions/windows.cpp | 16 ++++++++++++++++ 3 files changed, 29 insertions(+), 10 deletions(-) (limited to 'src/actions') diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 655aa01ae..83ed121c5 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -84,6 +84,15 @@ static void outString(const ChatTab *const tab, break; } default: + case ChatTabType::UNKNOWN: + case ChatTabType::INPUT: + case ChatTabType::WHISPER: + case ChatTabType::DEBUG: + case ChatTabType::TRADE: + case ChatTabType::BATTLE: + case ChatTabType::LANG: + case ChatTabType::GM: + case ChatTabType::CHANNEL: chatHandler->me(def, GENERAL_CHANNEL); break; } diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index d187f8f6c..d3c79c10f 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -410,17 +410,11 @@ impHandler(info) return false; } - switch (event.tab->getType()) + if (event.tab->getType() == ChatTabType::GUILD) { - case ChatTabType::GUILD: - { - const Guild *const guild = localPlayer->getGuild(); - if (guild) - guildHandler->info(guild->getId()); - break; - } - default: - break; + const Guild *const guild = localPlayer->getGuild(); + if (guild) + guildHandler->info(guild->getId()); } return true; } diff --git a/src/actions/windows.cpp b/src/actions/windows.cpp index 18a2c4773..107988ec5 100644 --- a/src/actions/windows.cpp +++ b/src/actions/windows.cpp @@ -112,7 +112,23 @@ impHandler(helpWindowShow) return showHelpPage("chatparty", true); case ChatTabType::GUILD: return showHelpPage("chatguild", true); + case ChatTabType::WHISPER: + return showHelpPage("chatwhisper", true); + case ChatTabType::DEBUG: + return showHelpPage("chatdebug", true); + case ChatTabType::TRADE: + return showHelpPage("chattrade", true); + case ChatTabType::BATTLE: + return showHelpPage("chatbattle", true); + case ChatTabType::LANG: + return showHelpPage("chatlang", true); + case ChatTabType::GM: + return showHelpPage("chatgm", true); + case ChatTabType::CHANNEL: + return showHelpPage("chatchannel", true); default: + case ChatTabType::UNKNOWN: + case ChatTabType::INPUT: return showHelpPage("chatcommands", true); } } -- cgit v1.2.3-70-g09d2