ULX

Author Topic: @ [Message] For Moderator?  (Read 2227 times)

0 Members and 1 Guest are viewing this topic.

Offline AsaKahn

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
@ [Message] For Moderator?
« on: February 14, 2015, 07:59:00 PM »
So whenever someone types @ [message] it only goes out to admin and up, but is there a way to make moderators see this too?

Thanks

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: @ [Message] For Moderator?
« Reply #1 on: February 14, 2015, 08:18:28 PM »
Anyone with access to: "ulx seeasay" will see the @messages

Offline AsaKahn

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: @ [Message] For Moderator?
« Reply #2 on: February 14, 2015, 08:49:37 PM »
Thanks!

Offline BobTheDuck69

  • Newbie
  • *
  • Posts: 33
  • Karma: 1
Re: @ [Message] For Moderator?
« Reply #3 on: March 12, 2015, 11:28:42 AM »
I have been working on a command similar to SAsay and Asay i will release the code if you want it.
~The friendly neighborhood duckie~

Offline BobTheDuck69

  • Newbie
  • *
  • Posts: 33
  • Karma: 1
Re: @ [Message] For Moderator?
« Reply #4 on: March 12, 2015, 11:34:39 AM »
Probably busted cuz i modded the SAsay code to be for mods hope it works enough all users must do is type !Msay
Code: [Select]
function ulx.Msay( calling_ply, message )

local format

local me = "/me "

if message:sub( 1, me:len() ) == me then

format = "(SUPERADMINS) *** #P #s"

message = message:sub( me:len() + 1 )

else

format = "#P to Moderators: #s"

end

local players = player.GetAll()

for i=#players, 1, -1 do

local v = players[ i ]

if not ULib.ucl.query( v, seeMsayAccess ) and v ~= calling_ply then

table.remove( players, i )

end

end

ulx.fancyLog( players, format, calling_ply, message )

end
local Msay = ulx.command( "Chat", "ulx Msay", ulx.Msay, "!Msay", true, true )
Msay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
Msay:defaultAccess( ULib.ACCESS_SUPERADMIN )
Msay:help( "Send a message to currently connected moderators." )
~The friendly neighborhood duckie~

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: @ [Message] For Moderator?
« Reply #5 on: March 12, 2015, 09:16:19 PM »
Bob, seems you've been re-inventing the wheel here as of late.... what does your code offer different than ULX "asay" and providing anyone you want with access to seeasay?
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline BobTheDuck69

  • Newbie
  • *
  • Posts: 33
  • Karma: 1
Re: @ [Message] For Moderator?
« Reply #6 on: March 12, 2015, 10:36:31 PM »
Well c: thats just the first bit that im experimenting with. im seeing what breaks what and then im going to see if i can add in a few more features to it owo it gives me a challenge.
~The friendly neighborhood duckie~