summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/window-commands.c8
-rw-r--r--src/irc/Makefile.am6
-rw-r--r--src/irc/core/server-setup.c3
3 files changed, 13 insertions, 4 deletions
diff --git a/src/fe-common/core/window-commands.c b/src/fe-common/core/window-commands.c
index 507cfe90..d6207d0e 100644
--- a/src/fe-common/core/window-commands.c
+++ b/src/fe-common/core/window-commands.c
@@ -143,11 +143,15 @@ static void cmd_window_prev(void)
static void cmd_window_level(const char *data)
{
+ char *level;
+
g_return_if_fail(data != NULL);
window_set_level(active_win, combine_level(active_win->level, data));
- printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Window level is now %s",
- bits2level(active_win->level));
+
+ level = bits2level(active_win->level);
+ printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Window level is now %s", level);
+ g_free(level);
}
static void cmd_window_server(const char *data)
diff --git a/src/irc/Makefile.am b/src/irc/Makefile.am
index dbfe6997..e308a7dc 100644
--- a/src/irc/Makefile.am
+++ b/src/irc/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = core bot dcc flood notifylist
+if BUILD_IRSSIBOT
+BOT=bot
+endif
+
+SUBDIRS = core $(BOT) dcc flood notifylist
noinst_LTLIBRARIES = libirc.la
diff --git a/src/irc/core/server-setup.c b/src/irc/core/server-setup.c
index 66c0a932..296a52b2 100644
--- a/src/irc/core/server-setup.c
+++ b/src/irc/core/server-setup.c
@@ -43,7 +43,8 @@ static void get_source_host_ip(void)
source_host_ok = *settings_get_str("hostname") != '\0' &&
net_gethostbyname(settings_get_str("hostname"), &ip) == 0;
if (source_host_ok) {
- source_host_ip = g_new(IPADDR, 1);
+ if (source_host_ip == NULL)
+ source_host_ip = g_new(IPADDR, 1);
memcpy(source_host_ip, &ip, sizeof(IPADDR));
}
}