summaryrefslogtreecommitdiff
path: root/src/map/irc-bot.c
AgeCommit message (Collapse)AuthorFilesLines
2014-05-09Fixed order of includes in all source filesHaru1-10/+12
- 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-12-17Fixed several compiler warningsHaru1-3/+4
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-12-09Fixed some logic errorsshennetsind1-1/+1
Special Thanks to Haru Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-1/+4
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-10-26Changed 'tick' variables to 64 bitHaru1-3/+3
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-09-25Renamed iTimer interface to timer.shennetsind1-9/+9
Also removed duplicate mentions of timer within calls to shorten.
2013-08-12Added support for Nick Server GHOST commandHaru1-0/+3
Credits to Yommy for the idea Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Added support for long IRC messagesHaru1-6/+15
- IRC messages are no longer truncated to one line of client chat message, if they are longer than that. They're instead posted as multiple lines. (See comments in the source to disable this, if you wish to.) - Added a define for the max acceptable IRC message length, and increased the size of send_string to fit it Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Small IRC bridge tweaksHaru1-15/+81
- Added documentation for the remaining undocumented functions - Dropped unused function ircbot->join - Moved commented out debug commands to ifdef blocks; to quickly toggle them, (un)comment #define IRBCOT_DEBUG on top of irc-bot.c Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Added support for CTCP commands to the IRC bridgeHaru1-14/+55
- Implements relevant parts from the CTCP specification at http://www.irchelp.org/irchelp/rfc/ctcpspec.html - Fixed parsing of CTCP VERSION requests (follow-up to 19b8cbb) - Added support for new CTCP commands: - ACTION (also known as /me command): will be shown to players in the #irc channel as "[ #irc ] * IRC.<nick> <action message> *" - ERRMSG, FINGER: are silently ignored (irrelevant or deprecated) - PING is replied to with the correct pong reply - TIME is replied to with the current server time Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Added support for JOIN, QUIT, PART, NICK in the IRC bridgeHaru1-0/+68
- It'll now show messages such as: [ #irc ] User IRC.<nick> joined the channel. [ #irc ] User IRC.<nick> left the channel. [Quit: <quit message>] [ #irc ] User IRC.<nick> left the channel. [<leave message>] [ #irc ] User IRC.<old nick> is now known as IRC.<new nick>" - To disable, comment out the respective entries in irc_bot_init. Signed-off-by: Haru <haru@dotalux.com>
2013-08-12Added support for target-less commands in the IRC bridgeHaru1-4/+9
Needed for future updates (such as receiving "QUIT" commands Signed-off-by: Haru <haru@dotalux.com>
2013-07-11Fixed an issue with long hostnames/nicknames in the IRC BridgeHaru1-6/+3
This prevents nickname truncation and other possibly ill side-effects in case the source string for a message is in the form: aNickname!~ident@an.irc.user.with.a.very.long.hostname_________ Signed-off-by: Haru <haru@dotalux.com>
2013-07-01Fixed Bug #7216shennetsind1-0/+2
Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help! http://hercules.ws/board/index.php?app=tracker&showissue=7216 Signed-off-by: shennetsind <ind@henn.et>
2013-06-07Hercules Renewal Phase One : pc, party, map, timerSusu1-6/+6
Added iPc, iParty, iMap, iTimer to HPM exported interfaces
2013-06-01IRC Bridge Fix/Adjustmentsshennetsind1-6/+6
All Credits to Haruna~! Thank you very much! Signed-off-by: shennetsind <ind@henn.et>
2013-05-30Memory Slasher - May 30 Patchshennetsind1-1/+5
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind <ind@henn.et>
2013-05-14Follow up dc16b498f6dc8621037e4a596cd47c369576fa23shennetsind1-1/+1
Yahooo an 'n'~! Signed-off-by: shennetsind <ind@henn.et>
2013-05-14Hercules IRC Bridge Fixshennetsind1-7/+21
Special Thanks to Axiom, Wolfed!~ Signed-off-by: shennetsind <ind@henn.et>
2013-04-24Fixed msvc warning on irc-botshennetsind1-7/+9
Special Thanks to Zopokx! Signed-off-by: shennetsind <ind@henn.et>
2013-04-22Hercules April 22 MEGA-ULTRA-LONG Patch~!shennetsind1-0/+272
http://hercules.ws/board/topic/470-hercules-april-22-patch/ Signed-off-by: shennetsind <ind@henn.et>