ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/login.ext
(Generate patch)

Comparing deliantra/server/ext/login.ext (file contents):
Revision 1.131 by root, Mon Nov 19 01:13:49 2012 UTC vs.
Revision 1.136 by root, Sun Nov 18 15:19:48 2018 UTC

24 $ns->query ($flags, $text, Coro::rouse_cb); 24 $ns->query ($flags, $text, Coro::rouse_cb);
25 Coro::rouse_wait 25 Coro::rouse_wait
26} 26}
27 27
28sub can_cleanup { 28sub can_cleanup {
29 # highscore list is not cleared out, rethink
30 # also, admin accounts can be hacked this way, if unused for long.
31 return 0;
32
29 my ($pl, $mtime) = @_; 33 my ($pl, $mtime) = @_;
30 34
31 my $age = time - $mtime; 35 my $age = time - $mtime;
32 my $level = $pl->ob->level; 36 my $level = $pl->ob->level;
33 37
137 if ($token =~ /!!(.*)/) { 141 if ($token =~ /!!(.*)/) {
138 return +(substr $pass, 0, 8) eq pack "H*", $1; 142 return +(substr $pass, 0, 8) eq pack "H*", $1;
139 } elsif ($token =~ /!(.*)/) { 143 } elsif ($token =~ /!(.*)/) {
140 return $pass eq pack "H*", $1; 144 return $pass eq pack "H*", $1;
141 } else { 145 } else {
142 return $token eq crypt $pass, $token; 146 return $token eq encode_password $pass;
143 } 147 }
144} 148}
145 149
146# delete a player directory 150# delete a player directory
147sub nuke_playerdir { 151sub nuke_playerdir {
196 } 200 }
197 201
198 Coro::Timer::sleep 0.05; 202 Coro::Timer::sleep 0.05;
199 } 203 }
200 204
201 $ob->set_animation (2); 205 $ob->set_anim_frame (2);
202 $ob->add_statbonus; 206 $ob->add_statbonus;
203 207
204 $pl->{chargen} = "race"; 208 $pl->{chargen} = "race";
205 } 209 }
206 210
247 # XXX: Workaround for delayed client ext protocol handshake 251 # XXX: Workaround for delayed client ext protocol handshake
248 $pl->esrv_new_player; 252 $pl->esrv_new_player;
249 253
250 $pl->{chargen} = "done"; 254 $pl->{chargen} = "done";
251 } 255 }
256
257 $ns->update_command_faces;
252 258
253 $ob->reply (undef, "Welcome to Deliantra!"); 259 $ob->reply (undef, "Welcome to Deliantra!");
254 260
255 if (0 < Coro::AIO::aio_load "$cf::CONFDIR/motd", my $motd) { 261 if (0 < Coro::AIO::aio_load "$cf::CONFDIR/motd", my $motd) {
256 $pl->ns->send_msg ("c/motd" => $motd, cf::NDI_CLEAR); 262 $pl->ns->send_msg ("c/motd" => $motd, cf::NDI_CLEAR);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines