From b3d361abe62659d18e3fa9a1d3156482ea97a922 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Mon, 4 Sep 2000 14:15:52 +0000 Subject: [PATCH] Throw away password-based userdb stuff. Organization: Straylight/Edgeware From: Ian Jackson --- bot.tcl | 67 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 66 deletions(-) diff --git a/bot.tcl b/bot.tcl index 8d8d0c2..bef0ead 100755 --- a/bot.tcl +++ b/bot.tcl @@ -449,73 +449,8 @@ def_ucmd summon { } } -proc userdb_exists {n} { - - binary scan [irctolower $n] H* nhex - return [file exists users/$nhex] -} - proc md5sum {value} { exec md5sum << $value } -# proc userdb_store {n args} { } - -def_ucmd newuser { - global ownmailaddr ownfullname nick globalsecret - prefix_nick - if {[ischan $dest]} { - error "You must register privately." - } - if {[userdb_exists $n]} { - error "You (or someone else) have already registered the nick $n." - } - set ownermail [ta_word] - - set now [clock seconds] - set small 100000 - set mult 6 - set ksecs [expr {$now / $small}] - set kmod [expr {$ksecs % $mult}] - - if {[string length $text]} { - if {![regexp -nocase {^([0-5])[0-9a-f]+\s+(.*)$} $text pass_sup kmod text]} { - error ... - } - set ksecs [expr {(($ksecs - $kmod) / $mult) * 6 + $kmod}] - } - set hash [md5sum "$ksecs\n$ownermail\n"] - set passwd "$kmod[string range $hash 0 15]" - - if {[info exists pass_sup]} { - if {"$passwd" != "$pass_sup"} { - error "Incorrect registration password." - } - userdb_store $n \ - - sendaction $n "ignores your ok" - } else { - set mailmsg \ -"From: $ownmailaddr ($ownfullname) -Subject: $nick registration -To: $ownermail - -Thanks for starting the registration process. You must now issue the -`newuser' command with both the same email address again, and your -registration password from this mail. - -Nick: $n -Email address: $ownermail -Password: $passwd - -This password will be valid for approximately the next 600ks -(or until I am restarted). - -For example, - /msg $nick newuser $ownermail $passwd" - exec /usr/sbin/sendmail -odi -oee -oi -t << $mailmsg - sendaction $n "has sent your registration mail to $ownermail." - } -} - def_ucmd seen { global lastseen nick prefix_nick @@ -554,7 +489,7 @@ if {![info exists sock]} { #fconfigure $sock -translation binary fconfigure $sock -translation crlf - sendout USER guest 0 * $ownfullname + sendout USER blight 0 * $ownfullname sendout NICK $nick fileevent $sock readable onread } -- [mdw]