summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/channels-query.c54
-rw-r--r--src/irc/core/irc-channels.h2
-rw-r--r--src/irc/core/mode-lists.c106
-rw-r--r--src/irc/core/modes.c13
4 files changed, 0 insertions, 175 deletions
diff --git a/src/irc/core/channels-query.c b/src/irc/core/channels-query.c
index 035eaa4a..e1bd12bd 100644
--- a/src/irc/core/channels-query.c
+++ b/src/irc/core/channels-query.c
@@ -254,24 +254,6 @@ static void query_send(IRC_SERVER_REC *server, int query)
"", "chanquery abort", NULL);
break;
- case CHANNEL_QUERY_EMODE:
- cmd = g_strdup_printf("MODE %s e", chanstr_commas);
- server_redirect_event(server, "mode e", count, chanstr, -1,
- "chanquery abort",
- "event 348", "chanquery eban",
- "event 349", "chanquery eban end",
- "", "chanquery abort", NULL);
- break;
-
- case CHANNEL_QUERY_IMODE:
- cmd = g_strdup_printf("MODE %s I", chanstr_commas);
- server_redirect_event(server, "mode I", count, chanstr, -1,
- "chanquery abort",
- "event 346", "chanquery ilist",
- "event 347", "chanquery ilist end",
- "", "chanquery abort", NULL);
- break;
-
default:
cmd = NULL;
}
@@ -503,38 +485,6 @@ static void event_end_of_banlist(IRC_SERVER_REC *server, const char *data)
g_free(params);
}
-static void event_end_of_ebanlist(IRC_SERVER_REC *server, const char *data)
-{
- IRC_CHANNEL_REC *chanrec;
- char *params, *channel;
-
- g_return_if_fail(data != NULL);
-
- params = event_get_params(data, 2, NULL, &channel);
- chanrec = irc_channel_find(server, channel);
-
- if (chanrec != NULL)
- channel_got_query(chanrec, CHANNEL_QUERY_EMODE);
-
- g_free(params);
-}
-
-static void event_end_of_invitelist(IRC_SERVER_REC *server, const char *data)
-{
- IRC_CHANNEL_REC *chanrec;
- char *params, *channel;
-
- g_return_if_fail(data != NULL);
-
- params = event_get_params(data, 2, NULL, &channel);
- chanrec = irc_channel_find(server, channel);
-
- if (chanrec != NULL)
- channel_got_query(chanrec, CHANNEL_QUERY_IMODE);
-
- g_free(params);
-}
-
void channels_query_init(void)
{
settings_add_bool("misc", "channel_sync", TRUE);
@@ -547,9 +497,7 @@ void channels_query_init(void)
signal_add("chanquery mode", (SIGNAL_FUNC) event_channel_mode);
signal_add("chanquery who end", (SIGNAL_FUNC) event_end_of_who);
- signal_add("chanquery eban end", (SIGNAL_FUNC) event_end_of_ebanlist);
signal_add("chanquery ban end", (SIGNAL_FUNC) event_end_of_banlist);
- signal_add("chanquery ilist end", (SIGNAL_FUNC) event_end_of_invitelist);
signal_add("chanquery abort", (SIGNAL_FUNC) query_current_error);
}
@@ -563,8 +511,6 @@ void channels_query_deinit(void)
signal_remove("chanquery mode", (SIGNAL_FUNC) event_channel_mode);
signal_remove("chanquery who end", (SIGNAL_FUNC) event_end_of_who);
- signal_remove("chanquery eban end", (SIGNAL_FUNC) event_end_of_ebanlist);
signal_remove("chanquery ban end", (SIGNAL_FUNC) event_end_of_banlist);
- signal_remove("chanquery ilist end", (SIGNAL_FUNC) event_end_of_invitelist);
signal_remove("chanquery abort", (SIGNAL_FUNC) query_current_error);
}
diff --git a/src/irc/core/irc-channels.h b/src/irc/core/irc-channels.h
index a00b0a49..13a61908 100644
--- a/src/irc/core/irc-channels.h
+++ b/src/irc/core/irc-channels.h
@@ -16,8 +16,6 @@ struct _IRC_CHANNEL_REC {
#include "channel-rec.h"
GSList *banlist; /* list of bans */
- GSList *ebanlist; /* list of ban exceptions */
- GSList *invitelist; /* invite list */
time_t massjoin_start; /* Massjoin start time */
int massjoins; /* Number of nicks waiting for massjoin signal.. */
diff --git a/src/irc/core/mode-lists.c b/src/irc/core/mode-lists.c
index 71fba750..8d0a9eab 100644
--- a/src/irc/core/mode-lists.c
+++ b/src/irc/core/mode-lists.c
@@ -94,81 +94,12 @@ void banlist_remove(IRC_CHANNEL_REC *channel, const char *ban)
}
}
-BAN_REC *banlist_exception_add(IRC_CHANNEL_REC *channel, const char *ban,
- const char *nick, time_t time)
-{
- BAN_REC *rec;
-
- g_return_val_if_fail(channel != NULL, NULL);
- g_return_val_if_fail(ban != NULL, NULL);
-
- rec = g_new(BAN_REC, 1);
- rec->ban = g_strdup(ban);
- rec->setby = nick == NULL || *nick == '\0' ? NULL :
- g_strdup(nick);
- rec->time = time;
-
- channel->ebanlist = g_slist_append(channel->ebanlist, rec);
-
- signal_emit("ban exception new", 2, channel, rec);
- return rec;
-}
-
-void banlist_exception_remove(IRC_CHANNEL_REC *channel, const char *ban)
-{
- BAN_REC *rec;
-
- g_return_if_fail(channel != NULL);
- g_return_if_fail(ban != NULL);
-
- rec = banlist_find(channel->ebanlist, ban);
- if (rec != NULL) {
- signal_emit("ban exception remove", 2, channel, rec);
- ban_free(&channel->ebanlist, rec);
- }
-}
-
-static void invitelist_free(IRC_CHANNEL_REC *channel)
-{
- g_return_if_fail(channel != NULL);
-
- g_slist_foreach(channel->invitelist, (GFunc) g_free, NULL);
- g_slist_free(channel->invitelist);
-}
-
-void invitelist_add(IRC_CHANNEL_REC *channel, const char *mask)
-{
- g_return_if_fail(channel != NULL);
- g_return_if_fail(mask != NULL);
-
- channel->invitelist = g_slist_append(channel->invitelist, g_strdup(mask));
-
- signal_emit("invitelist new", 2, channel, mask);
-}
-
-void invitelist_remove(IRC_CHANNEL_REC *channel, const char *mask)
-{
- GSList *tmp;
-
- g_return_if_fail(channel != NULL);
- g_return_if_fail(mask != NULL);
-
- tmp = gslist_find_icase_string(channel->invitelist, mask);
- if (tmp == NULL) return;
-
- signal_emit("invitelist remove", 2, channel, tmp->data);
- g_free(tmp->data);
- channel->invitelist = g_slist_remove(channel->invitelist, tmp->data);
-}
-
static void channel_destroyed(IRC_CHANNEL_REC *channel)
{
if (!IS_IRC_CHANNEL(channel))
return;
banlist_free(channel->banlist);
- banlist_free(channel->ebanlist);
- invitelist_free(channel);
}
static void event_banlist(IRC_SERVER_REC *server, const char *data)
@@ -188,46 +119,11 @@ static void event_banlist(IRC_SERVER_REC *server, const char *data)
g_free(params);
}
-static void event_ebanlist(IRC_SERVER_REC *server, const char *data)
-{
- IRC_CHANNEL_REC *chanrec;
- char *params, *channel, *ban, *setby, *tims;
- time_t tim;
-
- g_return_if_fail(data != NULL);
-
- params = event_get_params(data, 5, NULL, &channel, &ban, &setby, &tims);
- chanrec = irc_channel_find(server, channel);
- if (chanrec != NULL) {
- tim = (time_t) atol(tims);
- banlist_exception_add(chanrec, ban, setby, tim);
- }
- g_free(params);
-}
-
-static void event_invite_list(IRC_SERVER_REC *server, const char *data)
-{
- IRC_CHANNEL_REC *chanrec;
- char *params, *channel, *invite;
-
- g_return_if_fail(data != NULL);
-
- params = event_get_params(data, 3, NULL, &channel, &invite);
- chanrec = irc_channel_find(server, channel);
-
- if (chanrec != NULL)
- invitelist_add(chanrec, invite);
-
- g_free(params);
-}
-
void mode_lists_init(void)
{
signal_add("channel destroyed", (SIGNAL_FUNC) channel_destroyed);
signal_add("chanquery ban", (SIGNAL_FUNC) event_banlist);
- signal_add("chanquery eban", (SIGNAL_FUNC) event_ebanlist);
- signal_add("chanquery ilist", (SIGNAL_FUNC) event_invite_list);
}
void mode_lists_deinit(void)
@@ -235,6 +131,4 @@ void mode_lists_deinit(void)
signal_remove("channel destroyed", (SIGNAL_FUNC) channel_destroyed);
signal_remove("chanquery ban", (SIGNAL_FUNC) event_banlist);
- signal_remove("chanquery eban", (SIGNAL_FUNC) event_ebanlist);
- signal_remove("chanquery ilist", (SIGNAL_FUNC) event_invite_list);
}
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index 1a198db2..9c73afe3 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -232,19 +232,6 @@ void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby,
else
banlist_remove(channel, arg);
break;
- case 'e':
- if (type == '+')
- banlist_exception_add(channel, arg, setby,
- time(NULL));
- else
- banlist_exception_remove(channel, arg);
- break;
- case 'I':
- if (type == '+')
- invitelist_add(channel, arg);
- else
- invitelist_remove(channel, arg);
- break;
case 'o':
case 'O': /* channel owner in !channels */