Changeset 67009f92
- Timestamp:
- May 13, 2013, 8:12:09 PM (11 years ago)
- Parents:
- 0625919 (diff), c2866ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/IRC/lib/BarnOwl/Module/IRC.pm
rb8a3e00 rc2866ec 23 23 use Getopt::Long; 24 24 use Encode; 25 use Text::Wrap; 25 26 26 27 our $VERSION = 0.02; … … 65 66 description => 'If set, each (space-separated) message type ' . 66 67 'provided will be hidden and ignored if received.' 68 }); 69 70 BarnOwl::new_variable_int('irc:max-message-length', { 71 default => 450, 72 summary => 'Split messages to at most this many characters.' . 73 "If non-positive, don't split messages", 74 description => 'If set to a positive number, any paragraph in an ' . 75 'IRC message will be split after this many characters.' 67 76 }); 68 77 … … 427 436 @msgs = split "\n\n", $fullbody; 428 437 map { tr/\n/ / } @msgs; 438 # split each body at irc:max-message-length characters, if that number 439 # is positive. Only split at space boundaries. Start counting a-fresh 440 # at the beginning of each paragraph 441 my $max_len = BarnOwl::getvar('irc:max-message-length'); 442 if ($max_len > 0) { 443 local($Text::Wrap::columns) = $max_len; 444 @msgs = split "\n", wrap("", "", join "\n", @msgs); 445 } 429 446 for my $body (@msgs) { 430 447 if ($body =~ /^\/me (.*)/) {
Note: See TracChangeset
for help on using the changeset viewer.