Block/Unblock Friend Request Command [ UberEMU ]

Status
Not open for further replies.

LethalEdward

Member
Sep 2, 2010
119
22
Hello DevBest Members,

This is my second release.

It basically does is allows people to block and unblock friend requests using the command :blockfriends

Find
Code:
                    case "empty":

                        Session.GetHabbo().GetInventoryComponent().ClearItems();

                        return true;

And Add This Under it:
Code:
                    // Block/Unblock Friend Requests
                    // Codeded by -ClaNHabbo- (Edward)
                    // 100% Working

                    case "blockfriends":
                        using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
                            if (Session.GetHabbo().BlockNewFriends)
                            {
                                dbClient.ExecuteQuery("UPDATE users SET block_newfriends = '0' WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1");
                                Session.GetHabbo().BlockNewFriends = false;
                                Session.SendNotif("Friend Request Unblocked.");
                            }
                            else
                            {
                                dbClient.ExecuteQuery("UPDATE users SET block_newfriends = '1' WHERE id = '" + Session.GetHabbo().Id + "' LIMIT 1");
                                Session.GetHabbo().BlockNewFriends = true;
                                Session.SendNotif("Friend Request Blocked.");
                            }
                        return true;


Credits : ME and Only ME!!!!!

IF YOU DON'T LIKE IT, THEN DON'T USE IT AND FOR SURE DON'T REPLY!!!

Thank Me Down here if you liked it :D.

Regards
Edward
 

Kieren

The OGz
Aug 4, 2010
2,957
752
It can be very annoying geting friend requests from users espeacily when your staff and you don't want users annoying you people will really thank you for this great job lets see some more coming from you :)
 
Status
Not open for further replies.

Users who are viewing this thread

Top