diff --git a/configuration.pas b/configuration.pas index 9b8fb77..b41d260 100644 --- a/configuration.pas +++ b/configuration.pas @@ -75,7 +75,7 @@ function TConfig.GetBotTooken: String; function TConfig.GetDefaultDir: String; begin - Result:=FIni.ReadString('File', 'DefaultDir', GetCurrentDir); + Result:=FIni.ReadString('File', 'DefaultDir', PathDelim); end; function TConfig.GetHTTPProxyHost: String; diff --git a/shellthread.pas b/shellthread.pas index bb90d46..f2c0a82 100644 --- a/shellthread.pas +++ b/shellthread.pas @@ -126,14 +126,17 @@ procedure TShellThread.BotReceiveMessage(ASender: TObject; end; procedure TShellThread.BotReceiveCallbackQuery(ASender: TObject; ACallback: TCallbackQueryObj); +var + aName: String; begin if not CommandStart then Exit; FIsCallBack:=True; + aName:=RightStr(ACallback.Data, Length(ACallback.Data)-Length(dt_dir)-1); case ExtractWord(1, ACallback.Data, [' ']) of - dt_script: CallbackScript(ExtractWord(2, ACallback.Data, [' '])); - dt_dir: CallbackDir(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' '])); - dt_file: CallbackFile(ACallback.Message.Text, ExtractWord(2, ACallback.Data, [' '])); + dt_script: CallbackScript(aName); + dt_dir: CallbackDir(ACallback.Message.Text, aName); + dt_file: CallbackFile(ACallback.Message.Text, aName); end; end; diff --git a/tgshd.lpi b/tgshd.lpi index c3b72e0..39f8a75 100644 --- a/tgshd.lpi +++ b/tgshd.lpi @@ -61,7 +61,7 @@ - + @@ -89,7 +89,7 @@ - +