Browse Source

add formatting cleanup to W|A results

tags/3.1.0
Aaron Miller 4 years ago
parent
commit
1c283529ed
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      Modules/Wolfram Alpha/Wolfram_Alpha.cs

+ 6
- 0
Modules/Wolfram Alpha/Wolfram_Alpha.cs View File

@@ -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