diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-05-13 05:27:39 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-05-13 05:27:39 +0000 |
commit | 6dd331262aa8f989657891e27b8891ee6a00016c (patch) | |
tree | a414c7cacbdc046ee6529c63f000c26d973fe35c /include/fakeuser.h | |
parent | d4ee4c5aa4312cde76fe50e34ef8ca1685d521f0 (diff) |
Create subclass of User for FakeClient, to allow for use as command source
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11375 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/fakeuser.h')
-rw-r--r-- | include/fakeuser.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/fakeuser.h b/include/fakeuser.h new file mode 100644 index 000000000..5d62b7060 --- /dev/null +++ b/include/fakeuser.h @@ -0,0 +1,31 @@ +/* +------------------------------------+ + * | Inspire Internet Relay Chat Daemon | + * +------------------------------------+ + * + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits + * + * This program is free but copyrighted software; see + * the file COPYING for details. + * + * --------------------------------------------------- + */ + +#ifndef __FAKEUSER_H__ +#define __FAKEUSER_H__ + +#include "users.h" + +class CoreExport FakeUser : public User +{ + public: + FakeUser(InspIRCd* Instance) : User(Instance, "!") + { + SetFd(FD_MAGIC_NUMBER); + } + + virtual const std::string GetFullHost() { return server; } + virtual const std::string GetFullRealHost() { return server; } +}; + +#endif |