+ CommandAddLine(Module* Creator) : ServerCommand(Creator, "ADDLINE", 6, 6) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+
+ class Builder : public CmdBuilder
+ {
+ public:
+ Builder(XLine* xline, User* user = ServerInstance->FakeClient);
+ };
+};
+
+class CommandDelLine : public ServerCommand
+{
+ public:
+ CommandDelLine(Module* Creator) : ServerCommand(Creator, "DELLINE", 2, 2) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+};
+
+class CommandEncap : public ServerCommand
+{
+ public:
+ CommandEncap(Module* Creator) : ServerCommand(Creator, "ENCAP", 2) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+};
+
+class CommandIdle : public UserOnlyServerCommand<CommandIdle>
+{
+ public:
+ CommandIdle(Module* Creator) : UserOnlyServerCommand<CommandIdle>(Creator, "IDLE", 1) { }
+ CmdResult HandleRemote(RemoteUser* user, std::vector<std::string>& parameters);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_UNICAST(parameters[0]); }
+};
+
+class CommandNick : public UserOnlyServerCommand<CommandNick>
+{
+ public:
+ CommandNick(Module* Creator) : UserOnlyServerCommand<CommandNick>(Creator, "NICK", 2) { }
+ CmdResult HandleRemote(RemoteUser* user, std::vector<std::string>& parameters);
+};
+
+class CommandPing : public ServerCommand
+{
+ public:
+ CommandPing(Module* Creator) : ServerCommand(Creator, "PING", 1) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_UNICAST(parameters[0]); }
+};
+
+class CommandPong : public ServerOnlyServerCommand<CommandPong>
+{
+ public:
+ CommandPong(Module* Creator) : ServerOnlyServerCommand<CommandPong>(Creator, "PONG", 1) { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { return ROUTE_UNICAST(parameters[0]); }
+};
+
+class CommandSave : public ServerCommand
+{
+ public:
+ /** Timestamp of the uuid nick of all users who collided and got their nick changed to uuid
+ */
+ static const time_t SavedTimestamp = 100;
+
+ CommandSave(Module* Creator) : ServerCommand(Creator, "SAVE", 2) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+};
+
+class CommandServer : public ServerOnlyServerCommand<CommandServer>
+{
+ static void HandleExtra(TreeServer* newserver, const std::vector<std::string>& params);
+
+ public:
+ CommandServer(Module* Creator) : ServerOnlyServerCommand<CommandServer>(Creator, "SERVER", 3) { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+
+ class Builder : public CmdBuilder
+ {
+ void push_property(const char* key, const std::string& val)
+ {
+ push(key).push_raw('=').push_raw(val);
+ }
+ public:
+ Builder(TreeServer* server);
+ };
+};
+
+class CommandSQuit : public ServerOnlyServerCommand<CommandSQuit>
+{
+ public:
+ CommandSQuit(Module* Creator) : ServerOnlyServerCommand<CommandSQuit>(Creator, "SQUIT", 2) { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+};
+
+class CommandSNONotice : public ServerCommand
+{
+ public:
+ CommandSNONotice(Module* Creator) : ServerCommand(Creator, "SNONOTICE", 2) { }
+ CmdResult Handle(User* user, std::vector<std::string>& parameters);
+};
+
+class CommandEndBurst : public ServerOnlyServerCommand<CommandEndBurst>
+{
+ public:
+ CommandEndBurst(Module* Creator) : ServerOnlyServerCommand<CommandEndBurst>(Creator, "ENDBURST") { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+};
+
+class CommandSInfo : public ServerOnlyServerCommand<CommandSInfo>
+{
+ public:
+ CommandSInfo(Module* Creator) : ServerOnlyServerCommand<CommandSInfo>(Creator, "SINFO", 2) { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+
+ class Builder : public CmdBuilder
+ {
+ public:
+ Builder(TreeServer* server, const char* type, const std::string& value);
+ };
+};
+
+class CommandNum : public ServerOnlyServerCommand<CommandNum>
+{
+ public:
+ CommandNum(Module* Creator) : ServerOnlyServerCommand<CommandNum>(Creator, "NUM", 3) { }
+ CmdResult HandleServer(TreeServer* server, std::vector<std::string>& parameters);
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
+
+ class Builder : public CmdBuilder
+ {
+ public:
+ Builder(SpanningTree::RemoteUser* target, const Numeric::Numeric& numeric);
+ };