Page MenuHomePhabricator

Parsing for {nickname} instead of {0} no longer works
Closed, MigratedPublic

Description

Exception is being thrown when a message with {nickname} is parsed. I'm not sure if other placeholders are affected, but they probably are. This appears to be caused by { and } being passed to String.Format(...). It's probably caused by this logic only being implemented for brain commands and not standard messages

System.FormatException: Input string was not in a correct format.
  at System.Text.StringBuilder.AppendFormatHelper (IFormatProvider provider, System.String format, ParamsArray args) <0xf43ef548 + 0x001eb> in <filename unknown>:0 
  at System.String.FormatHelper (IFormatProvider provider, System.String format, ParamsArray args) <0xf43ef490 + 0x00077> in <filename unknown>:0 
  at System.String.Format (System.String format, System.Object[] args) <0xf3d6b9a8 + 0x000b7> in <filename unknown>:0 
  at Helpmebot.Services.MessageService.RetrieveMessage (System.String messageKey, System.String contextPath, IEnumerable`1 arguments) <0xf3704d40 + 0x00223> in <filename unknown>:0 
  at Helpmebot.Services.MessageService.RetrieveMessage (System.String messageKey, System.Object context, IEnumerable`1 arguments) <0xf3704b38 + 0x00197> in <filename unknown>:0 
  at Helpmebot.Commands.FunStuff.TargetedFunCommand.ExecuteCommand () <0xed95f2a8 + 0x0008e> in <filename unknown>:0 
  at helpmebot6.Commands.GenericCommand.ReallyRunCommand () <0xf2b1c070 + 0x0028c> in <filename unknown>:0