summaryrefslogtreecommitdiff
path: root/lib/rbot/messagemapper.rb
AgeCommit message (Collapse)Author
2009-08-26ruby 1.9: fix Integer(nil)franz
in 1.9, Integer(nil) raises TypeError, so we change "%d" to "%s"
2009-08-12Better handling of MessageMapper failuresGiuseppe Bilotta
The plugin fallback method is now passed the list of failures. Failures themselves are encapsulated in their own data type, making it easier to handle failures that should inform the user with something more detailed than the classic 'usage' pattern. It's still up to the fallback method to make use (e.g. echo) the relevant messages.
2009-03-25messagemapper: include defaults in optionsGiuseppe Bilotta
This change allows the use of :defaults in maps to define values for parameters which are not actually present in the map itself. We also move the initialization further down, to skip it in case of early returns.
2009-03-07messagemapper: fix regexp creation for double-optional templatesGiuseppe Bilotta
When a mapping template had a double optional key such as 'something [[double] optional]' the resuting regexp moved the spacing between the (converted) double brackets, requiring extra spacing before the 'optional' keyword. Fix by moving spacing inside all consecutive brackets before converting brackets into their regexp form.
2009-02-19remove whitespaceRaine Virta
2008-06-24allow multi-line (artificial) messages be delegated and handledYaohan Chen
2008-05-28changed m.thread to m.in_thread, with different semanticsYaohan Chen
m.in_thread indicates that the caller of delegate is in thread (and is handled by not creating another thread for m's mapped action)
2008-05-27use m.thread.nil? rather than longer m.thread == nilYaohan Chen
2008-05-27add attribute BasicUserMessage#threadYaohan Chen
this specifies whether the message handler is to be threaded, and overrides the map option if non-nil.
2008-05-01messagemapper: Regexp#mm_cleanup method instead of repeated (and wrong) ↵Giuseppe Bilotta
progressive cleanup
2008-05-01messagemapper.rb: keep options when removing captures in regexpsGiuseppe Bilotta
2008-03-12* (messagemapper) catch and report all exceptions in threaded actionsdmitry kim
2007-12-13messagemapper: fix set_auth_path() logicGiuseppe Bilotta
2007-09-12namespaces: move rbot-specific classes and modules from Irc::* to Irc::Bot::*Giuseppe Bilotta
2007-09-12rdocument Irc::MessageMapper and Irc::MessageTemplateGiuseppe Bilotta
2007-09-11+ (plugins) :thread option for plugin.map makes an action automatically threadedDmitry Kim
* (plugins/*) converted to the new threading model
2007-04-11use pretty printing with Logger (debug, info, warning and error messages)Giuseppe Bilotta
2007-02-14Make message map regexps less aggressiveGiuseppe Bilotta
2007-02-11MessageMapper: documentation cleanup, and Template enhancements (they now ↵Giuseppe Bilotta
remeber which botmodule they were registered for)
2007-02-11Minor messagemapper optimizationsGiuseppe Bilotta
2007-02-08Message mapper: we are ony interested in matching messages that fully agree ↵Giuseppe Bilotta
with the template
2007-02-04Tuning of messagemapper debug outputGiuseppe Bilotta
2007-02-02Enhance the :requirements functionality in #map() to allow regexps with ↵Giuseppe Bilotta
capturing groups: the first non-nil capture will be passed on as the corresponding parameter value, instead of the whole matched expression. See ChangeLog and documented source for details.
2007-02-02Plugin map requirements are now checked at regular expression time, not later onGiuseppe Bilotta
2007-02-02In the new message mapper code, fail unconditionally when an entry doesn't ↵Giuseppe Bilotta
match its requirements. This is sub-optimal: the requirements should be included in the generated regular expression.
2006-08-31messagemapper fix ... watch what you name your variables!Giuseppe Bilotta
2006-08-31Improve debugging output in messagemapperGiuseppe Bilotta
2006-08-31Fix messagemapper for optional argumentsGiuseppe Bilotta
2006-08-25Fix stupid bug in the new message mappingGiuseppe Bilotta
2006-08-25New implementation for the message mapper: multi-word parameters can now be ↵Giuseppe Bilotta
retrieved as substrings with preserved whitespace (use to_s), and parts of the message match can be made optional [by bracketing them]
2006-08-06Forgot the kernel fixes for previous commitGiuseppe Bilotta
2006-08-03Lots of fixes all around, in preparation for the new auth coremoduleGiuseppe Bilotta
2006-08-02Fix message handling, comment out some debug messagesGiuseppe Bilotta
2006-08-02Auth now follows the specs defined in NewAuthModule even though there is no ↵Giuseppe Bilotta
actual auth coremodule. config.rb needs to be split into a class definition file and a coremodule that manages it
2006-07-26Whitespace cleanupGiuseppe Bilotta
2006-07-25When verifying uniqueness of plugin map parameters names, check for :param ↵Giuseppe Bilotta
vs *param too
2006-07-24Implement map! properly this timeGiuseppe Bilotta
2005-08-12some tweaksTom Gilbert
2005-08-03Thu Aug 04 00:11:52 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>Tom Gilbert
* Tweaked the debug() stuff a bit. Need to do this more cleanly really * Added a fair bit of documentation for some of the new features
2005-08-02 * Fixed the new http.proxy* settings, they work!Tom Gilbert
* Fixed a bug with auth-checking for the config module * misc tweaks
2005-07-31Sun Jul 31 02:20:08 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>Tom Gilbert
* Updated docgen to generate rdoc again with the new repo structure * added new restart command to the core bot, quits irc and reexecs the bot, to pick up new code/libraries etc.
2005-07-29Fri Jul 29 13:07:56 BST 2005 Tom Gilbert <tom@linuxbrit.co.uk>Tom Gilbert
* Moved some stuff out of util.rb into the plugins that actually need them. Those methods didn't belong in util as they were plugin-specific. * moved a few more plugins to use map() where appropriate * made the url plugin only store unique urls
2005-07-27move rbot into lib - still rearranging for packaging/installationTom Gilbert