summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-12-31 16:39:13 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-12-31 16:39:13 +0000
commitec3799465bc97a61ad3291875abf39f10fb1bebd (patch)
tree266a9dbb6a1bcc45aeb9fcea8b8647ad150c9ecf /plugins
parent9c34f77ebf742ae0d13df3e43581fe86e0d85d5e (diff)
MirLua: fixed script loading
git-svn-id: http://svn.miranda-ng.org/main/trunk@15978 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MirLua/src/m_database.cpp15
-rw-r--r--plugins/MirLua/src/m_protocols.cpp12
-rw-r--r--plugins/MirLua/src/mlua_script.cpp2
3 files changed, 17 insertions, 12 deletions
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp
index c631715c49..7eaaba3a8b 100644
--- a/plugins/MirLua/src/m_database.cpp
+++ b/plugins/MirLua/src/m_database.cpp
@@ -42,7 +42,7 @@ static int lua_ContactIterator(lua_State *L)
return 1;
}
-static int lua_AllContacts(lua_State *L)
+static int lua_Contacts(lua_State *L)
{
const char *szProto = lua_tostring(L, 1);
@@ -176,7 +176,7 @@ static int lua_EventIterator(lua_State *L)
return 1;
}
-static int lua_AllEvents(lua_State *L)
+static int lua_Events(lua_State *L)
{
MCONTACT hContact = luaL_checkinteger(L, 1);
@@ -208,7 +208,7 @@ static int lua_EventReverseIterator(lua_State *L)
return 1;
}
-static int lua_AllEventsFromEnd(lua_State *L)
+static int lua_EventsFromEnd(lua_State *L)
{
MCONTACT hContact = luaL_checkinteger(L, 1);
@@ -548,7 +548,8 @@ static luaL_Reg databaseApi[] =
{
{ "FindFirstContact", lua_FindFirstContact },
{ "FindNextContact", lua_FindNextContact },
- { "AllContacts", lua_AllContacts },
+ { "AllContacts", lua_Contacts },
+ { "Contacts", lua_Contacts },
{ "GetEventCount", lua_GetEventCount },
@@ -556,8 +557,10 @@ static luaL_Reg databaseApi[] =
{ "GetPrevEvent", lua_GetPrevEvent },
{ "GetNextEvent", lua_GetNextEvent },
{ "GetLastEvent", lua_GetLastEvent },
- { "AllEvents", lua_AllEvents },
- { "AllEventsFromEnd", lua_AllEventsFromEnd },
+ { "AllEvents", lua_Events },
+ { "Events", lua_Events },
+ { "AllEventsFromEnd", lua_EventsFromEnd },
+ { "EventsFromEnd", lua_EventsFromEnd },
{ "GetEvent", lua_GetEvent },
diff --git a/plugins/MirLua/src/m_protocols.cpp b/plugins/MirLua/src/m_protocols.cpp
index 530f4343a4..ecbfe477b8 100644
--- a/plugins/MirLua/src/m_protocols.cpp
+++ b/plugins/MirLua/src/m_protocols.cpp
@@ -44,7 +44,7 @@ static int lua_ProtocolIterator(lua_State *L)
return 1;
}
-static int lua_AllProtocols(lua_State *L)
+static int lua_Protocols(lua_State *L)
{
int count;
PROTOCOLDESCRIPTOR** protos;
@@ -145,7 +145,7 @@ static int lua_AccountIterator(lua_State *L)
return 1;
}
-static int lua_AllAccounts(lua_State *L)
+static int lua_Accounts(lua_State *L)
{
int count;
PROTOACCOUNT** accounts;
@@ -307,12 +307,14 @@ static luaL_Reg protocolsApi[] =
{
{ "GetProto", lua_GetProtocol },
{ "GetProtocol", lua_GetProtocol },
- { "AllProtos", lua_AllProtocols },
- { "AllProtocols", lua_AllProtocols },
+ { "AllProtos", lua_Protocols },
+ { "AllProtocols", lua_Protocols },
+ { "Protocols", lua_Protocols },
{ "EnumProtos", lua_EnumProtos },
{ "GetAccount", lua_GetAccount },
- { "AllAccounts", lua_AllAccounts },
+ { "AllAccounts", lua_Accounts },
+ { "Accounts", lua_Accounts },
{ "EnumAccounts", lua_EnumAccounts },
{ "OnProtoAck", lua_OnProtoAck },
diff --git a/plugins/MirLua/src/mlua_script.cpp b/plugins/MirLua/src/mlua_script.cpp
index 3ddbbd8a15..8eae3b4239 100644
--- a/plugins/MirLua/src/mlua_script.cpp
+++ b/plugins/MirLua/src/mlua_script.cpp
@@ -42,7 +42,7 @@ bool CMLuaScript::Load()
return false;
}
- if (luaM_pcall(L))
+ if (luaM_pcall(L, 0, 1))
return false;
isLoaded = true;