Joined: 14 Feb 2004 Posts: 195 Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Posted: Mon Apr 04, 2005 11:34 am Post subject:
Code:
if ($msg eq 'login') {<br /> $self->{callback} = 'login';<br /> $self->{calluser} = $user;<br /> $self->{login}->{part} = 1;<br /> $self->sendMessage("Please enter your username.");<br />}<br />else {<br /> if (exists $self->{callback}) {<br /> if ($self->{callback} eq 'login') {<br /> if ($user eq $self->{calluser}) {<br /> if ($self->{login}->{part} == 1) {<br /> $username = $msg;<br /> $self->{login}->{part} = 2;<br /> $self->sendMessage("Please enter your password.");<br /> }<br /> elsif ($self->{login}->{part} == 2) {<br /> $password = md5($msg);<br /> if (exists $users->{$username}) {<br /> if ($users->{$username}->{password} eq $password) {<br /> $session->{$email} = $username;<br /> $self->sendMessage("Thanks, you are now logged in as $username.");<br /> }<br /> else {<br /> $self->sendMessage("Sorry, wrong password.");<br /> delete $self->{callback};<br /> delete $self->{calluser};<br /> delete $self->{login};<br /> }<br /> }<br /> else {<br /> $self->sendMessage("Sorry, that user does not exist.");<br /> delete $self->{callback};<br /> delete $self->{calluser};<br /> delete $self->{login};<br /> }<br /> }<br /> }<br /> }<br /> }<br />}
Quote:
davidpk212 // So, in your opinion, what is the spookiest bit of Doctor Who? "The theme tune" says: !login chatterbox_beta@hotmail.com says: Please enter your username. chatterbox_beta@hotmail.com says: Please enter your username. davidpk212 // So, in your opinion, what is the spookiest bit of Doctor Who? "The theme tune" says: davidpk212 chatterbox_beta@hotmail.com says: Please enter your password. chatterbox_beta@hotmail.com says: Sorry, wrong password.
Any ideas? I think its to do with the the next part being set while we're busy testing stuff.
i cant see ANY reason why it would go through the first test twice, unless you've got problems out side and thats what im guess because its looks as if its going through the command twice....a foreach or something, problem with the brackets...
put it in its own scipt and see how it runs..hardcode the varibles....
Joined: 14 Feb 2004 Posts: 195 Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Posted: Wed Apr 06, 2005 2:50 pm Post subject:
QUOTE(Dazzy @ Apr 4 2005, 02:49 PM)
i cant see ANY reason why it would go through the first test twice, unless you've got problems out side and thats what im guess because its looks as if its going through the command twice....a foreach or something, problem with the brackets...
put it in its own scipt and see how it runs..hardcode the varibles.... [right][snapback]47510[/snapback][/right]
Nope... before this I added a !add mod command... didn't get all messages twice...