Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddiO committed Nov 10, 2024
1 parent 2f5f6e8 commit edc3177
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
32 changes: 16 additions & 16 deletions src/fwens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ void Fwens::NotifyLuaSteamConnectionEvent(bool connected)
LUA->PushSpecial(GarrysMod::Lua::SPECIAL_GLOB);
LUA->GetField(-1, "hook");
LUA->GetField(-1, "Run");
LUA->PushString("GroupDataSteamStatusChanged");
LUA->PushBool(connected);
LUA->PushString("GroupDataSteamStatusChanged");
LUA->PushBool(connected);

int returnValue = LUA->PCall(2, 0, 0);
if (returnValue != 0)
Expand All @@ -77,8 +77,8 @@ void Fwens::NotifyLuaSteamConnectionEvent(bool connected)

LUA->PushSpecial(GarrysMod::Lua::SPECIAL_GLOB);
LUA->GetField(-1, "ErrorNoHalt");
LUA->Push(-3);
LUA->PushString("\n");
LUA->Push(-3);
LUA->PushString("\n");
LUA->Call(2, 0);
}

Expand Down Expand Up @@ -133,20 +133,20 @@ void Fwens::Steam_HandleGroupRequest(GSClientGroupStatus_t* pCallback)
LUA->PushSpecial(GarrysMod::Lua::SPECIAL_GLOB);
LUA->GetField(-1, "hook");
LUA->GetField(-1, "Run");
LUA->PushString("GroupDataReturned");
LUA->PushString("GroupDataReturned");

LUA->CreateTable();
LUA->PushBool(pCallback->m_bMember);
LUA->SetField(-2, "isMember");
LUA->CreateTable();
LUA->PushBool(pCallback->m_bMember);
LUA->SetField(-2, "isMember");

LUA->PushBool(pCallback->m_bOfficer);
LUA->SetField(-2, "isOfficer");
LUA->PushBool(pCallback->m_bOfficer);
LUA->SetField(-2, "isOfficer");

LUA->PushString(userBuffer);
LUA->SetField(-2, "steamID64");
LUA->PushString(userBuffer);
LUA->SetField(-2, "steamID64");

LUA->PushString(groupBuffer);
LUA->SetField(-2, "groupID64");
LUA->PushString(groupBuffer);
LUA->SetField(-2, "groupID64");

int returnValue = LUA->PCall(2, 0, 0);
if (returnValue != 0)
Expand All @@ -157,8 +157,8 @@ void Fwens::Steam_HandleGroupRequest(GSClientGroupStatus_t* pCallback)

LUA->PushSpecial(GarrysMod::Lua::SPECIAL_GLOB);
LUA->GetField(-1, "ErrorNoHalt");
LUA->Push(-3);
LUA->PushString("\n");
LUA->Push(-3);
LUA->PushString("\n");
LUA->Call(2, 0);
}

Expand Down
16 changes: 8 additions & 8 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ GMOD_MODULE_OPEN()
LUA->PushSpecial(SPECIAL_GLOB);
LUA->CreateTable();

LUA->PushCFunction(GetInSteamGroup);
LUA->SetField(-2, "GetInSteamGroup");
LUA->PushCFunction(GetInSteamGroup);
LUA->SetField(-2, "GetInSteamGroup");

LUA->PushString(GFWENS_VERSION);
LUA->SetField(-2, "version");
LUA->PushString(GFWENS_VERSION);
LUA->SetField(-2, "version");

LUA->SetField(-2, "fwens");
LUA->SetField(-2, "fwens");

LUA->GetField(-1, "print");
LUA->PushString(versionBuffer);
LUA->Call(1, 0);
LUA->GetField(-1, "print");
LUA->PushString(versionBuffer);
LUA->Call(1, 0);
LUA->Pop();

Fwens* fwenVar = Fwens::GetInstance();
Expand Down

0 comments on commit edc3177

Please sign in to comment.