Ignore:
Timestamp:
08/23/09 19:22:05 (3 years ago)
Author:
james
Message:

New output parser for core plugins - should fix problems with late replacements getting missed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/output_REPEAT.tcl

    r961 r1019  
    1 # 
    2 # 
    31# vim: fdm=indent fdn=1 
    42# 
     
    64############################################################################### 
    75# This is a bMotion plugin 
    8 # Copyright (C) James Michael Seward 2000-2008 
     6# Copyright (C) James Michael Seward 2000-2009 
    97# 
    108# This program is covered by the GPL, please refer the to LICENCE file in the 
     
    1715 
    1816proc bMotion_plugin_output_REPEAT { channel line } { 
    19         set previous_line "" 
    20         while {[regexp -nocase "%REPEAT\{(.+?)\}" $line matches BOOM]} { 
     17        if {[regexp -nocase "%REPEAT\{(.+?)\}" $line matches BOOM]} { 
    2118                set replacement [bMotionMakeRepeat $BOOM] 
    2219                regsub -nocase "%REPEAT\\{$BOOM\\}" $line $replacement line 
    23                 if {$previous_line == $line} { 
    24                         putlog "bMotion: ALERT! looping too much in %REPEAT code with $line (no change since last parse)" 
    25                         set line "" 
    26                         break 
    27                 } 
    28                 set previous_line $line 
    2920        } 
    3021        return $line 
Note: See TracChangeset for help on using the changeset viewer.