ULX

Author Topic: Log ONLY to Console  (Read 2039 times)

0 Members and 1 Guest are viewing this topic.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Log ONLY to Console
« on: December 16, 2016, 06:31:30 PM »
Was wondering if there was a way to log something with ULX (or just in general) that will ONLY echo to the console. I'm writing a script that, for security reasons, should not be echoed to anyone except the parties involved. Would something like 'MsgN()' be useful, or is there a more convenient and safer way of doing this?


EDIT: Right now I'm using fancyLog( { calling_ply } and fancyLog( { target_ply } (different messages to each) so that it sends ONLY to them, is there a safer way of letting them know this?


EDIT2: Would ServerLog work?
« Last Edit: December 16, 2016, 06:56:03 PM by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Log ONLY to Console
« Reply #1 on: December 18, 2016, 11:19:22 PM »
ServerLog would only log to the Dedicated Console and none of the connected clients.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Log ONLY to Console
« Reply #2 on: December 19, 2016, 07:34:18 AM »
Yeah I guess it was kind of confusing what I was asking there. Pretty much, ServerLog is what I need to log to only the server, is there any safe way to notify players in the game about something that is sent ONLY to them and no one else? I'm thinking of using HUD_PRINTCONSOLE (with PrintMessage(), I think that's the one), but I need to know if there is any way that can be intercepted.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Log ONLY to Console
« Reply #3 on: December 19, 2016, 09:17:31 AM »
I'm thinking of using HUD_PRINTCONSOLE (with PrintMessage(), I think that's the one), but I need to know if there is any way that can be intercepted.
Unless someone has network access, I doubt this data would be interceptable.
bw81@ulysses-forums ~ % whoami
Homepage

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Log ONLY to Console
« Reply #4 on: December 19, 2016, 12:26:01 PM »
Yeah, the server chooses who to send messages to, so if you only send a message to 1 client.. no other client can intercept it.

If you're worried about the server seeing messages sent between 2 clients... well... that's just how it goes..

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: Log ONLY to Console
« Reply #5 on: December 19, 2016, 12:29:12 PM »
Yeah, the server chooses who to send messages to, so if you only send a message to 1 client.. no other client can intercept it.

If you're worried about the server seeing messages sent between 2 clients... well... that's just how it goes..
I'm worried about other clients seeing the message, not the server seeing the message. I think I've got what I need, though.

Sent using Tapatalk. Owner of iViscosity Gaming.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Log ONLY to Console
« Reply #6 on: December 19, 2016, 12:50:52 PM »
Yes, that's just not possible the way source (or really any server - client) handles sending messages from the server to the intended recipients.