Commit Graph
100 Commits
Author SHA1 Message Date
Spp 7c36e3a298 Core/Misc: Minor optimizations (+ code changes to reduce differences with 4.3.4 branch) 2013-03-25 10:36:30 +01:00
Spp 4429830ed7 Core: More functions moved to const 2013-03-21 15:13:51 +01:00
Spp 1496e4df84 Core/Pets: Remove unnecesary member variable (m_owner) 2013-03-21 15:00:43 +01:00
Spp 156fb824a4 Core/Scripts: Removed CAST_CRE define 2013-03-21 13:48:36 +01:00
Spp 355029fb4f Core/Scripts: Removed CAST_PLR define 2013-03-21 13:07:10 +01:00
Spp d091097433 Core/AI: Do not expose internal storage of SummonList 2013-03-21 11:06:05 +01:00
Spp 69e81d46b1 Core/Misc: Define multiple functions const (+ code cleanup here and there) 2013-03-20 14:20:17 +01:00
Spp af200bfaa5 Core/Account: Remove unused helper functions 2013-03-20 14:20:17 +01:00
Spp b4ee55dd05 Core/Misc: Do not use singleton when calling to static function ChooseDisplayId (and remove unused parameter) 2013-03-20 14:20:17 +01:00
Spp 44ea9cbb25 Core/RBAC: Fix players not being able to reply GMs from the other faction (Partial revert of 377cfdb) 2013-03-11 10:52:43 +01:00
Spp 524a10d628 Typo fix... ¬¬ 2013-03-08 14:05:51 +01:00
Spp 987826bc0d Core/RBAC: Change default db permissions to behave like a server with default config before RBAC conversion
(Missing change from previous commit)

To enable any of the removed config option you should now add the proper role to the proper groups
IE:
AllowTwoSide.Interaction.Mail = 1 --> Add role 19 to group 1 (Add it to players)
2013-03-08 13:58:15 +01:00
Spp 377cfdb560 Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
- Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender
- Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
2013-03-08 13:15:25 +01:00
Spp 480c6cf4dd Core/RBAC: Add .reload rbac command and prevent possible crash if rbac_permissions has wrong data 2013-02-27 03:30:53 +01:00
Spp 2a0c3a0b78 sql typo fixes 2013-02-26 23:20:52 +01:00
Spp 00c58f25d7 Core/RBAC: Force loadPermissions before checking session permissions if the storage is null (someone created a session but forgot to call to LoadPermissions) 2013-02-26 22:35:55 +01:00
Spp 2286de02f8 Core/RBAC: Correction to last sqls and update base/auth_database.sql 2013-02-26 15:25:46 +01:00
Spp ffdf54b082 Core/RBAC: Remove couple of harcoded checks for GM level and use Permission 'Log gm trade' 2013-02-25 15:59:16 +01:00
Spp d47b95cc0a Missing change related to permission 'Change channel settings' 2013-02-25 15:51:48 +01:00
Spp 0c2402df95 Core/RBAC: Create new permissions 'See two side who list', 'Add friends of other faction', 'See all levels with who command' and 'Allows to add a gm to friend list' 2013-02-25 15:48:19 +01:00
Spp fb9893a190 Add missing change related to permission 'Two side interaction channel' 2013-02-25 15:48:19 +01:00
Spp 019770dddb Core/RBAC: Create new permissions related to character creation
- 'Skips character creation team mask check'
- 'Skips character creation class mask check'
- 'Skips character creation race mask check'
- 'Skips character creation reserved name check'
- 'Skips character creation heroic min level check'
- 'Creation of two side faction characters in same account' (Affected by global config option)
2013-02-25 15:48:19 +01:00
Spp f67330e2ad Core/RBAC: Create new permissions 'Allow channel chat between factions', 'Join channels without announce' (both need config option enabled and permission set) and 'Change channel settings without being channel moderator' 2013-02-25 15:48:18 +01:00
Spp 18562a43ba Core/RBAC: Create new permissions 'Skips needed requirements to use channel check', 'Filter whispers', 'Allow say chat between factions'. Last one needs config option to be enabled and both sender and receiver to have the permission 2013-02-25 15:48:18 +01:00
Spp 9bd697066b Core/RBAC: Add new permissions 'Skip disable map check', 'Skip reset talents when used more than allowed check', 'Skip spam chat check', 'Restore saved gm setting states', 'Use Config option START_GM_LEVEL to assign new character level' 2013-02-25 15:48:18 +01:00
Spp fc78c48495 Core/RBAC: Create new permissions 'Notify if a command was not found' and 'Enables lower security than target check' 2013-02-25 15:48:18 +01:00
Spp d14cb26e6e Core/RBAC: Create new permission 'Two side mail interaction'. In order to send/receive mails from other faction, config option should be enabled and both sender and receiver should have the permission 2013-02-25 15:48:18 +01:00
Spp ea2e6052b2 Core/RBAC: Create new permissions 'Allow to use CMSG_WORLD_TELEPORT opcode' and 'Allow to use CMSG_WHOIS opcode' 2013-02-25 15:48:18 +01:00
Spp e99dd15915 Core/RBAC: Create new permission 'Skip over-speed ping check' 2013-02-25 15:48:18 +01:00
Spp 54f7cc326f Core/RBAC: Create new permission 'Receive global GM messages/texts' 2013-02-25 15:48:18 +01:00
Spp 367d3ccc4f Core/RBAC: Create new permissions 'Use staff badge in chat' and 'Check if should appear in .gm ingame command' 2013-02-25 15:48:18 +01:00
Spp 8e3944bd94 Corrections to recent sqls 2013-02-25 15:48:18 +01:00
Spp cb0456fedc Core/RBAC: Create new permissions 'Instant .save', 'Allow params with .unstuck', 'Full HP after resurrect' 2013-02-25 15:48:18 +01:00
Spp e6087b5563 Core/RBAC: Create new permission 'Be assigned ticket' 2013-02-25 15:48:18 +01:00
Spp 1638092f18 Core/RBAC: Create 'Skip instance required bosses check' permission 2013-02-25 15:48:18 +01:00
Spp 8810fcb575 Core/RBAC: Add new Permission "Log gm trade". Config option still active, but will affect only to users with that permission granted 2013-02-25 15:48:18 +01:00
Spp 15343d9bb0 Core/RBAC: Remove unnecessary header includes from other header files 2013-02-25 15:48:17 +01:00
Spp 49b609d2e4 Core/Calendar: Fix mem leak and minor cosmetic changes 2013-02-23 19:18:09 +01:00
Spp 22353a012f Core/RBAC: Fix mem leak 2013-02-23 19:18:09 +01:00
Spp 7d3fa71a03 Core/Misc: Remove devel log msg that shouldn't have been commited 2013-02-21 01:16:22 +01:00
Spp fd882a4e61 Core/Logging: Fix mem leak. Thanks to @Sar777 for the report 2013-02-21 01:10:58 +01:00
Spp 4fc7fcae33 Core/RBAC: Add config option to set comma separated list of groups to add by default
- Allows to reduce the rows in rbac_account_groups
2013-02-18 14:49:59 +01:00
Spp dd0658e675 Warning fix 2013-02-05 11:12:00 +01:00
Spp fedc26a115 Typo fix 2013-02-05 09:26:52 +01:00
Spp f210ab0d47 Core/RBAC: Allow custom security levels for commands. (Before this change any command with seclevel > 3 had the same permissions than player commands)
Note: This is still a workaround till command system is moved to RBAC
2013-02-05 09:11:56 +01:00
Spp fb7a544d84 Correction to previous commit (Use proper way to delete from spell_script_names) 2013-02-04 17:04:40 +01:00
Spp 61979f8591 Scripts/Player: Add OnMapChanged to PlayerScripts (after map changed)
Core/Dungeon Finder: Use OnMapChanged script to cast/remove Luck of the draw
- Also move code to force party update to LfgPlayerScript
- Remove some obsolete Lfg code after recent commits
2013-02-04 16:52:43 +01:00
Spp 67f686106d Fix compile without PCH 2013-02-04 10:10:15 +01:00
Spp 683de1d624 Core/RBAC: Add SQL to remove bad data from account_access, otherwise other sqls will fail due to use of FOREIGN KEYS
- Also add missing files from previous commit
2013-02-04 09:39:01 +01:00
Spp b980aff83e Core: Implement Role based Access Control
- This system will give more control of actions an account can perform.

System defines:
- Permissions to perform some action
- Roles: a set of permissions that have some relation
- Groups: a set of roles that have some relation

Operations:
- Grant: Assign and allow
- Deny: Assign and do not allow
- Revoke: Remove

Precedence to know if something can be done: Grant, Deny. That means, if you are granted some action by a role but you have denied the permission, the action can not be done.

Some Rules:
- Groups can only have roles
- Roles can only have permissions
- An account can be assigned granted and denied roles. Permissions inherited from roles are granted if roles is granted and denied if roles is denied
- An account can be assigned granted and denied permissions
- An account can have multiple groups, roles and permissions
- An account can not have same role granted and denied at same time
- An acconnt can not have same permission granted and denied at same time
- Id 0 can not be used to define a group, role or permission

Added some permissions as a sample of use (Instant Logout, Skip Queue, Join BGs, Join DF) and some permissions as a workaround to commands till command system is modified to use RBAC
2013-02-04 09:04:33 +01:00
Spp ec5d16db8a Core/Dungeon Finder: Declare some functions private as those are not used outside LFGMgr. Also do not expose LFGDungeonData outside LFGMgr 2013-02-04 06:43:03 +01:00
Spp f743424f63 Core/Dungeon Finder: Corrections to previous commit
- player::inRandomLfgDungeon was supposed to return if current player map and difficulty are the ones player applied for
2013-02-04 05:50:52 +01:00
Spp 9bdfc87774 Core/Dungeon Finder: Use lfg namespace to encapsulate all LFG classes, structs and enums 2013-02-04 04:43:50 +01:00
Spp f753c989f2 Core/Dungeon Finder: Simplify Spell Luck of the draw code
Core/Dungeon Finder: Partial recode of "group list" using existing Lfg functions
2013-02-04 04:43:49 +01:00
Jorge 0920ee126a Merge pull request #9128 from m7nu3l/patch-1
Core/AI: Removed needless code
2013-02-02 21:03:52 -08:00
Spp 67d46ae1ae Scripts/Commands: Show correct guild Rank when using .pinfo command
(Corrections to 1b551cc1)
2013-01-31 09:18:42 +01:00
Spp 8cd408ae6c Core/Misc: Some changes to minimize differences with 4.3.4 branch 2013-01-30 10:34:18 +01:00
Spp c4e4cb1b5c Core/Misc: Remove using directive from header files (It will eventually lead to name collisions) 2013-01-30 09:06:19 +01:00
Spp 2c32393a39 Core/Misc: Always state what columns are affected by MySQL statements 2013-01-30 08:42:01 +01:00
Spp fa5dd4bd4e Core/Misc: Remove some calls to const_cast 2013-01-30 08:39:06 +01:00
Spp 0d3cc3ae3a Core/Log: Fix console colors (missing change from 53a3373)
Closes #9051
2013-01-24 21:52:29 +01:00
Spp 53a3373a98 Core/Logging: Fix all possible crashes when using bad Appender config settings 2013-01-24 16:57:35 +01:00
Spp cc605e0605 Core/Misc: Minor cosmetic changes here and there 2013-01-24 16:57:35 +01:00
Spp 23b6a6a7cd Core/Log: Rotate logs when maximum size is exceeded, backup name will be "filename".datetime
- This is an addition to 39c2d89
2013-01-24 12:44:58 +01:00
Spp d5faec2c0e Core/Account: Move AccountMgr back to singleton 2013-01-17 14:58:15 +01:00
Spp 927062f61f Core/Misc: Some changes to reduce differences with 4.3.4 branch + some cosmetic changes 2013-01-16 11:17:14 +01:00
Spp 526bdc0764 Core/Logging: Add config option to enable/disable asyncronous logging (disabled by default) 2013-01-16 09:52:49 +01:00
Spp be3826825e Core/Logging: Use correct realmId when logging to DB 2013-01-16 08:59:56 +01:00
Spp 802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Spp 4c247f5d2d Core/Dungeon finder: Fix teleport out after dungeon is finished
Closes 8914
2013-01-13 16:22:41 +01:00
Spp e783349803 Use correct initialization of some vars 2013-01-12 02:15:10 +01:00
Spp dfbf318a4f Typo fix 2013-01-10 15:29:08 +01:00
Spp 25d35bacf9 Fix incorrect sql name 2013-01-09 16:39:57 +01:00
Spp 677ed18080 Core/Dungeon Finder: Fix group (5) unable to do new dungeon after finished last dungeon
- Some optimizations here and there
- Drop unused columns related to dungeon rewards
- Simplify Group reward. All people inside the dungeon should get the reward, no matter how far it's from the boss
2013-01-09 15:15:42 +01:00
Spp 5f15600e7a Core/Build: Fix linking and sooo many compile warnings 2013-01-09 13:13:39 +01:00
Spp 27b1e457e6 Core/Misc: More corrections to guid handling change (2292025) 2013-01-03 08:06:53 +01:00
Spp 786f27b74c Core/Misc: Missing changes from 8968dbc (Partial revert of 2292025)
Closes #8843
2013-01-02 21:23:54 +01:00
Spp 8968dbc5a9 Core/Misc: Partial revert of 2292025 (Core/Misc: Replaced some macro definitions with inline functions)
- That code is 4.3.4 and wasn't supposed to be pushed to master
2013-01-02 15:20:38 +01:00
Spp 601fcc5612 Core/Misc: Removed odd code from CreatureAIImpl.h, it does not belong here
- Also some minor corrections from previous commit
2013-01-02 14:20:20 +01:00
Spp ebd14b4f01 Core/Mysql: Multiple changes
- added support for setting NULL column values to MySQL wrapper in core
- replaced nonstandard strdup function and manual memory management with std::string
- fixed bug in MySQLPreparedStatement::getQueryString method, it failed when string parameter contained embedded '?' symbols
- fixed memory leak in MySQLPreparedStatement::setString method
2013-01-02 12:22:50 +01:00
Spp 5280a77fe1 Core/Misc: Some minor changes here and there 2013-01-02 11:00:16 +01:00
Spp d36c4a91ba Core/Misc: Use equal_range instead of lower_bound/upper_bound calls where possible. 2013-01-02 09:53:43 +01:00
Spp 2292025bf9 Core/Misc: Replaced some macro definitions with inline functions 2013-01-02 09:07:52 +01:00
Spp c85dc26584 Core/Misc: EventMap will no longer inherit from std::map 2013-01-02 08:34:11 +01:00
Spp- e150393c95 Core/SAI: Fix SMART_EVENT_PASSENGER_REMOVED event 2012-12-02 18:07:57 +01:00
Spp d6aee08621 Core/Misc: Include character level in log when a character is being deleted 2012-11-30 13:59:01 +01:00
Spp a7d8a65bd0 Core/Dungeon Finder: Partial revert of ad6b5fb419 2012-11-28 08:29:39 +01:00
Spp e954498560 Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch 2012-11-27 13:03:12 +01:00
Spp 2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp 611ffbb189 Core/Units: make SetHover virtual 2012-11-27 07:45:08 +01:00
Spp ad6b5fb419 Core/Dungeon Finder: Fix reward for last member of each group being disbanded to join new lfg group
- Move some messages to Trace
- Add some cases where internal data wasn't updated with new state
- Reverts 441712fbb and ae507e5 (Old State should only store those states you can Restore from a Rolecheck/Proposal)
Closes #8339
Closes #8420
Closes #8421
2012-11-26 20:20:47 +01:00
Spp f09d8b3c71 Addition to last commit... "Fix logic error in 81606e5 (Fixes orange ooze in Professor putricide)" 2012-11-23 15:24:17 +01:00
Spp 86594d4b7a Fix logic error in 81606e5 (Fixes orange ooze in Professor putricide)
Closes #8418
2012-11-23 15:13:00 +01:00
Spp a79065b12e Typo Fix :D 2012-11-23 12:54:44 +01:00
Spp 3dea2af399 Core/Achievements: Minor correction in Log msg
Closes #8396
2012-11-23 12:44:35 +01:00
Spp 0c4e8c8dc2 Core/Network: Enable trace loggers for packet send and receive (just account + opcodeName, opcodeId) 2012-11-23 12:36:18 +01:00
Spp 26006551e2 Fix wrong replacement in 32c259b1ce (Fixes a minor error msg) 2012-11-23 12:30:11 +01:00
Spp b1ec4b61ac Fix error in 32c259b1ce (broken chat) 2012-11-23 01:03:46 +01:00
Spp 32c259b1ce Core/Channels: Remove unnecessary calls to FindPlayer wherever is possible
- Add better opcode debug messages
- Move isValidChatMessage debug messages to trace
2012-11-22 12:11:35 +01:00
Spp d3c902915b Core/Dungeon Finder: Properly update Lfg Status (shouldn't lose 'eye' when changing maps or reconnect after disconnection)
- Also fixes removing Player data when it shouldn't... should solve some problems with players not getting reward in some cases
2012-11-21 19:56:48 +01:00