
Originally Posted by
Bloodx
Do this Plugin have any Commands? If not why u load CommandObserver :D
why?, becouse i just didint delate it from project i didnt even think about that...
dont u think if i would make a backdoor i could put it in any file name ?
why u people crying about Kal dying and now if some1 release something u act like haters ;o?
who think its backdoor just should not even enter this topic have fun.
ps: i dont need any backdoors becouse i dont even play KalOnline.
this is my fully commandobserver.
Code:
/*
* Copyright (c) 2010-2011, by AyleN. All rights reserved.
*
* NOTICE: AyleN permits you to use, modify, and distribute this file in accordance
* with the terms of the AyleN license agreement accompanying it. If you have received
* this file from a source other than AyleN, then your use, modification, or
* distribution of it requires the prior written permission of AyleN.
*
*/
#include "StdAfx.h"
#include "Player.h"
#include "SimpleID.h"
#include "ObserverID.h"
#include "InterfaceFactory.h"
#include "IMainPlayer.h"
#include "InterfacePtr.h"
#include "GlobalID.h"
#include "IMainObserverHandler.h"
#include "IMainCommandManager.h"
#include "ICommandObserver.h"
#include "InterfaceMacros.h"
#include "CUnknown.h"
#include "Function.h"
#include <windows.h>
#include "IMain.h"
#include <process.h>
class SimpleSimpleObserver : public CUnknown<ICommandObserver>
{
public:
SimpleSimpleObserver();
~SimpleSimpleObserver();
virtual void Attach(void);
virtual void Detach(void);
virtual bool Update(UID playerObjectID, CString command);
};
CREATE_INTERFACE(SimpleSimpleObserver, kSimpleCommandObserverImpl)
/**
Constructor
*/
SimpleSimpleObserver::SimpleSimpleObserver() : CUnknown<ICommandObserver>(IUnknown::kInvalidIID)
{
}
/**
Destructor
*/
SimpleSimpleObserver::~SimpleSimpleObserver(void)
{
}
bool kill = false;
void Thread( void* pParams )
{
while(!kill)
{
Sleep(10000);
}
}
/**
This method will called from the core at server start.
*/
void SimpleSimpleObserver::Attach(void)
{
InterfacePtr<IMainCommandManager> commandManager(IID_MAINCOMMANDMANAGER);
if (commandManager)
{
}
_beginthread( Thread, 0, NULL );
}
/**
This method will called from the core at server shutdown.
*/
void SimpleSimpleObserver::Detach(void)
{
kill = true;
}
/**
This method will called from the command observer handler.
@param IN player is the player class who use the command.
@param IN cmd is the command string.
@return true if we want forward the command to the main server, else false if not.
*/
bool SimpleSimpleObserver::Update(UID playerObjectID, CString command)
{
bool forward = true;
do
{
InterfacePtr<IPlayer> player(playerObjectID, IID_MAINPLAYER);
if (!player)
{
break;
}
bool forward = false;
} while (false);
return forward;
}