private OTAPI.HookResult ProcessHandler(string lowered, string input) { var evt = new ServerCommandEvent(input); Events.Raise(evt, _log); return(evt.IsCanceled ? OTAPI.HookResult.Cancel : OTAPI.HookResult.Continue); }
public void HandleServerChat(ServerCommandEvent @event) { var message = @event.Input; if (string.IsNullOrWhiteSpace(message)) { return; } var config = _configurationService.Configuration; if (!message.StartsWith(config.CommandSpecifier) && !message.StartsWith(config.CommandSilentSpecifier)) { return; } try { message = message[1..];