summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/session.c5
-rw-r--r--src/core/session.h2
-rw-r--r--src/perl/common/Core.xs8
3 files changed, 13 insertions, 2 deletions
diff --git a/src/core/session.c b/src/core/session.c
index 004cd4f7..e07fc379 100644
--- a/src/core/session.c
+++ b/src/core/session.c
@@ -33,7 +33,7 @@
#include "nicklist.h"
static char *session_file;
-static char *irssi_binary;
+char *irssi_binary;
static char **session_args;
@@ -354,7 +354,8 @@ void session_init(void)
{ NULL, '\0', 0, NULL }
};
- session_file = NULL;
+ session_file = NULL;
+ irssi_binary = NULL;
args_register(options);
command_bind("upgrade", NULL, (SIGNAL_FUNC) cmd_upgrade);
diff --git a/src/core/session.h b/src/core/session.h
index 5788b5f0..000ec56e 100644
--- a/src/core/session.h
+++ b/src/core/session.h
@@ -1,6 +1,8 @@
#ifndef __SESSION_H
#define __SESSION_H
+extern char *irssi_binary;
+
void session_set_binary(const char *path);
void session_upgrade(void);
diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs
index d5b9d6e8..8230e77f 100644
--- a/src/perl/common/Core.xs
+++ b/src/perl/common/Core.xs
@@ -3,6 +3,7 @@
#include "core.h"
#include "pidwait.h"
+#include "session.h"
#define DEFAULT_COMMAND_CATEGORY "Perl scripts' commands"
@@ -549,6 +550,13 @@ OUTPUT:
RETVAL
char *
+get_irssi_binary()
+CODE:
+ RETVAL = irssi_binary;
+OUTPUT:
+ RETVAL
+
+char *
version()
PREINIT:
char version[100];