my( $mail ) = @_;
$hasAuth->execute( $mail );
if( my( $id ) = $hasAuth->fetchrow_array ) {
- tlog( "mailbot: Active user ($mail) id: $nid" );
+ tlog( "mailbot: Active user ($mail) id: $id" );
return $id;
} else {
tlog( "mailbot: Creating user $mail" );
tlog( "mailbot: History created $hid $id ".logEscape( $name )." ".logEscape( $description )." ".logEscape( $text ) );
notify( $tables, $id, $hid, $created ? 2 : 1, $created ? 0 : 1 );
if( !$tables->notifExists( $author, $id ) ) {
- $tables->submitNotification( $author, $id, { 'recursive' => 0, 'notification' => 1, 'way' => 0 } );
+ $tables->submitNotification( $author, $id, { 'recursive' => 0, 'notification' => 0, 'way' => 0 } );
}
}
$author = $reply_plain;
}
-$tprefix = "tmp/mbot-$$";
-$home = "~/";
-mkdir("tmp", 0777);
+$home = "$ENV{HOME}/";
+$tprefix = "${home}tmp/mbot-$$";
+mkdir("${home}tmp", 0777);
mkdir($tprefix, 0777) || error("Cannot create tmpdir");
chdir($tprefix) || error("Cannot chdir to tmpdir");