Thread: IMDB script bug
View Single Post
Old 07-30-2004, 05:56 AM  
daywalker
Junior Member
 
Join Date: Jul 2004
Posts: 1
Exclamation IMDB script bug

found a bug in imdb 2.3.3

if [channel info $chan] returns a list where the "+imdb" is not at the end of the list. the original code returns 0 instead of 1

Code:
proc channel_check { chan } {
  foreach setting [channel info $chan] {
    if {[regexp -- {^[\+-]} $setting]} {
      if {![string compare "+imdb" $setting]} {
        set permission 1
      } else {
        set permission 0
      }
    }
  }
  return $permission
}
you can fix with this function ...

Code:
proc channel_check { chan } {
  foreach setting [channel info $chan] {
    if {[regexp -- {^[\+-]} $setting]} {
      if {![string compare "+imdb" $setting]} { 
        return 1; 
      }
    }
  }
  return 0;
}
please fix it in the next version
daywalker is offline   Reply With Quote