Ulysses

General => Developers Corner => Topic started by: AsaKahn on February 14, 2015, 07:59:00 PM

Title: @ [Message] For Moderator?
Post by: AsaKahn 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
Title: Re: @ [Message] For Moderator?
Post by: MrPresident on February 14, 2015, 08:18:28 PM
Anyone with access to: "ulx seeasay" will see the @messages
Title: Re: @ [Message] For Moderator?
Post by: AsaKahn on February 14, 2015, 08:49:37 PM
Thanks!
Title: Re: @ [Message] For Moderator?
Post by: BobTheDuck69 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.
Title: Re: @ [Message] For Moderator?
Post by: BobTheDuck69 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." )
Title: Re: @ [Message] For Moderator?
Post by: JamminR 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?
Title: Re: @ [Message] For Moderator?
Post by: BobTheDuck69 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.