/[tcldrop]/tcldrop/modules/users/users_arraydb.tcl
ViewVC logotype

Diff of /tcldrop/modules/users/users_arraydb.tcl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by fireegl, Sun May 18 08:10:51 2003 UTC revision 1.2 by fireegl, Tue May 20 13:22:32 2003 UTC
# Line 61  proc ::tcldrop::users::arraydb::finduser Line 61  proc ::tcldrop::users::arraydb::finduser
61    
62  # Checks $handle for $flags, $channel is optional.  # Checks $handle for $flags, $channel is optional.
63  proc ::tcldrop::users::arraydb::matchattr {handle flags {channel {}}} {  proc ::tcldrop::users::arraydb::matchattr {handle flags {channel {}}} {
64          if {![validuser $handle]} {          switch -- $flags {
65                  return 0                  {+|+} - {*|*} - {+} - {*} {
66          } else {                          # * or + means anybody, return 1.
67                  switch -- $flags {                          return 1
68                          {-} - {-|-} - {*} - {*|*} - {|} - {+} - {} { return 1 }                  }
69                          {default} {                  {default} {
70                                  if {[::tcldrop::CheckFlags [lindex [split $flags {|}] 0] [getuser $handle flags]] == 1} {                          if {![validuser $handle]} {
71                                          # Return 1 since we matched one of their global flags.                                  return 0
72                                          return 1                          } elseif {[::tcldrop::CheckFlags [lindex [split $flags {|}] 0] [getuser $handle flags]] == 1} {
73                                  } elseif {$channel != {} && [::tcldrop::CheckFlags [lindex [split $flags {|}] end] [getuser $handle flags $channel]] == 1} {                                  # Return 1 since we matched one of their global flags.
74                                          # Return 1 since we matched one of their channel flags.                                  return 1
75                                          return 1                          } elseif {$channel != {} && [::tcldrop::CheckFlags [lindex [split $flags {|}] end] [getuser $handle flags $channel]] == 1} {
76                                  } else {                                  # Return 1 since we matched one of their channel flags.
77                                          # Return 0 since there was no match.                                  return 1
78                                          return 0                          } else {
79                                  }                                  # Return 0 since there was no match.
80                                    return 0
81                          }                          }
82                  }                  }
83          }          }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26