Digital Paint Discussion Board

Paintball 2: The Game => Server Discussion => Topic started by: net on April 21, 2009, 10:26:58 PM

Title: basic server modification
Post by: net on April 21, 2009, 10:26:58 PM
hello i

i am looking to slightly modify my private servers executable to disallow the names newbie & noname. I would like to use a simple "if" statement but i am unsure how to call the userinfo string in SV_Begin_f. If at all possible could i get a hand with this?

the ??? is where im having the problem
Code: [Select]

   //net namecheck
      if ( ??? == "newbie" )
      {
            this section is done
      }else{
            this section is done
      }



thanks
- Net

**edit**
p.s. would SVC_DirectConnect be a better place to put this?

Title: Re: basic server modification
Post by: ic3y on April 22, 2009, 04:26:24 AM
cvar_set sv_login 2 =)
Title: Re: basic server modification
Post by: net on April 22, 2009, 07:41:55 AM
Its a basic lan server without internet access. We tend to screw around at work when things are slow. otherwise i would use the global login system
Title: Re: basic server modification
Post by: ViciouZ on April 22, 2009, 10:31:36 AM
Code: [Select]
if (Q_streq(sv_client->name, "newbie") || Q_streq(sv_client->name, "noname"))
{
     // piss off
}
else
{
     // welcome home
}
Haven't tested it.
Title: Re: basic server modification
Post by: net on April 22, 2009, 06:59:12 PM
exactly what i needed.
thank you ViciouZ :)