From 52489879079b9feff88d3464d97440d9dc9234e2 Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Sat, 24 Sep 2011 22:18:39 +0200 Subject: [PATCH] Added several new features to the nickserv module This includes a feature to ghost, which simply calls the ghost feature of the actual nickserv. Same goes for group, recover and release. These are called by simply doing /msg *nickserv ghost etc. The changes made actually explain themselves when doing something like /msg *nickserv help. This is really just so we can be lazy and execute nickserv commands that require a password without knowing the password ourselves. Signed-off-by: Toon Schoenmakers --- modules/nickserv.cpp | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/modules/nickserv.cpp b/modules/nickserv.cpp index 186396e9..f2fc65bd 100644 --- a/modules/nickserv.cpp +++ b/modules/nickserv.cpp @@ -43,9 +43,27 @@ public: } else if (sCmdName == "clear") { m_sPass = ""; DelNV("Password"); - } else { - PutModule("Commands: set , clear"); - } + } else if (sCmdName == "ghost") { + if(sCommand.Token(1).empty()) { + PutModule("Syntax: ghost "); + } else { + PutIRC("PRIVMSG NickServ :GHOST " + sCommand.Token(1) + " " + m_sPass); + } + } else if (sCmdName == "group") { + CString sConfNick = m_pUser->GetNick(); + PutIRC("PRIVMSG NickServ :GROUP " + sConfNick + " " + m_sPass); + } else if (sCmdName == "recover") { + if(sCommand.Token(1).empty()) + PutModule("Syntax: recover "); + else + PutIRC("PRIVMSG NickServ :RECOVER " + sCommand.Token(1) + " " + m_sPass); + } else if (sCmdName == "release") { + if(sCommand.Token(1).empty()) + PutModule("Syntax: release "); + else + PutIRC("PRIVMSG NickServ :RELEASE " + sCommand.Token(1) + " " + m_sPass); + } else + PutModule("Commands: set , clear, ghost , group, release , recover "); } void HandleMessage(CNick& Nick, const CString& sMessage)