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 <nickname> 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 <nighteyes1993@gmail.com>
This commit is contained in:
Toon Schoenmakers
2011-09-24 22:18:39 +02:00
parent 768359277b
commit 5248987907

View File

@@ -43,9 +43,27 @@ public:
} else if (sCmdName == "clear") {
m_sPass = "";
DelNV("Password");
} else {
PutModule("Commands: set <password>, clear");
}
} else if (sCmdName == "ghost") {
if(sCommand.Token(1).empty()) {
PutModule("Syntax: ghost <nickname>");
} 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 <nickname>");
else
PutIRC("PRIVMSG NickServ :RECOVER " + sCommand.Token(1) + " " + m_sPass);
} else if (sCmdName == "release") {
if(sCommand.Token(1).empty())
PutModule("Syntax: release <nickname>");
else
PutIRC("PRIVMSG NickServ :RELEASE " + sCommand.Token(1) + " " + m_sPass);
} else
PutModule("Commands: set <password>, clear, ghost <nickname>, group, release <nickname>, recover <nickname>");
}
void HandleMessage(CNick& Nick, const CString& sMessage)