]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_user/core_user.h
cmd_part Send ERR_NOTONCHANNEL if the user is not on the channel
[user/henk/code/inspircd.git] / src / coremods / core_user / core_user.h
index a529e0ccf128195c00154e22855fe924be65f937..0418588c1e2916ff81fd7425590c06ac55108d89 100644 (file)
@@ -62,6 +62,40 @@ class CommandAway : public Command
        RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
 };
 
+class CommandMode : public Command
+{
+       unsigned int sent[256];
+       unsigned int seq;
+
+       /** Show the list of one or more list modes to a user.
+        * @param user User to send to.
+        * @param chan Channel whose lists to show.
+        * @param mode_sequence Mode letters to show the lists of.
+        */
+       void DisplayListModes(User* user, Channel* chan, const std::string& mode_sequence);
+
+       /** Show the current modes of a channel or a user to a user.
+        * @param user User to show the modes to.
+        * @param targetuser User whose modes to show. NULL if showing the modes of a channel.
+        * @param targetchannel Channel whose modes to show. NULL if showing the modes of a user.
+        */
+       void DisplayCurrentModes(User* user, User* targetuser, Channel* targetchannel);
+
+ public:
+       /** Constructor for mode.
+        */
+       CommandMode(Module* parent);
+
+       /** Handle command.
+        * @param parameters The parameters to the command
+        * @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);
+
+       RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+
 /** Handle /NICK.
  */
 class CommandNick : public SplitCommand