Here you're removing all whitespace in the reason. Use get_data() instead.

And test your patch on the command line as well. Easiest is to open a multiplayer game and type /ignore .... into the chat field.
Note also how a plain /ignore (which lists current ignores) looks ugly now. I suggest using newlines as separatore there.