Commit Graph

649 Commits

Author SHA1 Message Date
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +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
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
e99dd15915 Core/RBAC: Create new permission 'Skip over-speed ping check' 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
Shauren
59c3c6b8a6 Core/Players: Allow players to log out in combat when they are in resting area (logout in rest area is instant by default, but not when in combat) 2013-02-20 20:52:58 +01:00
Machiavelli
1093abb1ad Core/Handlers: Prevent some cheating in CharacterHandler
Prevents factionchanging and char customising of characters that do not
belong to the current account.
2013-02-14 16:07:36 +01:00
Nay
42e660e2a2 Core/Sockets: Always try to send MSG_NOSIGNAL in peer().send()
Fixes RASocket::authenticate crash

"MSG_NOSIGNAL:
If you send() to a remote host which is no longer recv()ing, you'll typically get the signal SIGPIPE. Adding this flag prevents that signal from being raised."

Closes #5040
Thanks to @derex for the hint
2013-02-11 02:59:37 +00:00
Shauren
b6e56e42ea Core/Auth: Reverted part of fb43a92cc2 - session key is still needed after logging in to be able to switch realms 2013-02-08 01:03:56 +01:00
Shauren
fb43a92cc2 Core/Accounts: sessionkey field in account table is only a temporary storage to pass data from authserver to worldserver and should only be used as such. Clearing sessionkey from database after a successful login to prevent possible exploits. 2013-02-07 16:15:23 +01:00
Aokromes
6d8a69d640 Merge pull request #9099 from Bezo/mutenew
Add Mute reason and mute by to the db so you can get this info from the ...
2013-02-04 06:55:26 -08: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
9bdfc87774 Core/Dungeon Finder: Use lfg namespace to encapsulate all LFG classes, structs and enums 2013-02-04 04:43:50 +01:00
Bezo
760d62e934 Add Mute reason and mute by to the db so you can get this info from the db with the pinfo command when player get muted.
old LOGIN_UPD_MUTE_TIME change to LOGIN_UPD_MUTE_TIME_LOGIN due the use of it when character login to world.
2013-01-30 13:09:41 +02:00
Spp
fa5dd4bd4e Core/Misc: Remove some calls to const_cast 2013-01-30 08:39:06 +01:00
Spp
cc605e0605 Core/Misc: Minor cosmetic changes here and there 2013-01-24 16:57:35 +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
802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +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
Nay
a509aea659 Core/Misc: Fix a couple of warnings, some of them performance related
Errors were found using Cppcheck, open-source static analysis tool
2013-01-04 23:14:14 +00:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
kaelima
a8cd34c4a4 Core/Battleground: Rename and correct usage of opcode 1223 and increase the timer before arena/bg invitation window is removed to its proper value. Closes #6725 2012-12-26 04:02:42 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
a79065b12e Typo Fix :D 2012-11-23 12:54:44 +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
7bef4ce401 Core/Misc: Reduce header dependencies - Step III 2012-11-20 15:03:56 +01:00
horn
771aafc499 Core/Calendar: Completely rewrite and fix most of the calendar system
There are still some issues that need to be fixed, for more info see CalendarHandler.cpp TODO part.
Some unblizzlike behaviour possible, we don't have a lot of sniffs.
Big thanks to @Warpten, he joined my project and helped a lot.

IMPORTANT NOTE: Read / append packed time functions in ByteBuffer.h are not correct, they need to be fixed in order to have event times accurate

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-11-18 22:42:28 +00:00
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
Shauren
85f5a189de Core/Warden: Add minimal verification of OS used by client for warden module loading 2012-11-12 00:31:08 +01:00
Spp
333b8e5159 Core/Build: Enable Clang PCH support and OS X specific features
Core: Fix warnings here and there
2012-11-09 13:13:45 +01:00
Spp
58ec4e5319 Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete)
- Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly.
- Reset daily slots/money withdraw for all members at same time, configurable
- Better debug messages
2012-11-02 22:26:10 +01:00
leak
6bf9cb56a9 Core/Chat: Prevent client crashes with invalid chat language and message type combinations
Fixes #8083
2012-11-01 20:04:35 +01:00
Spp
9074c11a90 Core/Dungeon Finder: Update "Current group roles" according to people in queue.
Core/Dungeon Finder: Properly update internal lfg group structure at server load
2012-10-29 20:13:42 +01:00
Spp
9fbc4c0ae2 Core/Misc: reduced amount of string memory allocations (Step II) 2012-10-24 15:34:48 +02:00
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp
d0334bf948 Core/Dungeon Finder: Some optimizations.
- Store teleport coordinates to avoid recalculations each time someone has to be teleported
- Correct teleport error msg when player is charming or using vehicle
- Internal changes in storage types
- Proper code for missing achievement lock type
- Better debug msgs
- Trying to get rid of "Player*" and "Group*" inside LFGMgr as much as possible (Step 1)
2012-10-18 09:15:10 +02:00
Spp
58c01c140d Core/Battleground: Make Battleground queues and Free slot queue structures private. 2012-10-04 10:39:37 +02:00
Dimitro
c299e8340c Core/Misc: Now attackers receiving all rewards, when the victim gone offline. 2012-10-03 14:13:14 +03:00
Spp
358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
Nay
e3d9768a50 Core: Fix many "errors"/warnings and coding style (3)
Game

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 22:44:33 +01:00
Vincent-Michael
6891fe6248 Core/Battlefield: Add missing stuff for wintergrasp 2012-08-21 23:03:30 +02:00
Spp
984493108b Core/Logging: Fix incorrect error level for some warden messages
Core/Logging: Fix incorrect filter type for many network messages
Core/Logging: Use OPCODE filter type for network messages related to wrong packets
2012-08-21 22:12:55 +02:00
Kandera
b9f60fe56c Core/Wintergrasp: finish implementation for battlefields. this is highly experimental enable at you're own risk. will almost definatly cause issues with the wintergrasp patch floating around 2012-08-20 16:23:24 -04:00
Warpten
094f98d3a9 Battlefield/Wintergrasp:
* Use correct spells on losing and winning factions
* Enums renaming, lowerCamelCase wherever applicable
* Rename some methods and class attributes for them to sound more English and less Engrish or even Frenglish (\o/)
* Use correct spells when trying to build mechanical units at the Workshops.
2012-08-20 13:50:49 -04:00
Kandera
dd05f1dcd2 fix crash with groups, added enum for battlfield leave reasons 2012-08-20 13:36:09 -04:00
Kandera
6318fd91ff added enum for battlefield leave reason. 2012-08-20 13:36:08 -04:00
Kandera
ba91b8bde9 change some packets. fix sql. 2012-08-20 13:36:06 -04:00
Spp
13aa00d5f2 Core/Logging: Restore dumping packets in binary format 2012-08-17 10:36:48 +02:00
Spp
97c4b92eb0 Core/Logging: Try to simplify configuration of loggers and appenders
Changed multiple lines to a simple format:
- Logger.name=Type,LogLevel,Flags,AppenderList
- Appender.name=Type,LogLevel,Flags,optional1,optional2
  * Type = File: optional1 = File name, optiona2 = Mode
  * Type = Console: optional1 = Colors

Created a default set of loggers and appenders.
- Root logger defaults to Error, that means you will see nothing on console by default (not even loading)
- You need to add the loggers to Loggers options if you want to enable them, otherwise Root logger will be used for all types

Restored outSQLDriver (LOG_FILTER_SQL_DRIVER), outSQLDev (LOG_FILTER_SQL_DEV), outArena (LOG_FILTER_ARENA) and outChar (LOG_FILTER_CHARACTER) functionality by creating new types (LOG_FILTER_CHARACTER is a rename of LOG_FILTER_DELETE.

Note: You need to update your config file... again (yeah sorry... trying to make it simpler)
2012-08-06 12:10:33 +02:00
Spp
3f42094b9c Core/Logging: Add option to remove timestamp, Log Level and Log Filter Type from logged msgs
- Appender config option .Timestamp and .Backup became obsolete
- New Appender config option .Flags added

Appender Console prefixes Log Level and Log Filter Type to the logged text as default
Appender File prefixes Timestamp, Log Level and Log Filter Type to the logged text as default
2012-08-05 15:38:25 +02:00