* @return True if the given password was correct, false if it was not
*/
bool CheckPass(User* user, const std::string& inputpass, const char* confkey);
+
+ /** Send an ERROR to unregistered users and a NOTICE to all registered local users
+ * @param message Message to send
+ */
+ void SendError(const std::string& message);
}
/** Handle /DIE.
* @param user The user issuing the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User* user);
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
};
/** Handle /KILL.
{
std::string lastuuid;
std::string killreason;
+ ClientProtocol::EventProvider protoev;
public:
/** Constructor for kill.
CommandKill(Module* parent);
/** Handle command.
- * @param parameters The parameters to the command
- * @param user The user issuing the command
+ * @param user User issuing the command
+ * @param parameters Parameters to the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User* user);
- RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
+ RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
- void EncodeParameter(std::string& param, int index);
+ void EncodeParameter(std::string& param, unsigned int index) CXX11_OVERRIDE;
};
/** Handle /OPER.
CommandOper(Module* parent);
/** Handle command.
- * @param parameters The parameters to the command
- * @param user The user issuing the command
+ * @param user User issuing the command
+ * @param parameters Parameters to the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
+ CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE;
};
/** Handle /REHASH.
CommandRehash(Module* parent);
/** Handle command.
- * @param parameters The parameters to the command
- * @param user The user issuing the command
+ * @param user User issuing the command
+ * @param parameters Parameters to the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
};
/** Handle /RESTART
CommandRestart(Module* parent);
/** Handle command.
- * @param parameters The parameters to the command
- * @param user The user issuing the command
+ * @param user User issuing the command
+ * @param parameters Parameters to the command
* @return A value from CmdResult to indicate command success or failure.
*/
- CmdResult Handle(const std::vector<std::string>& parameters, User* user);
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
};