diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:44:58 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:44:58 +0000 |
commit | bbb5f6ee63b4a226e6679119a1ee8c725d7d2abc (patch) | |
tree | 893615b964fb792773a4647c33a0cb424c33fb79 /include | |
parent | 9924e5631193ad581d885380fd11ae8bfb91fa0b (diff) |
Move SetClass to LocalUser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11941 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/ctables.h | 15 | ||||
-rw-r--r-- | include/users.h | 22 |
2 files changed, 26 insertions, 11 deletions
diff --git a/include/ctables.h b/include/ctables.h index 80962b67e..4cb530e63 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -214,6 +214,21 @@ class CoreExport Command : public classbase virtual ~Command(); }; +class LocalUser; +class RemoteUser; +class FakeUser; + +class CoreExport SplitCommand : public Command +{ + public: + SplitCommand(Module* me, const std::string &cmd, int minpara = 0, int maxpara = 0) + : Command(me, cmd, minpara, maxpara) {} + virtual CmdResult Handle(const std::vector<std::string>& parameters, User* user); + virtual CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user); + virtual CmdResult HandleRemote(const std::vector<std::string>& parameters, RemoteUser* user); + virtual CmdResult HandleServer(const std::vector<std::string>& parameters, FakeUser* user); +}; + /** A hash of commands used by the core */ typedef nspace::hash_map<std::string,Command*> Commandtable; diff --git a/include/users.h b/include/users.h index c60d5f033..fcdc5b374 100644 --- a/include/users.h +++ b/include/users.h @@ -639,11 +639,6 @@ class CoreExport User : public StreamSocket */ void CheckClass(); - /** Use this method to fully connect a user. - * This will send the message of the day, check G/K/E lines, etc. - */ - void FullConnect(); - /** Change this users hash key to a new string. * You should not call this function directly. It is used by the core * to update the users hash entry on a nickchange. @@ -835,12 +830,6 @@ class CoreExport User : public StreamSocket */ ConnectClass *GetClass(); - /** Set the connect class to which this user belongs to. - * @param explicit_name Set this string to tie the user to a specific class name. Otherwise, the class is fitted by checking <connect> tags from the configuration file. - * @return A reference to this user's current connect class. - */ - ConnectClass *SetClass(const std::string &explicit_name = ""); - /** Show the message of the day to this user */ void ShowMOTD(); @@ -890,6 +879,17 @@ class CoreExport LocalUser : public User public: LocalUser(); virtual void SendText(const std::string& line); + + /** Use this method to fully connect a user. + * This will send the message of the day, check G/K/E lines, etc. + */ + void FullConnect(); + + /** Set the connect class to which this user belongs to. + * @param explicit_name Set this string to tie the user to a specific class name. Otherwise, the class is fitted by checking <connect> tags from the configuration file. + * @return A reference to this user's current connect class. + */ + ConnectClass *SetClass(const std::string &explicit_name = ""); }; class CoreExport RemoteUser : public User |