Ulysses
General => Developers Corner => Topic started 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
-
Anyone with access to: "ulx seeasay" will see the @messages
-
Thanks!
-
I have been working on a command similar to SAsay and Asay i will release the code if you want it.
-
Probably busted cuz i modded the SAsay code to be for mods hope it works enough all users must do is type !Msay
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." )
-
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?
-
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.