summaryrefslogtreecommitdiff
path: root/src/core/nicklist.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-01-28 01:45:31 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-01-28 01:45:31 +0000
commit4cbabe2a83541fec27679cfd23fb460af279c84e (patch)
treea7edea79e06a7e91016c5d9a0701b5b2bf970ef4 /src/core/nicklist.c
parentdb03c25952ba36c42bf9b74ccbc980bd3212ad2d (diff)
downloadirssi-4cbabe2a83541fec27679cfd23fb460af279c84e.zip
nicklist_find() now finds only full nicks, nicklist_find_mask() finds
nick masks. This fixes *a* and similiar emphasis where irssi tried to find nick mask *a* instead of nick *a*. Also, emphasis with highascii didn't work unless emphasis_multiword was set ON. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1143 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/nicklist.c')
-rw-r--r--src/core/nicklist.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/nicklist.c b/src/core/nicklist.c
index fe2a2842..4014afc1 100644
--- a/src/core/nicklist.c
+++ b/src/core/nicklist.c
@@ -156,8 +156,17 @@ GSList *nicklist_find_multiple(CHANNEL_REC *channel, const char *mask)
return nicks;
}
-/* Find nick record from list */
-NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *mask)
+/* Find nick */
+NICK_REC *nicklist_find(CHANNEL_REC *channel, const char *nick)
+{
+ g_return_val_if_fail(IS_CHANNEL(channel), NULL);
+ g_return_val_if_fail(nick != NULL, NULL);
+
+ return g_hash_table_lookup(channel->nicks, nick);
+}
+
+/* Find nick mask, wildcards allowed */
+NICK_REC *nicklist_find_mask(CHANNEL_REC *channel, const char *mask)
{
NICK_REC *nickrec;
char *nick, *host;