summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/chat.cpp13
-rw-r--r--src/gui/recorder.cpp19
-rw-r--r--src/gui/recorder.h15
-rw-r--r--src/party.cpp5
-rw-r--r--src/party.h1
5 files changed, 13 insertions, 40 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 3a22581f..36e33160 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -478,7 +478,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
else if (command == "whisper" || command == "msg" || command == "w")
whisper(nick, msg);
else if (command == "record")
- mRecorder->changeStatus(msg);
+ mRecorder->changeRecordingStatus(msg);
else if (command == "toggle")
{
if (msg == "")
@@ -804,10 +804,11 @@ void ChatWindow::help(const std::string & msg1, const std::string & msg2)
chatLog(_("/announce: Global announcement (GM only)"), BY_SERVER);
chatLog(_("/clear: Clears this window"), BY_SERVER);
chatLog(_("/help: Display this help"), BY_SERVER);
- mParty->help();
+ chatLog(_("/party <command> <params>: Party commands."), BY_SERVER);
chatLog(_("/msg <nick> <message>: Alternate form for /whisper"), BY_SERVER);
chatLog(_("/present: Get list of players present"), BY_SERVER);
- mRecorder->help();
+ chatLog(_("/record <filename>: Start recording the chat to an"
+ " external file."), BY_SERVER);
chatLog(_("/toggle: Determine whether <return> toggles the chat log."),
BY_SERVER);
chatLog(_("/where: Display map name"), BY_SERVER);
@@ -851,7 +852,11 @@ void ChatWindow::help(const std::string & msg1, const std::string & msg2)
}
else if (msg1 == "record")
{
- mRecorder->help2();
+ chatLog(_("Command: /record <filename>"), BY_SERVER);
+ chatLog(_("This command starts recording the chat log to the file "
+ "<filename>."), BY_SERVER);
+ chatLog(_("Command: /record"), BY_SERVER);
+ chatLog(_("This command finishes a recording session."), BY_SERVER);
}
else if (msg1 == "toggle")
{
diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp
index da67875b..02eddbe5 100644
--- a/src/gui/recorder.cpp
+++ b/src/gui/recorder.cpp
@@ -46,7 +46,7 @@ void Recorder::record(const std::string &msg)
}
}
-void Recorder::changeStatus(const std::string &msg)
+void Recorder::changeRecordingStatus(const std::string &msg)
{
std::string msgCopy = msg;
trim(msgCopy);
@@ -91,24 +91,9 @@ void Recorder::changeStatus(const std::string &msg)
}
}
-void Recorder::help() const
-{
- mChat->chatLog("/record <filename>: Start recording the chat.", BY_SERVER);
-}
-
-void Recorder::help2() const
-{
- mChat->chatLog("Command: /record <filename>", BY_SERVER);
- mChat->chatLog("This command starts recording the chat log to the file "
- "<filename>.", BY_SERVER);
- mChat->chatLog("Command: /record", BY_SERVER);
- mChat->chatLog("This command finishes a recording session.", BY_SERVER);
-}
-
void Recorder::action(const gcn::ActionEvent &event)
{
- if (event.getId() == "activate")
- changeStatus("");
+ changeRecordingStatus("");
}
Recorder::~Recorder()
diff --git a/src/gui/recorder.h b/src/gui/recorder.h
index 6f917c25..420c4a2b 100644
--- a/src/gui/recorder.h
+++ b/src/gui/recorder.h
@@ -53,20 +53,9 @@ class Recorder : public Window, public gcn::ActionListener
/*
* Outputs the message to the recorder file
*
- * @param msg the line to write to the recorded file.
- */
- void changeStatus(const std::string &msg);
-
- /*
- * Displays a help message on how to use this class in the chat window.
- */
- void help() const;
-
- /*
- * Displays an extended help message on how to use this class in the
- * chat window.
+ * @param msg The file to write out to. If null, then stop recording.
*/
- void help2() const;
+ void changeRecordingStatus(const std::string &msg);
/*
* Whether or not the recorder is in use.
diff --git a/src/party.cpp b/src/party.cpp
index ecb0ab2d..67262176 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -166,11 +166,6 @@ void Party::receiveChat(Being *being, const std::string &msg)
mChat->chatLog(being->getName() + " : " + msg, BY_PARTY);
}
-void Party::help()
-{
- mChat->chatLog(_("/party <command> <params>: Party commands."), BY_SERVER);
-}
-
void Party::help(const std::string &msg)
{
if (msg == "")
diff --git a/src/party.h b/src/party.h
index 8d6dce47..5643f894 100644
--- a/src/party.h
+++ b/src/party.h
@@ -47,7 +47,6 @@ class Party
void leftResponse(const std::string &nick);
void receiveChat(Being *being, const std::string &msg);
- void help();
void help(const std::string &msg);
private:
ChatWindow *mChat;