This site has been archived and made available for preservation purposes. No edits can be made.

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: OnClientAuthenticate

  1. #1

    Post OnClientAuthenticate

    Why name and pwd in OnClientAuthenticate always return different values with the same client name?
    How can i work with these variables?
    Last edited by Smoria; 09-09-2012 at 12:17 PM.

  2. #2

  3. #3
    I've read all Wiki pages before post this. It doesn't help.

  4. #4
    so what is your problem? "name" is the clients name and "pwd" the password

  5. #5
    I understand what is NAME and PWD means. Read my first message again and, please, try to think before answer.
    Last edited by Smoria; 09-09-2012 at 12:37 PM.

  6. #6
    first of all parameters cant return values, can they? second, name{} is always the clientname, pwd{} always the used password - i tested it, works. third "How can i work with these variables?" what do you want to achieve?

  7. #7
    I want to compare pwd to String variable
    in c++
    Last edited by Smoria; 09-09-2012 at 02:00 PM. Reason: c++

  8. #8
    Code c:
    public OnClientAuthenticate(const name {}, const pwd {})
    {
    if(strcmp(pwd,"text") != 0) return false;//Deny connection
    return true;
    }
    works fine for me

  9. #9
    It didn't work in c++

  10. #10
    Code cpp:
    State VAULTSCRIPT OnClientAuthenticate(String name, String pwd) noexcept
    {
    if(pwd.compare("text") != 0) return False;
    return True;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •