@@ -125,30 +125,16 @@ blobsProfiler.RegisterModule("Timers", {
125
125
{
126
126
name = " View source" ,
127
127
func = function (ref , node , luaState )
128
- if luaState == " Client" and isfunction (ref .value .func ) then
129
- local debugInfo = debug.getinfo (ref .value .func , " S" )
130
- if not string .EndsWith (debugInfo .short_src , " .lua" ) then
131
- Derma_Message (" Invalid function source: " .. debugInfo .short_src .. " \n Only functions defined in Lua can be read!" , " Function view source" , " OK" )
132
- return
133
- end
134
-
135
- net .Start (" blobsProfiler:requestSource" )
136
- net .WriteString (debugInfo .short_src )
137
- net .WriteUInt (debugInfo .linedefined , 16 )
138
- net .WriteUInt (debugInfo .lastlinedefined , 16 )
139
- net .SendToServer ()
140
- else
141
- if not string .EndsWith (ref .value .short_src , " .lua" ) then
142
- Derma_Message (" Invalid function source: " .. ref .value .short_src .. " \n Only functions defined in Lua can be read!" , " Function view source" , " OK" )
143
- return
144
- end
145
-
146
- net .Start (" blobsProfiler:requestSource" )
147
- net .WriteString (ref .value .short_src )
148
- net .WriteUInt (ref .value .linedefined , 16 )
149
- net .WriteUInt (ref .value .lastlinedefined , 16 )
150
- net .SendToServer ()
128
+ if not string .EndsWith (ref .value .short_src , " .lua" ) then
129
+ Derma_Message (" Invalid function source: " .. ref .value .short_src .. " \n Only functions defined in Lua can be read!" , " Function view source" , " OK" )
130
+ return
151
131
end
132
+
133
+ net .Start (" blobsProfiler:requestSource" )
134
+ net .WriteString (ref .value .short_src )
135
+ net .WriteUInt (ref .value .linedefined , 16 )
136
+ net .WriteUInt (ref .value .lastlinedefined , 16 )
137
+ net .SendToServer ()
152
138
end ,
153
139
icon = " icon16/magnifier.png"
154
140
},
0 commit comments