mirror of
https://github.com/cadmium-im/zirconium-sharp.git
synced 2024-11-22 10:22:23 +00:00
Refactor HelloWorldPlugin (cleanup code)
This commit is contained in:
parent
ce8ed0d7ad
commit
eb849a8388
@ -16,15 +16,6 @@ namespace HelloWorldPlugin
|
|||||||
hostModuleAPI.Hook(handler);
|
hostModuleAPI.Hook(handler);
|
||||||
Log.Debug("plugin is initialized");
|
Log.Debug("plugin is initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PreInitialize(IPluginManager pluginManager) { }
|
|
||||||
|
|
||||||
public dynamic GetExportedAPI() { return null; }
|
|
||||||
|
|
||||||
public Type[] GetExportedTypes()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class C2SHandler : IC2SMessageHandler
|
internal class C2SHandler : IC2SMessageHandler
|
||||||
@ -46,8 +37,7 @@ namespace HelloWorldPlugin
|
|||||||
msg.Payload["testProp"] = "hello world";
|
msg.Payload["testProp"] = "hello world";
|
||||||
msg.Ok = true;
|
msg.Ok = true;
|
||||||
msg.From = hostModuleAPI.GetServerID();
|
msg.From = hostModuleAPI.GetServerID();
|
||||||
string strMsg = JsonConvert.SerializeObject(msg);
|
session.ConnectionHandler.SendMessage(msg);
|
||||||
session.ConnectionHandler.SendMessage(strMsg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsAuthorizationRequired() => false;
|
public bool IsAuthorizationRequired() => false;
|
||||||
|
Loading…
Reference in New Issue
Block a user