summaryrefslogtreecommitdiff
path: root/src/common/showmsg.c
AgeCommit message (Collapse)AuthorFilesLines
2018-07-01Fix some warnings caused by static functions defined and unusedHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2018-07-01Change functions to static where possible (Part 1 - common)Haru1-34/+38
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2016-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-07-17If build bot enabled, show error message in ShowConfigWarning.Andrei Karas1-0/+4
2016-05-08Fixed various issues pointed out by cppcheckHaru1-8/+5
Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-1/+1
Add all missing -Wformat flags into configure.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru1-2/+1
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files, that were previously masked by the above. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Sanitized various macrosHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-0/+1
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Added showmsg HPM interfaceHaru1-50/+99
- The showmsg interface is automatically imported into plugins by the HPM (just like previously, the various Show* functions were). This change requires no actions from plugin developers. - stdout_with_ansisequence is now available through showmsg->stdout_with_ansisequence - msg_silent is now available through showmsg->silent - console_msg_log is now available through showmsg->console_log - timestamp_format is now available through showmsg->timestamp_format - Plugin-safe macros are provided, so that all Show* and Clear* calls will require no changes. - vShowMessage is provided through the public API, as va_list variant of ShowMessage. - vShowMessage_ is no longer part of the public API. If necessary, va_list variants of the other Show* functions will be added at a later time as follow-ups. Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru1-2/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-7/+7
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Whitespace cleanup (no code changes)Haru1-207/+154
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-08-07Corrected several format-string errors through the codeHaru1-8/+17
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-15/+15
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-3/+3
2014-05-13Removed trailing whitespace (sources)Haru1-17/+17
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-7/+10
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-10/+7
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-7/+10
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Sanitized and improved several macros through the codeHaru1-68/+43
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-07-29Permission cache overhaulPiotr Hałaczkiewicz1-1/+1
* Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
2013-05-15HPM Updateshennetsind1-9/+9
Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up. Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates. Signed-off-by: shennetsind <ind@henn.et>
2013-05-02Introducing Hercules Plugin Manangershennetsind1-13/+4
http://hercules.ws/board/topic/549-introducing-hercules-plugin-manager/ Signed-off-by: shennetsind <ind@henn.et>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-652/+699
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-699/+652
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-20Forgot the Show* voiding <3momacabu1-40/+20
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16931 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-06-03cleaned up windows header usage (added one central file to use windows / ↵blacksirius1-2/+1
winapi specific stuff, to be able to set the appropriate flags before including it correctly) Note: this may screw up mingw or cygwin building, ill fix it later... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16219 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-20- Change libconfig.h include directives to double-quoted form (file missing ↵flaviojs1-1/+1
from r15737). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15739 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-1/+1
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-16- Removed outdated version number handling (follow-up to r11503).gepard19841-1/+0
- Fixed mapcache compilation issues in Linux. - Added some missing `svn:ignore` properties. - Moved `BLOCK_SIZE` definition from header to source file. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-0/+16
http://www.hyperrealm.com/libconfig/): - Updated VS9/10 project files. - Updated `configure` & `Makefile`s. - New GM, Commands & Permissions system: - '''This is a backwards compatibility breaking update''', please read tid:58877 - Replaced GM levels with Player Groups. - Commands permissions & other privileges now depend on group, not GM level. - `@help` command improvements: requires "commandname" param and shows more detailed info about commands. - Modified GM whisper system to deliver messages basing on permissions, not GM level. - Remote trade request is now possible only if player is allowed to use `@trade` command as well. - Added a proper permission to use `/changemaptype` command. - `clif_displaymessage` is now capable of displaying multiline messages. - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster). - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server. - Merged `@monster`, `@monsterbig` and `@monstersmall`. - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players. - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`). - Fixed `atcommand` script function reading unknown memory area (possible access violation). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-7/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed trailing tabs, and fixed some spacing.brianluau1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15524 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-15Finished BuildBot "console error scan" stuff.shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15128 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-15whops, typo.shennetsind1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15127 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-15BuildBot console report codeshennetsind1-0/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15126 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-05Merging RREmu into rAthena -- quite a few stuff yet to be renamed, but we'll ↵shennetsind1-0/+27
get it sorted. Some of the stuff included in RREmu that is now part of rAthena: - RE Drop Rate Modifier - RE Experience Rate Modifier - RE Weapon MATK - RE Shield ASPD job-specific penalty - RE Cast Time - Renewal-specific item DEF - 3.1 classes. - All-New Mounts - Official Magical Reflection - And other perks, such as fully-functional @mapflag also merged eAthena 15006 into rAthena. For Bugs, Comments and Suggestions: http://rathena.org/board/tracker/ git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15009 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-22* Hunted down improper uses of va_list variables.FlavioJS1-4/+10
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13383 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, ↵ultramage1-13/+5
generated by ShowMessage(). It now works exactly like printf(). Removed/replaced all printf calls in the code. Added a new flag to setting 'console_silent', for filtering debug messages. Silenced the "Broken pipe found" and "Server running in debug mode" messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-12* Some preparations for the guild script updateultramage1-1/+1
- cleaned up npc event execution code - cleaned up guild data loading/saving code; to be improved later - removed dummy 'account name' expulsion list management code - removed columns 'rsv1' and 'rsv2' from guild member data - removed columns 'rsv1' 'rsv2' 'rsv3' and 'acc' from guild expulsion data - added upgrade_svn11895.sql for SQL git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11895 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-9/+12
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01Cleaned up some parts of the code.ultramage1-6/+6
Removed obsolete script function 'hasitems'. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10838 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-01* TXT->SQL converter fixupultramage1-1/+1
- Added missing char_id insert which totally messed up the conversion - Fixed login converter ignoring many columns (although it had the data) - Pointed out that Login-stored account variable conversion is MISSING! - Pointed out that Status, Homunculus and Mapreg conversion is MISSING! - Blocked the config functions from exiting server when file not found - Finally added VS8 project files for this thing git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10835 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05* Removed the dependency on winsock.h for definitions, it's all winsock2.h now.FlavioJS1-4/+5
* Minor documentation/re-coding in chat.c. * More work on ticket #41. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-16* Finally fixed mingw problems, managed to build both TXT and SQLultramage1-2/+2
* Fixed the uint32 platform problem (Microsoft failed so I removed it :) * Removed the cbasetypes.h dependency from the mapcache generator * Removed some random compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10270 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-09* Played around with MinGW a bit today...ultramage1-4/+3
- adjusted code so that it handles mingw-specific compatibility problems - adjusted the makefile, mingw is not a subset of cygwin * As an experiment Corrected many /W4 warnings on the txt login server git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10192 54d463be-8e91-2dee-dedb-b68131a5f0ec