Author Topic: basic server modification  (Read 2003 times)

net

  • PGP
  • Posts: 5
basic server modification
« 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?


ic3y

  • Committee Member
  • Autococker
  • Posts: 1398
Re: basic server modification
« Reply #1 on: April 22, 2009, 04:26:24 AM »
cvar_set sv_login 2 =)

net

  • PGP
  • Posts: 5
Re: basic server modification
« Reply #2 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

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: basic server modification
« Reply #3 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.

net

  • PGP
  • Posts: 5
Re: basic server modification
« Reply #4 on: April 22, 2009, 06:59:12 PM »
exactly what i needed.
thank you ViciouZ :)