diff options
author | Adam <Adam@anope.org> | 2011-08-02 02:02:13 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-08-02 02:02:13 -0400 |
commit | f690cd802ecbf540732e35e44a757adb4699a48d (patch) | |
tree | cd37ee366229b327bde3fe1750a0b4369f495a62 /modules | |
parent | d43e1fb8002131db86453b6a931679a26e0bb9a6 (diff) |
Made /ns info default to your account or your nick if no arguments are given
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core/ns_info.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/core/ns_info.cpp b/modules/core/ns_info.cpp index 5a1c4520b..e2c45958f 100644 --- a/modules/core/ns_info.cpp +++ b/modules/core/ns_info.cpp @@ -28,18 +28,18 @@ class CommandNSInfo : public Command } } public: - CommandNSInfo(Module *creator) : Command(creator, "nickserv/info", 1, 2) + CommandNSInfo(Module *creator) : Command(creator, "nickserv/info", 0, 2) { this->SetFlag(CFLAG_ALLOW_UNREGISTERED); this->SetDesc(_("Displays information about a given nickname")); - this->SetSyntax(_("\037nickname\037")); + this->SetSyntax(_("[\037nickname\037]")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { User *u = source.u; - const Anope::string &nick = params[0]; + const Anope::string &nick = params.size() ? params[0] : (u->Account() ? u->Account()->display : u->nick); NickAlias *na = findnick(nick); bool has_auspex = u->IsIdentified() && u->HasPriv("nickserv/auspex"); @@ -148,7 +148,9 @@ class CommandNSInfo : public Command source.Reply(" "); source.Reply(_("Displays information about the given nickname, such as\n" "the nick's owner, last seen address and time, and nick\n" - "options.")); + "options. If no nick is given, an you are identified,\n" + "your account name is used, else your current nickname is\n" + "used.")); return true; } |