Rank permissions messed up [Query]

leoooooooo

New Member
Feb 25, 2014
16
1
So after some weird thing that went on in my database, I accidentally deleted ranks 1 & 2 from rank_permissions so I added two new columns on rank_permissions
Now, keep in mind ranks table still had 1-7
I just changed all permissions to 0, from 1-7 after adding ranks 1 & 2.
After that, everything went down hill. Now when I try to put 1's on every permissions for rank 7, I go on as it and I get NONE of the commands.
I'm guessing ranks and permissions tables are messed up.
If I delete them, and I add in a query to get the tables back, would it mess anything up?
If so, what would be the query? Thanks.
 

JayC

Always Learning
Aug 8, 2013
5,494
1,398
Actually you could probably just delete column 1 and 2, redo them , update_permissions and restart the emulator and it should work :)
 

Vitix

Member
Jan 19, 2013
69
19
Did you update everything when the EMU was up? That probably did something to it, had the same problem. If you made a back up in the DB, use it lmao.
 

Spoderman

y u do dis 2 me
Jun 30, 2013
209
37
Didn't really understand what you're saying but seems like you messed up ranks/permissions?
Run this query.

Code:
DROP TABLE IF EXISTS `ranks`;
CREATE TABLE `ranks` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `badgeid` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

INSERT INTO `ranks` VALUES ('1', 'User', null);
INSERT INTO `ranks` VALUES ('2', 'VIP', 'VIP');
INSERT INTO `ranks` VALUES ('3', 'Silver Hobba', 'NWB');
INSERT INTO `ranks` VALUES ('4', 'Gold Hobba', 'HBA');
INSERT INTO `ranks` VALUES ('5', 'Super Hobba', 'HBA');
INSERT INTO `ranks` VALUES ('6', 'Moderator', 'ADM');
INSERT INTO `ranks` VALUES ('7', 'Administrator', 'ADM');

DROP TABLE IF EXISTS `permissions_ranks`;
CREATE TABLE `permissions_ranks` (
  `rank` int(1) unsigned NOT NULL,
  `cmd_update_permissions` enum('1','0') NOT NULL,
  `cmd_update_settings` enum('1','0') NOT NULL,
  `cmd_update_bots` enum('1','0') NOT NULL,
  `cmd_update_catalogue` enum('1','0') NOT NULL,
  `cmd_update_navigator` enum('1','0') NOT NULL,
  `cmd_update_items` enum('1','0') NOT NULL,
  `cmd_award` enum('1','0') NOT NULL,
  `cmd_coords` enum('1','0') NOT NULL,
  `cmd_override` enum('1','0') NOT NULL,
  `cmd_coins` enum('1','0') NOT NULL,
  `cmd_pixels` enum('1','0') NOT NULL,
  `cmd_ha` enum('1','0') NOT NULL,
  `cmd_hal` enum('1','0') NOT NULL,
  `cmd_freeze` enum('1','0') NOT NULL,
  `cmd_enable` enum('1','0') NOT NULL,
  `cmd_roommute` enum('1','0') NOT NULL,
  `cmd_setspeed` enum('1','0') NOT NULL,
  `cmd_masscredits` enum('1','0') NOT NULL,
  `cmd_globalcredits` enum('1','0') NOT NULL,
  `cmd_roombadge` enum('1','0') NOT NULL,
  `cmd_massbadge` enum('1','0') NOT NULL,
  `cmd_userinfo` enum('1','0') NOT NULL,
  `cmd_shutdown` enum('1','0') NOT NULL,
  `cmd_givebadge` enum('1','0') NOT NULL,
  `cmd_invisible` enum('1','0') NOT NULL,
  `cmd_ban` enum('1','0') NOT NULL,
  `cmd_superban` enum('1','0') NOT NULL,
  `cmd_roomkick` enum('1','0') NOT NULL,
  `cmd_roomalert` enum('1','0') NOT NULL,
  `cmd_mute` enum('1','0') NOT NULL,
  `cmd_unmute` enum('1','0') NOT NULL,
  `cmd_alert` enum('1','0') NOT NULL,
  `cmd_motd` enum('1','0') NOT NULL,
  `cmd_kick` enum('1','0') NOT NULL,
  `cmd_update_filter` enum('1','0') NOT NULL,
  `acc_anyroomrights` enum('1','0') NOT NULL,
  `acc_anyroomowner` enum('1','0') NOT NULL,
  `acc_supporttool` enum('1','0') NOT NULL,
  `acc_chatlogs` enum('1','0') NOT NULL,
  `acc_enter_fullrooms` enum('1','0') NOT NULL,
  `acc_enter_anyroom` enum('1','0') NOT NULL,
  `acc_restrictedrooms` enum('1','0') NOT NULL,
  `acc_unkickable` enum('1','0') NOT NULL,
  `acc_unbannable` enum('1','0') NOT NULL,
  `cmd_removebadge` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_summon` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_update_bans` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_masspixels` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_globalpixels` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_sa` enum('1','0') NOT NULL DEFAULT '0',
  `receive_sa` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_ipban` enum('1','0') NOT NULL DEFAULT '0',
  `floodtime` int(3) NOT NULL DEFAULT '30',
  `cmd_spull` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_disconnect` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_update_achievements` enum('1','0') NOT NULL DEFAULT '0',
  `ignore_friendsettings` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_update_texts` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_points` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_teleport` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_masspoints` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_globalpoints` enum('1','0') NOT NULL DEFAULT '0',
  `cmd_empty` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_sql` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_badge` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_effect` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_award` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_send` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_credits` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_pixels` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_points` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_rank` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_roomusers` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userhasachievement` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userhasbadge` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userhasvip` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userhaseffect` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userrank` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_usercredits` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userpixels` enum('1','0') NOT NULL DEFAULT '0',
  `wired_cnd_userpoints` enum('1','0') NOT NULL DEFAULT '0',
  `wired_give_dance` enum('0','1') NOT NULL DEFAULT '0',
  `wired_give_respect` enum('0','1') NOT NULL DEFAULT '0',
  `wired_give_handitem` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_userinfo_viewip` enum('0','1') NOT NULL DEFAULT '0',
  `wired_cnd_usergroups` enum('0','1') NOT NULL DEFAULT '0',
  `wired_cnd_wearing` enum('0','1') NOT NULL DEFAULT '0',
  `wired_cnd_carrying` enum('0','1') NOT NULL DEFAULT '0',
  `wired_give_alert` enum('0','1') NOT NULL DEFAULT '0',
  `ignore_roommute` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_dance` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_rave` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_roll` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_control` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_makesay` enum('0','1') NOT NULL DEFAULT '0',
  `cmd_sitdown` enum('0','1') NOT NULL DEFAULT '0',
  PRIMARY KEY (`rank`),
  UNIQUE KEY `rank` (`rank`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `permissions_ranks` VALUES ('1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '20', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('2', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '1', '0', '20', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('3', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '1', '1', '1', '0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '10', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('4', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1', '1', '1', '1', '1', '0', '1', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '5', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('5', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '1', '1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '1', '0', '1', '1', '1', '1', '1', '0', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1', '1', '0', '5', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('6', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '0', '0', '0', '1', '1', '1', '0', '1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '1', '1', '1', '5', '0', '0', '0', '1', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0');
INSERT INTO `permissions_ranks` VALUES ('7', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0');
 

Users who are viewing this thread

Top