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: |
77 |
/* TODO: load Ruby script */ |
/* TODO: load Ruby script */ |
78 |
break; |
break; |
79 |
} |
} |
80 |
|
#endif |
81 |
} |
} |
82 |
|
|
83 |
/* |
/* |
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: |
102 |
/* TODO: load Ruby script */ |
/* TODO: load Ruby script */ |
103 |
break; |
break; |
104 |
} |
} |
105 |
|
#endif |
106 |
} |
} |
107 |
|
|
108 |
/* |
/* |
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 |
|
|