Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → [EN] The Source Code → how to make automatic spoof check

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 10

1

Topic: how to make automatic spoof check

if someone join a room, it will automatic whisper to owner "sc"
could you show me the code ?

Thx

2

Re: how to make automatic spoof check

Jimmy_Aquarius wrote:

if someone join a room, it will automatic whisper to owner "sc"
could you show me the code ?

Thx

static int _handle_spoofc_command(t_connection * c, char const *text)
{
  unsigned int i;
  t_connection *    user;
  t_game     *    game;
 
  char const texe[4]=" sc";
  for (i=0; text[i]!=' ' && text[i]!='\0'; i++); /* skip command */
  for (; text[i]==' '; i++);

    if ((game=conn_get_game(c))&&(user = game_get_owner(game)))
    {
    snprintf(msgtemp, sizeof(msgtemp), "%.64s",conn_get_username(user));
    //snprintf(msgtemp2, sizeof(msgtemp2), "%.64s",&texe[4]);
    do_whisper(c,msgtemp,"sc");
    return 0;
    }
     else if(!(game=conn_get_game(c)))
    {
     message_send_text(c,message_type_error,c,"Only in lobby game!");
    return 0;
    }
    else
    {
    message_send_text(c,message_type_error,c,"Error: you're in the game,but host not found.");
    return 0;
    }

  return 0;
}

3

Re: how to make automatic spoof check

Zeloit wrote:
Jimmy_Aquarius wrote:

if someone join a room, it will automatic whisper to owner "sc"
could you show me the code ?

Thx

static int _handle_spoofc_command(t_connection * c, char const *text)
{
  unsigned int i;
  t_connection *    user;
  t_game     *    game;
 
  char const texe[4]=" sc";
  for (i=0; text[i]!=' ' && text[i]!='\0'; i++); /* skip command */
  for (; text[i]==' '; i++);

    if ((game=conn_get_game(c))&&(user = game_get_owner(game)))
    {
    snprintf(msgtemp, sizeof(msgtemp), "%.64s",conn_get_username(user));
    //snprintf(msgtemp2, sizeof(msgtemp2), "%.64s",&texe[4]);
    do_whisper(c,msgtemp,"sc");
    return 0;
    }
     else if(!(game=conn_get_game(c)))
    {
     message_send_text(c,message_type_error,c,"Only in lobby game!");
    return 0;
    }
    else
    {
    message_send_text(c,message_type_error,c,"Error: you're in the game,but host not found.");
    return 0;
    }

  return 0;
}

it is not automatically spoof check
it must type /sc

right ?

4

Re: how to make automatic spoof check

ya

automatic spoofcheck?
/sc to automatic spoof to your bot

what is the problem ?

Added: 07.01.2013 19:23

you want to automatic spoof to owner bot ?

i know,, you can editing your code Ghost++

if owner joining to room, /sc automatic from bot

5

Re: how to make automatic spoof check

Zeloit wrote:

ya

automatic spoofcheck?
/sc to automatic spoof to your bot

what is the problem ?

Added: 07.01.2013 19:23

you want to automatic spoof to owner bot ?

i know,, you can editing your code Ghost++

if owner joining to room, /sc automatic from bot

i mean
if someone join a room
it will automatically type /sc

6

Re: how to make automatic spoof check

that's right...

you have editing code on Ghost++ not from pvpgn, because contact bot room

7

Re: how to make automatic spoof check

Zeloit wrote:

that's right...

you have editing code on Ghost++ not from pvpgn, because contact bot room

but
when i am on revogamers
it will automatically whisp "sc" to owner

even it is non bot room

8

Re: how to make automatic spoof check

Jimmy_Aquarius wrote:
Zeloit wrote:

that's right...

you have editing code on Ghost++ not from pvpgn, because contact bot room

but
when i am on revogamers
it will automatically whisp "sc" to owner

even it is non bot room

i don't know...
because different concepts

tongue

9 (edited by Cub_bone 06.03.2014 12:08)

Re: how to make automatic spoof check

simplest  auto spoofcheck:

Insert     message_send_text(game->owner, message_type_whisper, c, "s"); in game.cpp -> game_add_player , before return 0;

10 (edited by vallcerealz 19.06.2015 16:34)

Re: how to make automatic spoof check

how do I compile?
i get error compile :

1>------ Build started: Project: bnetd, Configuration: Debug Win32 ------
1>  command.cpp
1>..\..\..\source\src\bnetd\command.cpp(4960): error C2446: '!=' : no conversion from 'int' to 'const char *'
1>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\..\source\src\bnetd\command.cpp(4960): error C2040: '!=' : 'const char *' differs in levels of indirection from 'int'
1>..\..\..\source\src\bnetd\command.cpp(4961): error C2446: '==' : no conversion from 'int' to 'const char *'
1>          Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
1>..\..\..\source\src\bnetd\command.cpp(4961): error C2040: '==' : 'const char *' differs in levels of indirection from 'int'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Note : Use Visual C++ 2010 and (PvPGN Magic Builder v1.66)

Posts: 10

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 1 guest, 0 registered users

forums.pvpgn.pro → [EN] The Source Code → how to make automatic spoof check



Generated in 0.114 seconds (78% PHP - 22% DB) with 20 queries