summaryrefslogtreecommitdiff
path: root/src/perl/perl-common.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-06-30 11:53:03 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-06-30 11:53:03 +0000
commit3005cad5c37962f788cfe12a19704f0483ae96b0 (patch)
tree3a53b3169604d7c1a2da13a75402ae4ccd9db52f /src/perl/perl-common.c
parente72780d4d6ab4e0486ead10dbab5c633602d4d5f (diff)
downloadirssi-3005cad5c37962f788cfe12a19704f0483ae96b0.zip
use Irssi; use Irssi::Irc and use Irssi::UI are now automatically called so
you won't need to add those to scripts. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1603 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/perl/perl-common.c')
-rw-r--r--src/perl/perl-common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/perl/perl-common.c b/src/perl/perl-common.c
index b004b9e6..781cd9b8 100644
--- a/src/perl/perl-common.c
+++ b/src/perl/perl-common.c
@@ -21,6 +21,7 @@
#include "module.h"
#include "modules.h"
#include "signals.h"
+#include "core.h"
#include "misc.h"
#include "settings.h"
@@ -156,6 +157,13 @@ char *perl_get_use_list(void)
str = g_string_new(NULL);
+ if (*PERL_LIB_DIR != '\0')
+ g_string_append(str, "use lib \""PERL_LIB_DIR"\";");
+
+ g_string_append(str, "use Irssi;");
+ if (irssi_gui != IRSSI_GUI_NONE)
+ g_string_append(str, "use Irssi::UI;");
+
for (tmp = use_protocols; tmp != NULL; tmp = tmp->next)
g_string_sprintfa(str, "use Irssi::%s;", (char *) tmp->data);