summaryrefslogtreecommitdiff
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'Plugins')
-rw-r--r--Plugins/historylog/Docs/historylog_changelog.txt5
-rw-r--r--Plugins/historylog/Docs/historylog_version.txt2
-rw-r--r--Plugins/historylog/commons.h1
-rw-r--r--Plugins/historylog/historylog.cpp14
4 files changed, 19 insertions, 3 deletions
diff --git a/Plugins/historylog/Docs/historylog_changelog.txt b/Plugins/historylog/Docs/historylog_changelog.txt
index c9a3560..9364a32 100644
--- a/Plugins/historylog/Docs/historylog_changelog.txt
+++ b/Plugins/historylog/Docs/historylog_changelog.txt
@@ -2,6 +2,11 @@ History Log
Changelog:
+. 0.0.0.5
+ * Fix for crash
+ * Fix for enable not working
+ + Added highlighted messages as a separated meSpeak template
+
. 0.0.0.4
+ Added option to speak texts
* Per default disk log is disabled
diff --git a/Plugins/historylog/Docs/historylog_version.txt b/Plugins/historylog/Docs/historylog_version.txt
index c86db41..156e3d8 100644
--- a/Plugins/historylog/Docs/historylog_version.txt
+++ b/Plugins/historylog/Docs/historylog_version.txt
@@ -1 +1 @@
-HistoryLog 0.0.0.4 \ No newline at end of file
+HistoryLog 0.0.0.5 \ No newline at end of file
diff --git a/Plugins/historylog/commons.h b/Plugins/historylog/commons.h
index 7f67a8a..9dc692f 100644
--- a/Plugins/historylog/commons.h
+++ b/Plugins/historylog/commons.h
@@ -104,6 +104,7 @@ static struct
CHAT_EVENTS[] =
{
{ GC_EVENT_MESSAGE, _T("Message"), _T("* %nick%: %text%") },
+ { GC_EVENT_MESSAGE, _T("Highlighted Message"), _T("* %nick%: %text%") },
{ GC_EVENT_ACTION, _T("Action"), _T("* %nick% %text%") },
{ GC_EVENT_JOIN, _T("User joined"), _T("> %nick% has joined") },
{ GC_EVENT_PART, _T("User left"), _T("< %nick% has left (%text_sl%)"), _T("< %nick% has left") },
diff --git a/Plugins/historylog/historylog.cpp b/Plugins/historylog/historylog.cpp
index 4360a7f..9ad29e4 100644
--- a/Plugins/historylog/historylog.cpp
+++ b/Plugins/historylog/historylog.cpp
@@ -33,7 +33,7 @@ PLUGININFOEX pluginInfo={
#else
"History Log",
#endif
- PLUGIN_MAKE_VERSION(0,0,0,4),
+ PLUGIN_MAKE_VERSION(0,0,0,5),
"Logs history events to disk on the fly and speaks then",
"Ricardo Pescuma Domenecci",
"",
@@ -108,6 +108,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
{
pluginLink = link;
+ CHECK_VERSION("History Log")
+
if (!ServiceExists(MS_HISTORYEVENTS_GET_TEXT))
{
MessageBox(NULL, _T("History Log depends on History Events to work!"), _T("History Log"), MB_OK | MB_ICONASTERISK);
@@ -665,6 +667,9 @@ void ProcessEvent(HANDLE hDbEvent, void *param)
else if (dbe.eventType == EVENTTYPE_FILE)
Speak_SayExWT("file", hContact, dbe.flags & DBEF_SENT ? 0 : 1, vars, MAX_REGS(vars));
+ if (!opts.disk_log_enabled)
+ return;
+
if (!IsProtocolEnabled(proto))
return;
@@ -787,6 +792,9 @@ void ProcessChat(HANDLE hDummy, void *param)
return;
ChatMsg *msg = (ChatMsg *) param;
+
+ BOOL highlight = (msg->type & GC_EVENT_HIGHLIGHT) != 0;
+
msg->type = msg->type & ~GC_EVENT_HIGHLIGHT;
msg->text.trim();
@@ -846,10 +854,12 @@ void ProcessChat(HANDLE hDummy, void *param)
for(i = 0; i < MAX_REGS(CHAT_EVENTS); i++)
if (msg->type == CHAT_EVENTS[i].type)
break;
+ if (CHAT_EVENTS[i].type == GC_EVENT_MESSAGE && highlight)
+ i++;
if (i < MAX_REGS(CHAT_EVENTS))
Speak_SayExWT("groupchat", NULL, i, vars, MAX_REGS(vars));
- if (IsChatProtocolEnabled(msg->proto.str) && IsChatEventEnabled(msg->type))
+ if (opts.chat_disk_log_enabled && IsChatProtocolEnabled(msg->proto.str) && IsChatEventEnabled(msg->type))
{
Buffer<TCHAR> text;
text.append(_T("["));