/[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.7 by fireegl, Mon Jun 30 06:25:05 2003 UTC revision 1.8 by fireegl, Fri Nov 14 00:08:46 2003 UTC
# Line 65  proc ::tcldrop::users::arraydb::finduser Line 65  proc ::tcldrop::users::arraydb::finduser
65    
66  # Checks $handle for $flags, $channel is optional.  # Checks $handle for $flags, $channel is optional.
67  proc ::tcldrop::users::arraydb::matchattr {handle flags {channel {}}} {  proc ::tcldrop::users::arraydb::matchattr {handle flags {channel {}}} {
68          switch -- $flags {          switch -exact -- $flags {
69                  {+|+} - {*|*} - {+} - {*} {                  {*} - {+} - {*|*} - {+|+} {
70                          # * or + means anybody, return 1.                          # * or + means anybody, return 1.
71                          return 1                          return 1
72                  }                  }
# Line 351  proc ::tcldrop::users::arraydb::adduser Line 351  proc ::tcldrop::users::arraydb::adduser
351  proc ::tcldrop::users::arraydb::addbot {handle {address {}} {hostmask {}}} {  proc ::tcldrop::users::arraydb::addbot {handle {address {}} {hostmask {}}} {
352          if {![validuser $handle]} {          if {![validuser $handle]} {
353                  setuser $handle                  setuser $handle
354                  setuser $lowerhandle hosts $hostmask                  setuser $handle hosts $hostmask
355                  set addr [lindex [split $address :] 0]                  set addr [lindex [split $address :] 0]
356                  set botport [lindex [split $address :/] 1                  set botport [lindex [split $address :/] 1]
357                  set userport [lindex [split $address /] end]                  set userport [lindex [split $address /] end]
358                  setuser $lowerhandle botaddr [list $addr $botport $userport]                  chattr $handle +b
359                    setuser $handle botaddr [list $addr $botport $userport]
360                  return 1                  return 1
361          } else {          } else {
362                  return 0                  return 0
# Line 426  proc ::tcldrop::users::arraydb::haschanr Line 427  proc ::tcldrop::users::arraydb::haschanr
427          }          }
428  }  }
429    
 # Encrypts $password:  
 # Note, most of the comments in this proc are by Papillon@EFNet.  
 proc ::tcldrop::users::arraydb::encpass {password} {  
         # FixMe: This should return the password as a crypt.  
         # Well here we have several possible solutions, we can load the base64 lib, or we can source  
         # the md5.tcl file .... or we have to make a blowfish module ;) --- Papillon  
         # With base64 encoding we can decode it later if wanted  
         # set password [::base64::encode -maxlen 53 -wrapchar j $password]  
         # with md5 we can't decode it.. but then again.. anyone else will have a hard time decoding it aswell ;)  
         # set password [::md5::hmac $password $password]  
         return $password  
 }  
430    
431  # Saves the user database to the hard disk:  # Saves the user database to the hard disk:
432  # The default is to write it in the background (nonblocking).  # The default is to write it in the background (nonblocking).

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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