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
PvPGN Community Forums |
forums.pvpgn.pro → [EN] The Source Code → 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
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;
}
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 ?
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
ya
automatic spoofcheck?
/sc to automatic spoof to your botwhat 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
that's right...
you have editing code on Ghost++ not from pvpgn, because contact bot room
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
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 ownereven it is non bot room
i don't know...
because different concepts
simplest auto spoofcheck:
Insert message_send_text(game->owner, message_type_whisper, c, "s"); in game.cpp -> game_add_player , before return 0;
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)
forums.pvpgn.pro → [EN] The Source Code → how to make automatic spoof check