Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upChannel Management #2384
Conversation
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
I know it is failing right now because a file isn't being generated. I had this fixed once, now I'm trying to figure it out again. Any ideas?
|
I know it is failing right now because a file isn't being generated. I had this fixed once, now I'm trying to figure it out again. Any ideas? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
The first time this happened I had a mismatched tolua_begin and tolua_end
|
The first time this happened I had a mismatched tolua_begin and tolua_end |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
Figured it out. Code fails to compile with make -j4, but compiles fine with make.
|
Figured it out. Code fails to compile with |
madmaxoft
reviewed
Jul 23, 2015
View changes
src/Bindings/ManualBindings.cpp
madmaxoft
reviewed
Jul 23, 2015
View changes
src/ChannelManager.cpp
madmaxoft
reviewed
Jul 23, 2015
View changes
src/ChannelManager.cpp
madmaxoft
reviewed
Jul 23, 2015
View changes
src/ChannelManager.cpp
madmaxoft
reviewed
Jul 23, 2015
View changes
src/ChannelManager.h
madmaxoft
reviewed
Jul 23, 2015
View changes
src/ClientHandle.cpp
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
So what it looks like I am running into here is that by the time a file that requires the generated files is being processed, the files haven't had the time to generate, and so the build fails.
|
So what it looks like I am running into here is that by the time a file that requires the generated files is being processed, the files haven't had the time to generate, and so the build fails. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Which files are they? Perhaps a dependency can be added to cmake |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
Well, its the files generated by tolua. https://github.com/cuberite/cuberite/blob/master/src/Bindings/CMakeLists.txt#L50
|
Well, its the files generated by tolua. https://github.com/cuberite/cuberite/blob/master/src/Bindings/CMakeLists.txt#L50 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 23, 2015
Contributor
@worktycho suggested doing this to all files that require the generated files.
Edit: Isn't helping. *Insert frustrated noises here *
|
@worktycho suggested doing this to all files that require the generated files. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Yes! Got it! |
madmaxoft
reviewed
Jul 24, 2015
View changes
src/ChannelCallback.cpp
madmaxoft
reviewed
Jul 24, 2015
View changes
src/ChannelManager.h
madmaxoft
reviewed
Jul 24, 2015
View changes
src/ChannelManager.h
madmaxoft
reviewed
Jul 24, 2015
View changes
src/ChannelManager.h
madmaxoft
reviewed
Jul 24, 2015
View changes
src/ChannelManager.h
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 26, 2015
Contributor
Something separate from forge that I am working on. I'm just going to remove those from being exported.
|
Something separate from forge that I am working on. I'm just going to remove those from being exported. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
This good for me to squash? |
madmaxoft
reviewed
Jul 28, 2015
View changes
src/ClientHandle.h
madmaxoft
reviewed
Jul 28, 2015
View changes
src/ClientHandle.h
madmaxoft
reviewed
Jul 28, 2015
View changes
src/ChannelManager.h
madmaxoft
reviewed
Jul 28, 2015
View changes
src/ChannelManager.h
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Jul 28, 2015
Member
There's still something missing - the Lua API documentation. You've exported a new class and several functions, they need documentation.
Also, since this is a rather big topic, perhaps even an article on how to use plugin channels properly, with examples, would be in order.
|
There's still something missing - the Lua API documentation. You've exported a new class and several functions, they need documentation. Also, since this is a rather big topic, perhaps even an article on how to use plugin channels properly, with examples, would be in order. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 30, 2015
Contributor
Where do I need to put the Lua API documentation?
Also, is there a good tutorial for doxy comments?
|
Where do I need to put the Lua API documentation? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Jul 30, 2015
Member
Basically we use comments like this, nothing fancy:
/** Breaks the server. Returns the amount of screwups made.
a_ShouldExplode specifies whether the computer should explode while breaking the server. */
int BreakServer(bool a_ShouldExplode);The API documentation is in the APIDump plugin, $/MCServer/Plugins/APIDump/APIDesc.lua; some groups of classes are documented separately in the Classes subfolder and all hooks are documented in the Hooks subfolder. Articles are simple HTML files with other static files, declared at the bottom of the APIDesc.lua file.
Use the api console command to export the API into the $/MCServer/API folder, then apishow console command to open it in the browser. The plugin also dump all unexported symbols into the $/MCServer/API/_undocumented.lua file in a format suitable for direct copying into the APIDesc.lua file.
|
Basically we use comments like this, nothing fancy: /** Breaks the server. Returns the amount of screwups made.
a_ShouldExplode specifies whether the computer should explode while breaking the server. */
int BreakServer(bool a_ShouldExplode);The API documentation is in the APIDump plugin, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Did...did xoft just use humour? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Jul 30, 2015
Contributor
Hmmmm... must be pretty dry. I can't see it unless it's the fake comment he wrote.
|
Hmmmm... must be pretty dry. I can't see it unless it's the fake comment he wrote. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
tigerw
Jul 30, 2015
Member
That BreakServer thing. I'm not sure if I've ever seen a code-joke from xoft prior to this.
|
That BreakServer thing. I'm not sure if I've ever seen a code-joke from xoft prior to this. |
SamJBarney
added some commits
Aug 4, 2015
madmaxoft
reviewed
Aug 4, 2015
| @@ -0,0 +1,21 @@ | ||
| #include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Aug 4, 2015
Member
Usually we put a header comment into the file saying what it is and what it does, high-level. So:
// ChannelCallback.cpp
// Implements the cChannelCallback class representing the callbacks used for plugin channel management
madmaxoft
Aug 4, 2015
Member
Usually we put a header comment into the file saying what it is and what it does, high-level. So:
// ChannelCallback.cpp
// Implements the cChannelCallback class representing the callbacks used for plugin channel management
madmaxoft
reviewed
Aug 4, 2015
| { | ||
| int m_FnRef; | ||
| public: | ||
| cChannelCallback(cPluginLua & a_Plugin, int a_FnRef) : cPluginLua::cResettable(a_Plugin), m_FnRef(a_FnRef){} |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Aug 4, 2015
Contributor
The constructor or inheritance? I'm not sure which one you are requesting.
SamJBarney
Aug 4, 2015
Contributor
The constructor or inheritance? I'm not sure which one you are requesting.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
reviewed
Aug 4, 2015
View changes
src/Protocol/Protocol.h
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Aug 4, 2015
Member
The code could overall use a bit more comments, especially for the new classes.
|
The code could overall use a bit more comments, especially for the new classes. |
SamJBarney
added some commits
Aug 4, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Aug 4, 2015
Contributor
The comments will be put in place, along with the necessary documentation.
|
The comments will be put in place, along with the necessary documentation. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Any update on this one? |
madmaxoft
reviewed
Nov 6, 2015
| self->RegisterChannel(Channel, Callback); | ||
| // Cut away everything from the stack except for the cChannelManager reference; return that: | ||
| lua_settop(L, 1); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Nov 6, 2015
Member
I'm not sure if this works properly for nested (Lua-C++-Lua-C++) calls.
madmaxoft
Nov 6, 2015
Member
I'm not sure if this works properly for nested (Lua-C++-Lua-C++) calls.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Nov 9, 2015
Member
No, ignore my comment, I'm getting rusty in my C++-Lua bindings knowledge. Sorry.
madmaxoft
Nov 9, 2015
Member
No, ignore my comment, I'm getting rusty in my C++-Lua bindings knowledge. Sorry.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Nov 7, 2015
Contributor
Sorry @sphinxc0re, I've been busy with school. I'll see if I can get some time to work on it next week.
|
Sorry @sphinxc0re, I've been busy with school. I'll see if I can get some time to work on it next week. |
madmaxoft
reviewed
Nov 9, 2015
| if (!L.CheckParamString(2) || !L.CheckParamFunction(3)) | ||
| { | ||
| return 0; | ||
| } |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
madmaxoft
Nov 9, 2015
Member
Usually we group all these checks (CheckParam...) together at the function's start.
madmaxoft
Nov 9, 2015
Member
Usually we group all these checks (CheckParam...) together at the function's start.
madmaxoft
reviewed
Nov 9, 2015
| } | ||
| } | ||
| void cChannelManager::HandlePluginUnloading(const cPluginLua * a_Plugin) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bearbin
and others
added some commits
Nov 24, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
SamJBarney
Nov 24, 2015
Contributor
I could have swore I merged in the changes from master to my branch correctly...
|
I could have swore I merged in the changes from master to my branch correctly... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
grumble Gotta track down my comments that disappeared. |
SamJBarney commentedJul 23, 2015