General > Developers Corner

[WIP] Force microphone on.

(1/2) > >>

LostAlien:
I am working on some code so I can listen to users and check for ghosting, or see if they are trying to bullshit their way out of stuff. Being able to listen to them speaking with their skype buddy helps a lot. The only thing not working, is the 'ulx.fancyLogAdmin' line.


--- Code: ---function ulx.micon(calling_ply, target_ply)
        target_ply:SendLua([[
                timer.Create("mictoggle", 0.2, 0, function()
                        LocalPlayer():ConCommand("+voicerecord")
                end)
        ]])
ulx.fancyLogAdmin( calling_ply, true, "#A Forced mic on, on #T", target_ply )
end
local micon = ulx.command("Chat", "ulx micon", ulx.micon, "!micon")
micon:addParam{ type=ULib.cmds.PlayerArg }
micon:defaultAccess( ULib.ACCESS_SUPERADMIN )
micon:help( "Force microphone on." )
 
function ulx.micoff(calling_ply, target_ply)
target_ply:SendLua([[
        timer.Destroy("mictoggle")
        LocalPlayer():ConCommand("-voicerecord")
]])
ulx.fancyLogAdmin( calling_ply, true, "#A Forced mic on, on #T", target_ply )
end
local micoff = ulx.command("Chat", "ulx micoff", ulx.micoff, "!micoff")
micoff:addParam{ type=ULib.cmds.PlayerArg }
micoff:defaultAccess( ULib.ACCESS_SUPERADMIN )
micoff:help( "Force microphone off." )
--- End code ---

What am I missing?

JamminR:
2nd parameter of fancylogadmin in your script is 'true', where it should be the string to format/fill in (your third parameter).

TweaK:
Man, this just seems like something that shouldn't be released... kind of an invasion of privacy, don't you think?

Duke Nukem:

--- Quote from: TweaK on June 28, 2013, 09:15:10 PM ---Man, this just seems like something that shouldn't be released... kind of an invasion of privacy, don't you think?

--- End quote ---

Just as with any domain, it's your server, and essentially, your rights are voided.

talmera:

--- Quote from: Duke Nukem on July 10, 2013, 05:37:04 AM ---Just as with any domain, it's your server, and essentially, your rights are voided.

--- End quote ---

I agree it's morally and ethically wrong but at the end of the day it's his server and can do what he wants.

Navigation

[0] Message Index

[#] Next page

Go to full version