Skip to content
Browse files

Merge branch 'master' of https://github.com/pfn/znc

Conflicts:
	modules/extra/away.cpp

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information...
2 parents 6deae62 + c39ebe3 commit 4324d5ff02fab711d0a247f60cc55c280d8bf921 @psychon psychon committed May 21, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 modules/extra/away.cpp
View
11 modules/extra/away.cpp
@@ -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 @@ class CAway : public CModule
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),

0 comments on commit 4324d5f

Please sign in to comment.
Something went wrong with that request. Please try again.