Conflicts:
	modules/extra/away.cpp

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2011-05-21 13:58:29 +02:00
+11
View File
@@ -11,6 +11,7 @@
#define REQUIRESSL
#include "Client.h"
#include "User.h"
#include "FileUtils.h"
#include <sys/stat.h>
@@ -57,6 +58,15 @@ class CAway : public CModule
PutModule(m_vMessages[a]);
}
void ReplayCommand(const CString& sCommand) {
CString nick = GetClient()->GetNick();
for (u_int a = 0; a < m_vMessages.size(); a++) {
CString sWhom = m_vMessages[a].Token(1, false, ":");
CString sMessage = m_vMessages[a].Token(2, true, ":");
PutUser(":" + sWhom + " PRIVMSG " + nick + " :" + sMessage);
}
}
void DeleteCommand(const CString& sCommand) {
CString sWhich = sCommand.Token(1);
if (sWhich == "all") {
@@ -188,6 +198,7 @@ public:
AddCommand("Ping", static_cast<CModCommand::ModCmdFunc>(&CAway::PingCommand));
AddCommand("Pass", static_cast<CModCommand::ModCmdFunc>(&CAway::PassCommand));
AddCommand("Show", static_cast<CModCommand::ModCmdFunc>(&CAway::ShowCommand));
AddCommand("Replay", static_cast<CModCommand::ModCmdFunc>(&CAway::ReplayCommand));
AddCommand("EnableTimer", static_cast<CModCommand::ModCmdFunc>(&CAway::EnableTimerCommand));
AddCommand("DisableTimer", static_cast<CModCommand::ModCmdFunc>(&CAway::DisableTimerCommand));
AddCommand("SetTimer", static_cast<CModCommand::ModCmdFunc>(&CAway::SetTimerCommand),