Ulysses Stuff > Releases

TempAdd (v2.4) - Add a user to another group for a set amount of time

<< < (6/28) > >>

Stickly Man!:

--- Quote from: MrPresident on February 12, 2013, 10:25:44 PM ---I could look at how ULX handles their string time parser.
--- End quote ---

I believe there's a specific parameter (ULib.cmds.allowTimeString) you can set on your NumArg to allow it to process timestrings. So, assuming I'm not mistaken (it happens more often than you think :P), adding said parameter to the NumArg should be all you need to do. Here's the NumArg for ulx ban:

--- Code: ---ban:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }
--- End code ---

Hope that helps! :)

datgregofag:
ban:addParam{ type=ULib.cmds.NumArg, hint="minutes, 0 for perma", ULib.cmds.optional, ULib.cmds.allowTimeString, min=0 }

Stickly man, can you please tell me where to put that and if its in ulxtempuser.lua, can you tell me what line. THANK YOU!

MrPresident:
Inside of ulxtempuser.lua (line 156 in the most recent update)

Replace

--- Code: ---tempadduser:addParam{ type=ULib.cmds.NumArg, hint="Time (Minutes)" }

--- End code ---

with


--- Code: ---tempadduser:addParam{ type=ULib.cmds.NumArg, hint="Time (Minutes)", ULib.cmds.allowTimeString }

--- End code ---


*Note* I haven't tested this so be weary... If this works let me know and I'll add it as an official update to the addon.

datgregofag:
THANK YOU THAT WORKS, i mean the  days weeks months thing, IT WORKS. But one more question, will the temporary add still work on a person if i turn server off and then back on. If it doesn't can you please work on a fix. THANK YOU!!!

MrPresident:
Yeah, it is designed to work across server sessions.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version