summaryrefslogtreecommitdiff
path: root/protocols/Dummy/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Dummy/src/main.cpp')
-rw-r--r--protocols/Dummy/src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 906ee1182a..6a57644bf3 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -85,6 +85,12 @@ struct CMPlugin : public ACCPROTOPLUGIN<CDummyProto>
{
CMPlugin() :
ACCPROTOPLUGIN<CDummyProto>("Dummy")
- {}
+ {
+ int id = db_get_b(0, m_szModuleName, DUMMY_ID_TEMPLATE, -1);
+ if (id < 0 || id >= _countof(templates))
+ SetUniqueId(ptrA(db_get_sa(0, m_szModuleName, DUMMY_ID_SETTING)));
+ else
+ SetUniqueId(templates[id].setting);
+ }
}
g_plugin;