summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/completion.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-04 12:38:28 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-04 12:38:28 +0000
commit856273754804e6959f086ac75932ffa77eb39a8a (patch)
treefc99f2e921d5dd131acf0bad59b990c065605906 /src/fe-common/irc/completion.c
parent1a541c149d24c827d5145e87c7ecb7951fb46bd3 (diff)
downloadirssi-856273754804e6959f086ac75932ffa77eb39a8a.zip
completion_msgtoyou() -> irc_nick_match()
Implemented -replies option to /ignore. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@287 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/completion.c')
-rw-r--r--src/fe-common/irc/completion.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/fe-common/irc/completion.c b/src/fe-common/irc/completion.c
index b710dd67..140bdd1f 100644
--- a/src/fe-common/irc/completion.c
+++ b/src/fe-common/irc/completion.c
@@ -177,7 +177,7 @@ static void event_privmsg(gchar *data, IRC_SERVER_REC *server, gchar *nick)
return;
}
- list = completion_msgtoyou((SERVER_REC *) server, msg) ?
+ list = irc_nick_match(server->nick, msg) ?
&channel->lastownmsgs :
&channel->lastmsgs;
nick_completion_create(list, time(NULL), nick);
@@ -207,31 +207,6 @@ static void cmd_msg(gchar *data, IRC_SERVER_REC *server)
g_free(params);
}
-int completion_msgtoyou(SERVER_REC *server, const char *msg)
-{
- gchar *stripped, *nick;
- gboolean ret;
- gint len;
-
- g_return_val_if_fail(msg != NULL, FALSE);
-
- if (g_strncasecmp(msg, server->nick, strlen(server->nick)) == 0 &&
- !isalnum((gint) msg[strlen(server->nick)])) return TRUE;
-
- stripped = nick_strip(server->nick);
- nick = nick_strip(msg);
-
- len = strlen(stripped);
- ret = *stripped != '\0' &&
- g_strncasecmp(nick, stripped, len) == 0 &&
- !isalnum((gint) nick[len]) &&
- (guchar) nick[len] < 128;
-
- g_free(nick);
- g_free(stripped);
- return ret;
-}
-
static void complete_list(GList **outlist, GSList *list, gchar *nick)
{
GSList *tmp;