summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@slbdata.se>2011-04-03 18:56:06 (GMT)
committerSamuel Lidén Borell <samuel@slbdata.se>2011-04-03 18:56:06 (GMT)
commitb8ec1a473f9b12f31d42bc4a1a832e9790561294 (patch)
treeb41828f9ec30a2c7a5f16baabbd4f6f3d5ffceb2
parent0c42fc2fb03ac41b30b8305b4c0117562173b47f (diff)
downloadfishlim-b8ec1a473f9b12f31d42bc4a1a832e9790561294.zip
fishlim-b8ec1a473f9b12f31d42bc4a1a832e9790561294.tar.gz
fishlim-b8ec1a473f9b12f31d42bc4a1a832e9790561294.tar.bz2
Fix highlighting of own nick
-rw-r--r--LICENSE2
-rw-r--r--README3
-rw-r--r--xchat_plugin.c10
3 files changed, 9 insertions, 6 deletions
diff --git a/LICENSE b/LICENSE
index f40a626..427f263 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
-Copyright (c) 2010 Samuel Lidén Borell <samuel@slbdata.se>
+Copyright (c) 2010-2011 Samuel Lidén Borell <samuel@slbdata.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README b/README
index 5895e75..7c44d10 100644
--- a/README
+++ b/README
@@ -27,6 +27,7 @@ Not working:
* Remote exploitation (hopefully!)
Known issues:
- * Nickname highlighting in XChat does not work with encrypted channels
+ * Highlighting of extra words (other than the nick) does not work with
+ encrypted channels
diff --git a/xchat_plugin.c b/xchat_plugin.c
index 052ebce..0f2eb08 100644
--- a/xchat_plugin.c
+++ b/xchat_plugin.c
@@ -1,6 +1,6 @@
/*
- Copyright (c) 2010 Samuel Lidén Borell <samuel@slbdata.se>
+ Copyright (c) 2010-2011 Samuel Lidén Borell <samuel@slbdata.se>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -39,7 +39,7 @@
static const char *plugin_name = "FiSHLiM";
static const char *plugin_desc = "Encryption plugin for the FiSH protocol. Less is More!";
-static const char *plugin_version = "0.0.8";
+static const char *plugin_version = "0.0.9";
static xchat_plugin *ph;
@@ -134,8 +134,10 @@ static int handle_incoming(char *word[], char *word_eol[], void *userdata) {
free(decrypted);
// Display message
- // TODO Check if user modes and highlighting work when the parameters are NULL
- xchat_emit_print(ph, "Channel Message", sender_nick, message, NULL);
+ // TODO highlight extra words also, not just the nick (how to do this?)
+ const char *event = (strstr(message, xchat_get_info(ph, "nick")) != NULL ?
+ "Channel Msg Hilight" : "Channel Message");
+ xchat_emit_print(ph, event, sender_nick, message, NULL);
free(message);
free(sender_nick);
return XCHAT_EAT_XCHAT;