User Control Panel
Advertisements

HELP US, HELP YOU!

Login with Callback

 
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl
View unanswered posts
Author Message
davidk
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 195
Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Mon Apr 04, 2005 11:34 am    Post subject: Reply with quote

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.
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Mon Apr 04, 2005 1:49 pm    Post subject: Reply with quote

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....
Back to top
Rob.Oggie
Newbie
Newbie


Joined: 21 Dec 2004
Posts: 9

Reputation: 16.9Reputation: 16.9

PostPosted: Mon Apr 04, 2005 2:54 pm    Post subject: Reply with quote

what msn verson u useing they might be it
Back to top
davidk
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 195
Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Wed Apr 06, 2005 2:50 pm    Post subject: Reply with quote

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...
Back to top
Dazzy
Agent
Agent


Joined: 09 Jan 2004
Posts: 1731

Reputation: 72.3

PostPosted: Wed Apr 06, 2005 3:33 pm    Post subject: Reply with quote

Put some prints in, check the values arre as you expected.....Thats always a good sign...
Back to top
davidk
Senior Member
Senior Member


Joined: 14 Feb 2004
Posts: 195
Location: United Kingdom, Europe, Earth, Solar system, The Milky Way, The Universe, the 3rd Dimension.
Reputation: 31.1Reputation: 31.1Reputation: 31.1

PostPosted: Thu Apr 07, 2005 3:32 pm    Post subject: Reply with quote

Although when it was printed it didn't look like this, I have split it up with a | and an enter between the log and the command

This is the structure:
Quote:
value of $self->{callback}|value of $self->{login}->{part}|message before wrong password|message after wrong password.
log

This is the output:
Quote:
login|2|davidpk212|davidpk212
~ guest:
         + davidpk212
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Bot Depot Forum Index -> Perl All times are GMT
Page 1 of 1

 



Protected by phpBB Security phpBB-TweakS
phpBB Security Has Blocked 9 Exploit Attempts.
Antispam Captcha Mod by phpbb-security.com
Powered by phpBB © 2001, 2005 phpBB Group