mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
Implemented runtime loadable modules. /LOAD loads a module, /UNLOAD
unloads it. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@420 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
4475a04841
commit
21999ae205
6 changed files with 186 additions and 6 deletions
|
|
@ -13,6 +13,7 @@ libfe_common_core_la_SOURCES = \
|
|||
fe-common-core.c \
|
||||
fe-core-commands.c \
|
||||
fe-log.c \
|
||||
fe-modules.c \
|
||||
fe-server.c \
|
||||
fe-settings.c \
|
||||
hilight-text.c \
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "module.h"
|
||||
#include "module-formats.h"
|
||||
#include "levels.h"
|
||||
|
|
@ -43,6 +44,9 @@ void fe_core_log_deinit(void);
|
|||
void fe_log_init(void);
|
||||
void fe_log_deinit(void);
|
||||
|
||||
void fe_modules_init(void);
|
||||
void fe_modules_deinit(void);
|
||||
|
||||
void fe_server_init(void);
|
||||
void fe_server_deinit(void);
|
||||
|
||||
|
|
@ -87,6 +91,7 @@ void fe_common_core_init(void)
|
|||
keyboard_init();
|
||||
printtext_init();
|
||||
fe_log_init();
|
||||
fe_modules_init();
|
||||
fe_server_init();
|
||||
fe_settings_init();
|
||||
translation_init();
|
||||
|
|
@ -106,6 +111,7 @@ void fe_common_core_deinit(void)
|
|||
keyboard_deinit();
|
||||
printtext_deinit();
|
||||
fe_log_deinit();
|
||||
fe_modules_deinit();
|
||||
fe_server_deinit();
|
||||
fe_settings_deinit();
|
||||
translation_deinit();
|
||||
|
|
|
|||
|
|
@ -72,13 +72,13 @@ FORMAT_REC fecommon_core_formats[] = {
|
|||
/* ---- */
|
||||
{ NULL, "Logging", 0 },
|
||||
|
||||
{ "log_opened", "Log file %W$0%n opened", 1, { 0 } },
|
||||
{ "log_closed", "Log file %W$0%n closed", 1, { 0 } },
|
||||
{ "log_opened", "Log file %_$0%_ opened", 1, { 0 } },
|
||||
{ "log_closed", "Log file %_$0%_ closed", 1, { 0 } },
|
||||
{ "log_create_failed", "Couldn't create log file %_$0%_: $1", 2, { 0, 0 } },
|
||||
{ "log_locked", "Log file %W$0%n is locked, probably by another running Irssi", 1, { 0 } },
|
||||
{ "log_not_open", "Log file %W$0%n not open", 1, { 0 } },
|
||||
{ "log_started", "Started logging to file %W$0", 1, { 0 } },
|
||||
{ "log_stopped", "Stopped logging to file %W$0", 1, { 0 } },
|
||||
{ "log_locked", "Log file %_$0%_ is locked, probably by another running Irssi", 1, { 0 } },
|
||||
{ "log_not_open", "Log file %_$0%_ not open", 1, { 0 } },
|
||||
{ "log_started", "Started logging to file %_$0", 1, { 0 } },
|
||||
{ "log_stopped", "Stopped logging to file %_$0", 1, { 0 } },
|
||||
{ "log_list_header", "Logs:", 0 },
|
||||
{ "log_list", "$0 $1: $2 $3$4$5", 6, { 1, 0, 0, 0, 0, 0 } },
|
||||
{ "log_list_footer", "", 0 },
|
||||
|
|
@ -87,6 +87,15 @@ FORMAT_REC fecommon_core_formats[] = {
|
|||
{ "no_away_msgs", "No new messages in awaylog", 1, { 0 } },
|
||||
{ "away_msgs", "$1 new messages in awaylog:", 2, { 0, 1 } },
|
||||
|
||||
/* ---- */
|
||||
{ NULL, "Modules", 0 },
|
||||
|
||||
{ "module_already_loaded", "Module %_$0%_ already loaded", 1, { 0 } },
|
||||
{ "module_load_error", "Error loading module %_$0%_: $1", 2, { 0, 0 } },
|
||||
{ "module_invalid", "%_$0%_ isn't Irssi module", 1, { 0 } },
|
||||
{ "module_loaded", "Loaded module %_$0", 1, { 0 } },
|
||||
{ "module_unloaded", "Unloaded module %_$0", 1, { 0 } },
|
||||
|
||||
/* ---- */
|
||||
{ NULL, "Misc", 0 },
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,14 @@ enum {
|
|||
|
||||
IRCTXT_FILL_6,
|
||||
|
||||
IRCTXT_MODULE_ALREADY_LOADED,
|
||||
IRCTXT_MODULE_LOAD_ERROR,
|
||||
IRCTXT_MODULE_INVALID,
|
||||
IRCTXT_MODULE_LOADED,
|
||||
IRCTXT_MODULE_UNLOADED,
|
||||
|
||||
IRCTXT_FILL_7,
|
||||
|
||||
IRCTXT_NOT_TOGGLE,
|
||||
IRCTXT_PERL_ERROR,
|
||||
IRCTXT_OPTION_UNKNOWN,
|
||||
|
|
@ -76,6 +84,7 @@ enum {
|
|||
IRCTXT_CHAN_NOT_FOUND,
|
||||
IRCTXT_CHAN_NOT_SYNCED,
|
||||
IRCTXT_NOT_GOOD_IDEA
|
||||
|
||||
};
|
||||
|
||||
extern FORMAT_REC fecommon_core_formats[];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue