/[weechat]/weechat/src/plugins/plugins.c
ViewVC logotype

Diff of /weechat/src/plugins/plugins.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by flashcode, Sun Nov 16 23:46:48 2003 UTC revision 1.3 by flashcode, Mon Nov 17 21:07:18 2003 UTC
# Line 62  plugins_init () Line 62  plugins_init ()
62  void  void
63  plugins_load (int plugin_type, char *filename)  plugins_load (int plugin_type, char *filename)
64  {  {
65        #ifdef PLUGINS
66      switch (plugin_type)      switch (plugin_type)
67      {      {
68          case PLUGIN_PERL:          case PLUGIN_PERL:
# Line 76  plugins_load (int plugin_type, char *fil Line 77  plugins_load (int plugin_type, char *fil
77              /* TODO: load Ruby script */              /* TODO: load Ruby script */
78              break;              break;
79      }      }
80        #endif
81  }  }
82    
83  /*  /*
# Line 85  plugins_load (int plugin_type, char *fil Line 87  plugins_load (int plugin_type, char *fil
87  void  void
88  plugins_unload (int plugin_type, char *scriptname)  plugins_unload (int plugin_type, char *scriptname)
89  {  {
90        #ifdef PLUGINS
91      switch (plugin_type)      switch (plugin_type)
92      {      {
93          case PLUGIN_PERL:          case PLUGIN_PERL:
# Line 99  plugins_unload (int plugin_type, char *s Line 102  plugins_unload (int plugin_type, char *s
102              /* TODO: load Ruby script */              /* TODO: load Ruby script */
103              break;              break;
104      }      }
105        #endif
106  }  }
107    
108  /*  /*
# Line 174  plugins_msg_handlers_free_all () Line 178  plugins_msg_handlers_free_all ()
178  }  }
179    
180  /*  /*
181     * plugins_event_msg: IRC message received => call all handlers for this message
182     */
183    
184    void
185    plugins_event_msg (char *command, char *arguments)
186    {
187        #ifdef PLUGINS
188        t_plugin_handler *ptr_plugin_handler;
189        
190        for (ptr_plugin_handler = plugins_msg_handlers; ptr_plugin_handler;
191             ptr_plugin_handler = ptr_plugin_handler->next_handler)
192        {
193            if (strcasecmp (ptr_plugin_handler->name, command) == 0)
194            {
195                #ifdef PLUGIN_PERL
196                if (ptr_plugin_handler->plugin_type == PLUGIN_PERL)
197                    wee_perl_exec (ptr_plugin_handler->function_name, arguments);
198                #endif
199            }
200        }
201        #else
202        /* make gcc happy */
203        (void) command;
204        #endif
205    }
206    
207    /*
208   * plugins_end: shutdown plugin interface   * plugins_end: shutdown plugin interface
209   */   */
210    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26