mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 02:22:36 +02:00
remove unused variables in irc/notifylist
This commit is contained in:
parent
56123e1929
commit
4de7fdd73a
2 changed files with 6 additions and 14 deletions
|
|
@ -285,19 +285,17 @@ static void ison_check_parts(IRC_SERVER_REC *server)
|
||||||
static void event_ison(IRC_SERVER_REC *server, const char *data)
|
static void event_ison(IRC_SERVER_REC *server, const char *data)
|
||||||
{
|
{
|
||||||
MODULE_SERVER_REC *mserver;
|
MODULE_SERVER_REC *mserver;
|
||||||
char *params, *online;
|
char *online;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 2, NULL, &online);
|
event_get_params(data, 2, NULL, &online);
|
||||||
|
|
||||||
mserver = MODULE_DATA(server);
|
mserver = MODULE_DATA(server);
|
||||||
ison_save_users(mserver, online);
|
ison_save_users(mserver, online);
|
||||||
|
|
||||||
if (--mserver->ison_count > 0) {
|
if (--mserver->ison_count > 0) {
|
||||||
/* wait for the rest of the /ISON replies */
|
|
||||||
g_free(params);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -308,8 +306,6 @@ static void event_ison(IRC_SERVER_REC *server, const char *data)
|
||||||
g_slist_foreach(mserver->ison_tempusers, (GFunc) g_free, NULL);
|
g_slist_foreach(mserver->ison_tempusers, (GFunc) g_free, NULL);
|
||||||
g_slist_free(mserver->ison_tempusers);
|
g_slist_free(mserver->ison_tempusers);
|
||||||
mserver->ison_tempusers = NULL;
|
mserver->ison_tempusers = NULL;
|
||||||
|
|
||||||
g_free(params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_settings(void)
|
static void read_settings(void)
|
||||||
|
|
|
||||||
|
|
@ -32,19 +32,18 @@ static char *last_notify_nick;
|
||||||
|
|
||||||
static void event_whois(IRC_SERVER_REC *server, const char *data)
|
static void event_whois(IRC_SERVER_REC *server, const char *data)
|
||||||
{
|
{
|
||||||
char *params, *nick, *user, *host, *realname;
|
char *nick, *user, *host, *realname;
|
||||||
NOTIFY_NICK_REC *nickrec;
|
NOTIFY_NICK_REC *nickrec;
|
||||||
NOTIFYLIST_REC *notify;
|
NOTIFYLIST_REC *notify;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
g_return_if_fail(server != NULL);
|
g_return_if_fail(server != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 6, NULL, &nick, &user, &host, NULL, &realname);
|
event_get_params(data, 6, NULL, &nick, &user, &host, NULL, &realname);
|
||||||
|
|
||||||
notify = notifylist_find(nick, server->connrec->chatnet);
|
notify = notifylist_find(nick, server->connrec->chatnet);
|
||||||
if (notify != NULL && !mask_match(SERVER(server), notify->mask, nick, user, host)) {
|
if (notify != NULL && !mask_match(SERVER(server), notify->mask, nick, user, host)) {
|
||||||
/* user or host didn't match */
|
/* user or host didn't match */
|
||||||
g_free(params);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,25 +63,22 @@ static void event_whois(IRC_SERVER_REC *server, const char *data)
|
||||||
nickrec->away = FALSE;
|
nickrec->away = FALSE;
|
||||||
nickrec->host_ok = TRUE;
|
nickrec->host_ok = TRUE;
|
||||||
}
|
}
|
||||||
g_free(params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_whois_away(IRC_SERVER_REC *server, const char *data)
|
static void event_whois_away(IRC_SERVER_REC *server, const char *data)
|
||||||
{
|
{
|
||||||
NOTIFY_NICK_REC *nickrec;
|
NOTIFY_NICK_REC *nickrec;
|
||||||
char *params, *nick, *awaymsg;
|
char *nick, *awaymsg;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
event_get_params(data, 3, NULL, &nick, &awaymsg);
|
||||||
|
|
||||||
nickrec = notify_nick_find(server, nick);
|
nickrec = notify_nick_find(server, nick);
|
||||||
if (nickrec != NULL) {
|
if (nickrec != NULL) {
|
||||||
nickrec->awaymsg = g_strdup(awaymsg);
|
nickrec->awaymsg = g_strdup(awaymsg);
|
||||||
nickrec->away = TRUE;
|
nickrec->away = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free(params);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All WHOIS replies got, now announce all the changes at once. */
|
/* All WHOIS replies got, now announce all the changes at once. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue