/* * put following lines in your services.conf * * module { name = "os_forceid" } * command { service = "OperServ"; name = "FORCEID"; command = "operserv/forceid"; permission = "operserv/forceid"; } * */ #include "module.h" class CommandOSForceID : public Command { public: CommandOSForceID(Module *creator, const Anope::string &sname = "operserv/forceid") : Command(creator, sname, 1, 1) { this->SetDesc(_("Forcefully identifies a user to his nick")); this->SetSyntax(_("\037\037")); } void Execute(CommandSource &source, const std::vector ¶ms) anope_override { User *u = User::Find(params[0], true); if (!u) { source.Reply(_("Nick %s is not online."), params[0].c_str()); return; } NickAlias *na = NickAlias::Find(u->nick); if (!na) { source.Reply(_("Nick %s is not registered."), params[0].c_str()); return; } u->Identify(na); source.Reply(_("Done.")); Log() << source.GetUser()->nick << " used FORCEID on " << params[0]; } }; class OSForceID : public Module { CommandOSForceID commandosforceid; public: OSForceID(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, THIRD), commandosforceid(this) { this->SetAuthor("Jens Voss "); this->SetVersion("1.0"); } }; MODULE_INIT(OSForceID)