Chat space limitation!/Scammer avoid *Will pay for help*

  • Thread starter Thread starter Aurela
  • Start date Start date
A

Aurela

Guest
Hello, c;

I need a limitation for spaces in chat.

For example:

Name : Hello my   name   is   l   l   l   l

You're only allowed to do max 3 spaces in a row. 

If anyone would be able to help me out I'd be very happy.

Also, I will pay for this if needed.

 
Last edited:
willingly to pay ? omg, I can send this as a birthday gift

patch

Code:
 src/map/clif.c | 5 +++++ 1 file changed, 5 insertions(+)diff --git a/src/map/clif.c b/src/map/clif.cindex d9acf07..ede1a52 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -9110,6 +9110,11 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, 	*namelen_ = namelen; 	*message_ = message; 	*messagelen_ = messagelen;++	if ( stristr( message, "    " ) != NULL ) {+		clif_displaymessage( fd, "You're only allowed to do max 3 spaces in a row." );+		return false;+	} 	return true; }
plugin
Code:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../map/pc.h"#include "../map/clif.h"#include "../common/HPMi.h"#include "../common/socket.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = {	"max_3_space",	// Plugin name	SERVER_TYPE_MAP,// Which server types this plugin works with?	"0.1",			// Plugin version	HPM_VERSION,	// HPM Version (don't change, macro is automatically updated)};bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {	if ( retVal == true ) {		if ( stristr( (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3, "    " ) != NULL ) {			clif->message( sd->fd, "You're only allowed to do max 3 spaces in a row." );			return false;		}	}	return true;}HPExport void plugin_init (void) {	clif = GET_SYMBOL("clif");	session = GET_SYMBOL("session");	strlib = GET_SYMBOL("strlib");	addHookPost("clif->process_message", clif_process_message_spaces);}
 
Awesome, thank you so much! Will try that as soon as I can and update if something does not work proper! -hugs- ♥

 
Its working and i know why you want this because of the people who are trying to scam by using spaces on pub.

They can still bypass this by using 2space+alt03232 again and again.

 
Last edited by a moderator:
because of the people who are trying to scam by using spaces on pub.
oh ? I thought I write this for fun without knowing what this actually does#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../map/pc.h"#include "../map/clif.h"#include "../common/HPMi.h"#include "../common/socket.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = { "max_3_space", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)};bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) { if ( retVal == true ) { char* message = (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3; if ( stristr( message, " " ) != NULL ) { clif->message( sd->fd, "Alt+03232 ? You must be joking, right ? Don't do that !" ); return false; } if ( stristr( message, " " ) != NULL ) { clif->message( sd->fd, "You're only allowed to do max 3 spaces in a row." ); return false; } } return true;}HPExport void plugin_init (void) { clif = GET_SYMBOL("clif"); session = GET_SYMBOL("session"); strlib = GET_SYMBOL("strlib"); addHookPost("clif->process_message", clif_process_message_spaces);}ok this is tricky
Code:
if ( stristr( message, " " ) != NULL ) {
this is not a spaceI Alt+03232 it

and Notepad++ doesn't work

has to use Windows Notepad, and manually type in Alt+03232 only works

hmm ... I upload the file then

max_3_space.c

screenHercules021.jpg

 

Attachments

Last edited by a moderator:
Weird because i can still use alt+03232 i notepad as u said but its tillworking.

 
@Lumina

like I said, don't use Notepad++, manually type in Microsoft Windows Notepad

classic one

although,

I got a better idea

since in a chatroom, to impersonate other has to type long sentence and then [space] then follow by

Name :

how about we restrict them by not typing like this

if ( sscanf( "%s : ", sd->name ) )

so if they type something like

"EnnyRuru : "

the script will detect it and stop it


just for my personal reference ...

getwaitingroomlist

pc_getwaitingroomlist

 
Last edited by a moderator:
i did use windows notepad
default_biggrin.png
but when u transfer it to linux vps it will not work anymore hehe..

Maybe you can do that.

well this 3max space will help alot for sure.

 
@Lumina

like I said, don't use Notepad++, manually type in Microsoft Windows Notepad

classic one

although,

I got a better idea

since in a chatroom, to impersonate other has to type long sentence and then [space] then follow by

Name :

how about we restrict them by not typing like this

if ( sscanf( "%s : ", sd->name ) )

so if they type something like

"EnnyRuru : "

the script will detect it and stop it


just for my personal reference ...

getwaitingroomlist

pc_getwaitingroomlist
that idea is nice

 
try this

patch

Code:
 src/map/clif.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)diff --git a/src/map/clif.c b/src/map/clif.cindex d9acf07..42790b9 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -9110,6 +9110,20 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, 	*namelen_ = namelen; 	*message_ = message; 	*messagelen_ = messagelen;++	if ( sd->chatID ) {+		if ( stristr( message, ":" ) ) {+			struct chat_data *cd = (struct chat_data *)map->id2bl(sd->chatID);+			int i;+			for ( i = 0; i < cd->users; i++ ) {+				if ( stristr( message, cd->usersd[i]->status.name ) ) {+					clif->colormes( fd, COLOR_RED, "You can't impersonate others in a chatroom !" );+					return false; +				}+			}+		}+	}+ 	return true; }
plugin
Code:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../map/pc.h"#include "../map/clif.h"#include "../map/chat.h"#include "../common/HPMi.h"#include "../common/socket.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = {	"chatroom_impersonate",	// Plugin name	SERVER_TYPE_MAP,// Which server types this plugin works with?	"0.1",			// Plugin version	HPM_VERSION,	// HPM Version (don't change, macro is automatically updated)};bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {	if ( retVal == true && sd->chatID ) {		char* message = (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3;		if ( stristr( message, ":" ) ) {			struct chat_data *cd = (struct chat_data *)map->id2bl(sd->chatID);			int i;			for ( i = 0; i < cd->users; i++ ) {				if ( stristr( message, cd->usersd[i]->status.name ) ) {					clif->colormes( sd->fd, COLOR_RED, "You can't impersonate others in a chatroom !" );					return false; 				}			}		}	}	return true;}HPExport void plugin_init (void) {	map = GET_SYMBOL("map");	clif = GET_SYMBOL("clif");	session = GET_SYMBOL("session");	strlib = GET_SYMBOL("strlib");	addHookPost("clif->process_message", clif_process_message_spaces);}
 
Last edited by a moderator:
try this

patch

src/map/clif.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)diff --git a/src/map/clif.c b/src/map/clif.cindex d9acf07..42790b9 100644--- a/src/map/clif.c+++ b/src/map/clif.c@@ -9110,6 +9110,20 @@ bool clif_process_message(struct map_session_data *sd, int format, char **name_, *namelen_ = namelen; *message_ = message; *messagelen_ = messagelen;++ if ( sd->chatID ) {+ if ( stristr( message, ":" ) ) {+ struct chat_data *cd = (struct chat_data *)map->id2bl(sd->chatID);+ int i;+ for ( i = 0; i < cd->users; i++ ) {+ if ( stristr( message, cd->usersd->status.name ) ) {+ clif->colormes( fd, COLOR_RED, "You can't impersonate others in a chatroom !" );+ return false; + }+ }+ }+ }+ return true; } plugin
Code:
#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../map/pc.h"#include "../map/clif.h"#include "../map/chat.h"#include "../common/HPMi.h"#include "../common/socket.h"#include "../common/HPMDataCheck.h" // should always be the last file included! (if you don't make it last, it'll intentionally break compile time)HPExport struct hplugin_info pinfo = {	"chatroom_impersonate",	// Plugin name	SERVER_TYPE_MAP,// Which server types this plugin works with?	"0.1",			// Plugin version	HPM_VERSION,	// HPM Version (don't change, macro is automatically updated)};bool clif_process_message_spaces( int retVal, struct map_session_data *sd, int format, char **name_, size_t *namelen_, char **message_, size_t *messagelen_) {	if ( retVal == true && sd->chatID ) {		char* message = (char*)RFIFOP( sd->fd ,4) + strnlen(sd->status.name, NAME_LENGTH-1) + 3;		if ( stristr( message, ":" ) ) {			struct chat_data *cd = (struct chat_data *)map->id2bl(sd->chatID);			int i;			for ( i = 0; i < cd->users; i++ ) {				if ( stristr( message, cd->usersd[i]->status.name ) ) {					clif->colormes( sd->fd, COLOR_RED, "You can't impersonate others in a chatroom !" );					return false; 				}			}		}	}	return true;}HPExport void plugin_init (void) {	map = GET_SYMBOL("map");	clif = GET_SYMBOL("clif");	session = GET_SYMBOL("session");	strlib = GET_SYMBOL("strlib");	addHookPost("clif->process_message", clif_process_message_spaces);}

Not working AnnieRuru.

 
Woah, didn't knew about the '2space+alt03232' bypass. 

Hope that AnnieRuru's idea will work and that we'll have a fix soon for this (if AnnieRuru's is really "not working"), since that guy does not stop scamming players and also blackmails them. :l 

 
Last edited:
*ahem* ...

please test it and tell if it works =/

because I tested it working fine in my test server ....

unless you guys found some other way to bypass this

 
Apparantly it does not work if no one else is in the chatroom and also for example: 

If me and Frost are in the chat room and I try impersonate Frost, it won't work. But if AnnieRuru was online but not in the chat room, I could impersonate AnnieRuru.

If that makes sense.

 
But if AnnieRuru was online but not in the chat room, I could impersonate AnnieRuru.
wait, I thought its common sense that players only try to impersonate other players that are currently in the chat roomif AnnieRuru is not in the chatroom, of course can impersonate, but players should know that she is not in the chatroom so its busted, isn't it ?

because at the right hand side of the chatroom, it list the players currently inside

are you saying so I should run a loop for all online players instead of just players joined the chat room ?

 
Last edited by a moderator:
For example:

qprkrxb3.jpg


The scammer creates a novice or already scammed another existing char and PM's someone with that char, saying that he's one of the admins and on his legit char.

He tells him that the GM team wants to talk to him cause the team thinks that he/she would be a good GM too. 

The scammer lures them into another town and opens a chatroom with his scammed char. If the person he talked to entered the room he starts doing this on the picture.

As you see "a gm is talking" even tho that GM is not in the chatroom. But 90% of the people don't get this trick. I had to look at it a few times too. 

He does that with serveral names and keeps confusing the player, then he gets the information he wants (account and such) and wants them to add them on skype to pay for their account, if the player wants his account back. 

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Video Example

To your question: Most people dun take care of the player on the right side in that situation, it's unbelieveable but true.
 
Last edited:
Hmm, I remember that one. That's indeed a nice idea. But I'm at loss how to implement such a check for every char name used, unless going through all the chars for each message, and it'll kill the messaging. Btw, such trick also works for normal chat window if you leave it at default size, aka pretend you're getting PMs from GM.

 
Back
Top