commit 4f6332310c1ec905d771bf2cbb84032528ec15f3
parent 8c5e0077c973bb88e015d7f9f1ebc114ba6fb94b
Author: Dominik Schmidt <dominik@schm1dt.ch>
Date: Thu, 6 Sep 2018 12:55:39 +0200
Add some more commands
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/bastlibridge/bot.d b/src/bastlibridge/bot.d
@@ -97,8 +97,8 @@ static this(){
globalCommands.add!((Message m){m.source.stop();})("quit", CommandOptions(true));
globalCommands.add!((Message m){m.source.manager.teardown();})("teardown", CommandOptions(true));
globalCommands.add!((Message m, in char[] other){m.respond(enforce(m.source.manager.getEndpoint(other),"Endpoint unknown").endpoint.lastSeen());})("lastUpdate");
- globalCommands.add!((Message m, in char[] endpoint){m.source.manager.addEndpoint(endpoint.idup))("addEndpoint",CommandOptions(true));
- globalCommands.add!((Message m, in char[] endpoint){m.source.manager.removeEndpoint(endpoint.idup))("removeEndpoint",CommandOptions(true));
+ globalCommands.add!((Message m, in char[] endpoint){m.source.manager.addEndpoint(endpoint.idup);})("addEndpoint",CommandOptions(true));
+ globalCommands.add!((Message m, in char[] endpoint){m.source.manager.terminate(endpoint.idup);})("removeEndpoint",CommandOptions(true));
}
/**
diff --git a/src/bastlibridge/manager.d b/src/bastlibridge/manager.d
@@ -129,7 +129,6 @@ class Manager{
info("All processes stopped. We will now exit");
}
- alias removeEndpoint = terminate;
void terminate(in char[] name){
auto val=getEndpoint(name);
if(val){