Compare commits

...

1 Commits

Author SHA1 Message Date
Aaron Miller 724c4c7d33 add formatting cleanup to W|A results 7 years ago
  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