View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-24-2018 , 16:42   Re: Contact Owner [Helping Tool] v1.1
Reply With Quote #18

If you can find a mail server that supports the SMTP protocol (does it still exist?) you can send an email using the sockets module. Assuming owners visit their servers regularly it isn't a huge deal that you don't send emails, though it would be pretty nice. You should also create an option to auto-display messages, if any, when an admin with specified flags connects.

I think this would be nicer if the messages showed directly in the menu with a menu option that toggles the action for the message, similar to the slay/slap/kick AMX-X menu. The MOTD doesn't look that great and it's annoying to have that extra window pop up. I don't expect people will be typing novels in these messages so the menu should suffice--I'm not sure offhand what the character limitation is, if that is why you didn't do it this way.

Example menu:
1. Bugsy: Hi owner, get new plugins please.
2. edon: Hello owner, I need to ban someone..
8. View / Mark Read / Respond / Delete

You can expand your MessageStruct enumerator to include a time stamp for when the message was read (also can act as a boolean for read status), deleted status, etc. If Deleted is set to true, you wouldn't actually delete the message, just flag it so it doesn't appear for anyone again. You can then have a 'recycling bin' of messages where you would pull everything, regardless of delete status. I'm over complicating this.
PHP Code:
enum _:MessageStruct
{
    
Message_Text192 ],
    
Message_Sender32 ],
    
Message_ReadTS,
    
bool:Message_Deleted
}; 
Maybe also allow sending messages to a specific owner/admin only, using a config file to designate a username to appear in the menu while the config also holds their steam-id which can be used to direct the message to that admin/owner.
Code:
bugsy STEAM_0:012345
edon STEAM_1_:02322
__________________
Bugsy is offline