… | |
… | |
623 | } |
623 | } |
624 | |
624 | |
625 | sub spell_add { |
625 | sub spell_add { |
626 | my ($self, $spell) = @_; |
626 | my ($self, $spell) = @_; |
627 | |
627 | |
628 | # try to create single paragraphs of multiple lines sent by the server |
628 | # try to create single paragraphs out of the multiple lines sent by the server |
629 | $spell->{message} =~ s/(?<=\S)\n(?=\w)/ /g; |
629 | $spell->{message} =~ s/(?<=\S)\n(?=\w)/ /g; |
630 | $spell->{message} =~ s/\n+$//; |
630 | $spell->{message} =~ s/\n+$//; |
631 | $spell->{message} ||= "Server did not provide a description for this spell."; |
631 | $spell->{message} ||= "Server did not provide a description for this spell."; |
632 | |
632 | |
633 | $::SPELL_PAGE->add_spell ($spell); |
633 | $::SPELL_PAGE->add_spell ($spell); |