• Print

Author Topic: Stop chat command from going through  (Read 6158 times)

0 Members and 1 Guest are viewing this topic.

Offline Fleamonji

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Stop chat command from going through
« on: January 15, 2011, 12:27:43 pm »
I want to stop the chat command from being printed.

So instead of !goto name appearing in chat, it doesn't.  I don't know where I would do this in ULX, so some guidance would be nice.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Stop chat command from going through
« Reply #1 on: January 15, 2011, 12:54:53 pm »
Just need to add a flag to the command setup. Instead of having:
Code: Lua
  1. local goto = ulx.command( CATEGORY_NAME, "ulx goto", ulx.goto, "!goto" )

Make it:
Code: Lua
  1. local goto = ulx.command( CATEGORY_NAME, "ulx goto", ulx.goto, "!goto", true )
Experiencing God's grace one day at a time.

Offline Fleamonji

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Stop chat command from going through
« Reply #2 on: January 15, 2011, 01:38:41 pm »
Thanks.  What abuot making a command into a silent command?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Stop chat command from going through
« Reply #3 on: January 15, 2011, 01:57:36 pm »
Thanks.  What abuot making a command into a silent command?

Change:
Code: Lua
  1. ulx.fancyLogAdmin( calling_ply, "#A teleported to #T", target_ply )

To:
Code: Lua
  1. ulx.fancyLogAdmin( calling_ply, true, "#A teleported to #T", target_ply )
Experiencing God's grace one day at a time.

Offline Fleamonji

  • Newbie
  • *
  • Posts: 45
  • Karma: 0
Re: Stop chat command from going through
« Reply #4 on: January 21, 2011, 03:24:15 pm »
Would making the opposite command not appear in chat work the same way?

Code: [Select]
freeze:setOpposite( "ulx unfreeze", {_, _, true}, "!unfreeze" )
to

Code: [Select]
freeze:setOpposite( "ulx unfreeze", {_, _, true}, "!unfreeze", true )

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Stop chat command from going through
« Reply #5 on: January 21, 2011, 05:15:11 pm »
Would making the opposite command not appear in chat work the same way?

Code: [Select]
freeze:setOpposite( "ulx unfreeze", {_, _, true}, "!unfreeze" )
to

Code: [Select]
freeze:setOpposite( "ulx unfreeze", {_, _, true}, "!unfreeze", true )

I don't know offhand, but I assume it sets both the say command and the opposite chat not appear at the same time. Otherwise, just try it and find out!
Experiencing God's grace one day at a time.

  • Print