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_OWNER.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 
     
    1816proc bMotion_plugin_output_OWNER { channel line } { 
    1917 
    20         set previous_line "" 
    21  
    22         while {[regexp -nocase "%OWNER\{(.*?)\}" $line matches BOOM]} { 
     18        if {[regexp -nocase "%OWNER\{(.*?)\}" $line matches BOOM]} { 
    2319                set BOOM [string map {\\ \\\\ [ \\\[ ] \\\] \{ \\\{ \} \\\} $ \\\$ \" \\\" | \\\|} $BOOM] 
    2420 
     
    2622                regsub -nocase "%OWNER\{$BOOM\}" $line [bMotionMakePossessive $BOOM] line 
    2723                regsub -all "\\\\" $line "" line 
    28                 if {$line == $previous_line} { 
    29                         putlog "bMotion: ALERT! looping too much in %OWNER code with $line (no change since last parse)" 
    30                         set line "" 
    31                         break 
    32                 } 
    33                 set previous_line $line 
    3424        } 
    3525        return $line 
Note: See TracChangeset for help on using the changeset viewer.