!= should be ==
This commit is contained in:
parent
7cfc219794
commit
332fe805a9
1 changed files with 5 additions and 5 deletions
|
|
@ -30,9 +30,9 @@ namespace TShockAPI
|
||||||
Ip = ip;
|
Ip = ip;
|
||||||
Port = port;
|
Port = port;
|
||||||
}
|
}
|
||||||
public void Start()
|
public virtual void Start()
|
||||||
{
|
{
|
||||||
if (listener != null)
|
if (listener == null)
|
||||||
{
|
{
|
||||||
listener = HttpListener.Create(Ip, Port);
|
listener = HttpListener.Create(Ip, Port);
|
||||||
listener.RequestReceived += OnRequest;
|
listener.RequestReceived += OnRequest;
|
||||||
|
|
@ -45,7 +45,7 @@ namespace TShockAPI
|
||||||
Port = port;
|
Port = port;
|
||||||
Start();
|
Start();
|
||||||
}
|
}
|
||||||
public void Stop()
|
public virtual void Stop()
|
||||||
{
|
{
|
||||||
listener.Stop();
|
listener.Stop();
|
||||||
}
|
}
|
||||||
|
|
@ -55,12 +55,12 @@ namespace TShockAPI
|
||||||
Register(new RestCommand(path, callback));
|
Register(new RestCommand(path, callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Register(RestCommand com)
|
public virtual void Register(RestCommand com)
|
||||||
{
|
{
|
||||||
commands.Add(com);
|
commands.Add(com);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnRequest(object sender, RequestEventArgs e)
|
protected virtual void OnRequest(object sender, RequestEventArgs e)
|
||||||
{
|
{
|
||||||
var obj = Process(sender, e);
|
var obj = Process(sender, e);
|
||||||
if (obj == null)
|
if (obj == null)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue