|
kyodai
New Member

Azerbaijan
74 Posts |
Posted - 20 December 2009 : 08:59:04
|
Hi there,
i want to add a "mute" function so my mods can "mute" a user for like 24 hours and he can not post in that time period. I think that's much better than directly banning a spammer, because i feel some people CAN learn.
So i wanna give my mods a "mute" button, but how can i calculate with dates?
I have added custom fields to the MEMBERS table, so every user has additional colums "Muted" (boolean, standard 0), "MutedUntill" (I thought date, but i have seen snitz uses nvarchar(14)...), "MutedBy" (mod username, probably nvarchar(150)), MutedReason (Nvarchar).
I think i get most stuff done, but i don't understand how to calculate with the dates. How can i make it so it writes "Current date + 24 hours" to the MutedUntill field? And how can i check against that, like if currentdate > muteddate then (allow posting)? |
|