X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/4c346b97338163448e1a684bd1b5d53271f34cd6..0fc9896e27b94093ccde0b8566e2b8109ae8f657:/projects/stargazer/plugins/other/rscript/rscript.h diff --git a/projects/stargazer/plugins/other/rscript/rscript.h b/projects/stargazer/plugins/other/rscript/rscript.h index ca52adf8..6ee10c82 100644 --- a/projects/stargazer/plugins/other/rscript/rscript.h +++ b/projects/stargazer/plugins/other/rscript/rscript.h @@ -47,6 +47,7 @@ #include "stg/users.h" #include "stg/blowfish.h" #include "stg/rs_packets.h" +#include "stg/logger.h" #include "nrmap_parser.h" extern "C" PLUGIN * GetPlugin(); @@ -60,7 +61,8 @@ class SETTINGS; //----------------------------------------------------------------------------- class RS_ADD_USER_NONIFIER: public NOTIFIER_BASE { public: - RS_ADD_USER_NONIFIER(REMOTE_SCRIPT & r) : rs(r) {} + RS_ADD_USER_NONIFIER(REMOTE_SCRIPT & r) + : NOTIFIER_BASE(), rs(r) {} virtual ~RS_ADD_USER_NONIFIER() {} void Notify(const USER_PTR & user); @@ -73,7 +75,8 @@ private: //----------------------------------------------------------------------------- class RS_DEL_USER_NONIFIER: public NOTIFIER_BASE { public: - RS_DEL_USER_NONIFIER(REMOTE_SCRIPT & r) : rs(r) {} + RS_DEL_USER_NONIFIER(REMOTE_SCRIPT & r) + : NOTIFIER_BASE(), rs(r) {} virtual ~RS_DEL_USER_NONIFIER() {} void Notify(const USER_PTR & user); @@ -87,10 +90,10 @@ private: template class RS_CHG_AFTER_NOTIFIER: public PROPERTY_NOTIFIER_BASE { public: - RS_CHG_AFTER_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u) : user(u), rs(r) {} + RS_CHG_AFTER_NOTIFIER(REMOTE_SCRIPT & r, USER_PTR u) + : PROPERTY_NOTIFIER_BASE(), user(u), rs(r) {} RS_CHG_AFTER_NOTIFIER(const RS_CHG_AFTER_NOTIFIER & rvalue) - : user(rvalue.user), rs(rvalue.rs) - {} + : PROPERTY_NOTIFIER_BASE(), user(rvalue.user), rs(rvalue.rs) {} void Notify(const T & oldValue, const T & newValue); USER_PTR GetUser() { return user; } @@ -168,8 +171,8 @@ public: const std::string & GetStrError() const { return errorStr; } const std::string GetVersion() const { return "Remote script v 0.3"; } - uint16_t GetStartPosition() const { return 20; } - uint16_t GetStopPosition() const { return 20; } + uint16_t GetStartPosition() const { return 10; } + uint16_t GetStopPosition() const { return 10; } void DelUser(USER_PTR u) { UnSetUserNotifier(u); } void AddUser(USER_PTR u) { SetUserNotifier(u); } @@ -225,6 +228,8 @@ private: RS_ADD_USER_NONIFIER onAddUserNotifier; RS_DEL_USER_NONIFIER onDelUserNotifier; + PLUGIN_LOGGER logger; + friend class UpdateRouter; friend class DisconnectUser; };