Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
K'van
Tales of MajEyal
Commits
0c65651d
Commit
0c65651d
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
handke push code return
parent
b4cb9b20
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/PlayerProfile.lua
+6
-1
6 additions, 1 deletion
game/engines/default/engine/PlayerProfile.lua
game/profile-thread/Client.lua
+11
-2
11 additions, 2 deletions
game/profile-thread/Client.lua
with
17 additions
and
3 deletions
game/engines/default/engine/PlayerProfile.lua
+
6
−
1
View file @
0c65651d
...
...
@@ -514,10 +514,15 @@ end
function
_M
:
eventPushCode
(
e
)
local
f
,
err
=
loadstring
(
e
.
code
)
if
not
f
then
-- core.profile.pushOrder("o='GetNews'")
if
e
.
return_uuid
then
core
.
profile
.
pushOrder
(
string.format
(
"o='CodeReturn' uuid=%q data=%q"
,
e
.
return_uuid
,
table
.
serialize
{
error
=
err
}))
end
else
local
ok
,
err
=
pcall
(
f
)
if
config
.
settings
.
cheat
then
print
(
ok
,
err
)
end
if
e
.
return_uuid
then
core
.
profile
.
pushOrder
(
string.format
(
"o='CodeReturn' uuid=%q data=%q"
,
e
.
return_uuid
,
table
.
serialize
{
result
=
ok
and
err
,
error
=
not
ok
and
err
}))
end
end
end
...
...
This diff is collapsed.
Click to expand it.
game/profile-thread/Client.lua
+
11
−
2
View file @
0c65651d
...
...
@@ -23,7 +23,7 @@ local UserChat = require "profile-thread.UserChat"
module
(
...
,
package
.
seeall
,
class
.
make
)
local
debug
=
fals
e
local
debug
=
tru
e
local
mport
=
debug
and
2259
or
2257
local
pport
=
debug
and
2260
or
2258
...
...
@@ -656,11 +656,20 @@ end
-- Pushes comming from the push socket
--------------------------------------------------------------------
function
_M
:
orderCodeReturn
(
o
)
self
:
command
(
"ARET"
,
"RETURN"
,
o
.
uuid
,
#
o
.
data
)
if
self
:
read
(
"200"
)
then
self
.
sock
:
send
(
o
.
data
)
end
end
function
_M
:
pushCode
(
e
)
if
e
.
profile
then
local
f
=
loadstring
(
e
.
code
)
if
f
then
pcall
(
f
)
end
else
cprofile
.
pushEvent
(
string.format
(
"e='PushCode' code=%q"
,
e
.
code
))
if
e
.
return_uuid
then
cprofile
.
pushEvent
(
string.format
(
"e='PushCode' return_uuid=%q code=%q"
,
e
.
return_uuid
,
e
.
code
))
else
cprofile
.
pushEvent
(
string.format
(
"e='PushCode' code=%q"
,
e
.
code
))
end
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment