Browse Source

add formatting cleanup to W|A results

master
Aaron Miller 7 years ago
parent
commit
724c4c7d33
  1. 6
      Modules/Wolfram Alpha/Wolfram_Alpha.cs

6
Modules/Wolfram Alpha/Wolfram_Alpha.cs

@ -51,6 +51,12 @@ namespace Combot.Modules.Plugins @@ -51,6 +51,12 @@ namespace Combot.Modules.Plugins
{
resultMessage = string.Format("{0}...", resultMessage.Substring(0, (int)maxResults));
}
char[] tails = {';', ' '};
resultMessage = resultMessage
.Replace(Environment.NewLine, "; ")
.Replace(" | ", ", ")
.Replace(" | ", "; ")
.TrimEnd(tails);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, queryMessage);
SendResponse(command.MessageType, command.Location, command.Nick.Nickname, resultMessage);
}

Loading…
Cancel
Save