-
Tiny Phoenix Addon - Help prevent scammers
Hey
Its been mentioned to me many times, that people scam on hotels then use "flagme" to change name and hard for hotel owners to trace the scammers because they have changed the user names,
I came up with this idea only a small idea but may help some people in the community
Database
Quote:
CREATE TABLE IF NOT EXISTS `flagme_logs` (
`old_username` varchar(100) DEFAULT NULL,
`new_username` varchar(100) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
In your class258 / ChangeUserNameMessageEvent.cs
Under this :
Quote:
class3.ExecuteQuery(string.Concat(new object[]
{
"UPDATE users SET username = '",
text,
"' WHERE id = '",
Session.GetHabbo().Id,
"' LIMIT 1"
}));
Add this
Quote:
using (DatabaseClient @class = Phoenix.GetDatabase().GetClient())
{
@class.AddParamWithValue("old_username", Session.GetHabbo().Username);
@class.AddParamWithValue("new_username", text);
@class.AddParamWithValue("user_id", Session.GetHabbo().Id);
@class.ExecuteQuery("INSERT INTO flagme_logs SET old_username = @old_username, new_username = @new_username, user_id = @user_id");
}
Now each time a user uses flagme, the old name, new name and most importantly the users ID is stored with the date and time on which they change username.
-
Re: Tiny Phoenix Addon - Help prevent scammers
You never cease to amaze me Johno! Thank you.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Erm as far as I know if you use :flagme command for phoenix it is stored in cmdlogs table?
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
Dann Marchelo
Erm as far as I know if you use :flagme command for phoenix it is stored in cmdlogs table?
Yes this is a little more informed for people having its own table they can add the feature into HK for staff to look this up.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
Johno
Yes this is a little more informed for people having its own table they can add the feature into HK for staff to look this up.
cmdlogs http://prntscr.com/714s1d and for HK you can code something like SELECT * FROM cmdlogs WHERE command = 'flagme'
-
Re: Tiny Phoenix Addon - Help prevent scammers
Something useful from G0D. Thanks for this!
Greetz,
-
Re: Tiny Phoenix Addon - Help prevent scammers
Makes everything simple, amazing.
-
Re: Tiny Phoenix Addon - Help prevent scammers
If you had a properly set up database with all the relations and constraints properly implemented, you wouldn't have any problem with people changing their username.
Also rooms should've been identified by the user id instead of the username as the user id should not change. Yes I know they did use the username for caching but this is certainly not how a proper database should've been implemented.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Nice little addon Johno, thanks!
-
Re: Tiny Phoenix Addon - Help prevent scammers
Don't use phoenix but thank you for the idea! :P
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
The General
If you had a properly set up database with all the relations and constraints properly implemented, you wouldn't have any problem with people changing their username.
Also rooms should've been identified by the user id instead of the username as the user id should not change. Yes I know they did use the username for caching but this is certainly not how a proper database should've been implemented.
It was a simple addon as people I host have asked me for a way log the name changes, I thought of this method as people can easy add a page to housekeeping so that people who do not have direct server access can still view the information if at the time owners are offline.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Also make sure to filter the variable 'text'. Either use regex ([a-zA-Z0-9]) to filter it or use the prepared statements as they are more secure. ^.^
-
Re: Tiny Phoenix Addon - Help prevent scammers
It seems a nice little addon cheers johno
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
The General
Also make sure to filter the variable 'text'. Either use regex ([a-zA-Z0-9]) to filter it or use the prepared statements as they are more secure. ^.^
I am sure the values are ready filtered as they are all ready included within the orginal phoenix, i simply added the method to save them to a table.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
Johno
I am sure the values are ready filtered as they are all ready included within the orginal phoenix, i simply added the method to save them to a table.
Better be safe than sorry :wink:
-
Re: Tiny Phoenix Addon - Help prevent scammers
This is very useful, good addon!
-
Re: Tiny Phoenix Addon - Help prevent scammers
Tiny Add-on yet very useful, Thanks for this
-
Re: Tiny Phoenix Addon - Help prevent scammers
Great add-on, now people might finally enable flagme for VIPs :D
-
Re: Tiny Phoenix Addon - Help prevent scammers
Looks nice!
You can maby make a :history username
So you can see ingame the name changes.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
maartenvn
Looks nice!
You can maby make a :history username
So you can see ingame the name changes.
Thanks for the idea, I will try something out later :)
-
Re: Tiny Phoenix Addon - Help prevent scammers
This is a great add-on & will be used by many for sure. Always best to log everything that goes on within your website & client.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Something very useful. Thank you!
Greetz,
Imaginary
-
Re: Tiny Phoenix Addon - Help prevent scammers
-
Re: Tiny Phoenix Addon - Help prevent scammers
Thanks for this, really awesome!
Hope to see more GTE/phoenix commands releases from you
-
Re: Tiny Phoenix Addon - Help prevent scammers
On the official Habbo Hotel they actually keep track of: who owned an item originally, who owned it since, and who currently owns it. This would fill up the database extensively quickly, but I thought it was really neat when I saw it. There are much simpler approaches I suppose.
-
Re: Tiny Phoenix Addon - Help prevent scammers
Yeh, This was actually my first try and coding an addon for phoenix, maybe something small but it may help some hotel owners, i am still learning more about phoenix and hope to release better more useful addons in the future.
-
Re: Tiny Phoenix Addon - Help prevent scammers
-
Re: Tiny Phoenix Addon - Help prevent scammers
If I don't want to make this, is it possible to disable flagme for everybody.
Great tutorial! Cheers
-
Re: Tiny Phoenix Addon - Help prevent scammers
Quote:
Originally Posted by
warm
If I don't want to make this, is it possible to disable flagme for everybody.
Great tutorial! Cheers
Yes on permissions_vip or permssions_ranks depending your using basic basic phx or goldtree