Changeset 0f9eca7 for perlconfig.c


Ignore:
Timestamp:
Aug 3, 2008, 10:00:30 PM (13 years ago)
Author:
Geoffrey Thomas <geofft@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
d81f8d0
Parents:
719c699
Message:
Add a hook, newMessage, that catches every message that's added to the message
list. receiveMessage only sees incoming messages, and I don't want to change
that behavior. newMessage is probably most useful for people writing fancy
loggers in Perl.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rdb0ac7e r0f9eca7  
    421421}
    422422
     423/* Called on all new messages; receivemsg is only called on incoming ones */
     424void owl_perlconfig_newmsg(owl_message *m, char *subname)
     425{
     426  char *ptr = NULL;
     427  if (owl_perlconfig_is_function("BarnOwl::Hooks::_new_msg")) {
     428    ptr = owl_perlconfig_call_with_message(subname?subname
     429                                           :"BarnOwl::Hooks::_new_msg", m);
     430  }
     431  if (ptr) owl_free(ptr);
     432}
     433
    423434char *owl_perlconfig_perlcmd(owl_cmd *cmd, int argc, char **argv)
    424435{
Note: See TracChangeset for help on using the changeset viewer.