mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
/SET autoignore_levels -> autoignore_level. Fixed a memory leak.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1285 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
432ac912c1
commit
95fb3f5623
@ -60,11 +60,10 @@ static void sig_flood(IRC_SERVER_REC *server, const char *nick, const char *host
|
|||||||
GString *mask;
|
GString *mask;
|
||||||
IGNORE_REC *rec;
|
IGNORE_REC *rec;
|
||||||
|
|
||||||
|
|
||||||
g_return_if_fail(IS_IRC_SERVER(server));
|
g_return_if_fail(IS_IRC_SERVER(server));
|
||||||
|
|
||||||
level = GPOINTER_TO_INT(levelp);
|
level = GPOINTER_TO_INT(levelp);
|
||||||
check_level = level2bits(settings_get_str("autoignore_levels"));
|
check_level = level2bits(settings_get_str("autoignore_level"));
|
||||||
|
|
||||||
mask = g_string_new(nick);
|
mask = g_string_new(nick);
|
||||||
mask = g_string_append_c(mask, '!');
|
mask = g_string_append_c(mask, '!');
|
||||||
@ -76,12 +75,13 @@ static void sig_flood(IRC_SERVER_REC *server, const char *nick, const char *host
|
|||||||
else
|
else
|
||||||
autoignore_update(rec, level);
|
autoignore_update(rec, level);
|
||||||
}
|
}
|
||||||
|
g_string_free(mask, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void autoignore_init(void)
|
void autoignore_init(void)
|
||||||
{
|
{
|
||||||
settings_add_int("flood", "autoignore_time", 300);
|
settings_add_int("flood", "autoignore_time", 300);
|
||||||
settings_add_str("flood", "autoignore_levels", "");
|
settings_add_str("flood", "autoignore_level", "");
|
||||||
|
|
||||||
signal_add("flood", (SIGNAL_FUNC) sig_flood);
|
signal_add("flood", (SIGNAL_FUNC) sig_flood);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user