Frequent reminders to sign up at forums
Archives → Feature requests → Frequent reminders to sign up at forums
CLOSED
A reminder for people who hasn’t signed up at the forums (for example once they log in) has been requested by several staff members.
I’ve attempted to write a modification to the misc.py file for this, but I have never written any python code before so I don’t know how many problems there might be with it.
def get_website_data(player):
conn = zxJDBC.connect(mysql_database, mysql_user, mysql_pass, "com.mysql.jdbc.Driver")
curs = conn.cursor()
uuid = str(uid(player)).replace("-", "")
curs.execute("SELECT DISTINCT `id`, `email` FROM users WHERE `uuid` = ? LIMIT 1", (uuid,))
results = curs.fetchall()
curs.close()
conn.close()
return ("http://redstoner.com/users/%s" % results[0][0], results[0][1]) if results else (None, None)
def on_join(event):
"""
Welcome new players
"""
player = event.getPlayer()
# send welcome broadcast
if not player.hasPlayedBefore():
broadcast("utils.greet_new", "\n&a&lPlease welcome &f" + player.getDisplayName() + " &a<o Redstoner!\n")
# clear out some eventual crap before
msg(player, " \n \n \n \n \n \n \n \n \n \n \n \n ")
msg(player, " &4Welcome to the Redstoner Server!")
msg(player, " &6Before you ask us things, take a quick")
msg(player, " &6look at &a&nredstoner.com/info")
msg(player, " \n&6thank you and happy playing ;)")
msg(player, " \n \n")
# teleport to spawn when spawning inside portal
loginloc = player.getLocation().getBlock().getType()
headloc = player.getEyeLocation().getBlock().getType()
if "PORTAL" in [str(headloc), str(loginloc)]:
msg(player, "&4Looks like you spawned in a portal... Let me help you out")
msg(player, "&6You can use /back if you &nreally&6 want to go back")
player.teleport(player.getWorld().getSpawnLocation())
if player.hasPlayedBefore() and get_website_data == none:
msg(player, " &4Remember to sign up at Redstoner.com to use our forums and have a chance to to rank up")
I didn’t implement a way to disable these notifications, but it might be desirable.
Yeah, I can look into that, but I don’t even know if my code is any useful at all. It might not even work.
EDIT: I’m more og a java guy, you see. I’m trying though.
Only a year late :P
+1
This could be displayed in the action bar (where jukebox songs are displayed), and could really make getting people to sign up easier for staff.
@YummyRedstone this is the same as your “Visitor message” feature request that you closed sometime ago, right? So why at first you close it and then you upvote it?
Back to the topic, +1!
I’d like to request an addition to this request: A frequent reminder to confirm the email in the website.
I think it’s useful because, as I’m writing this, there are 364 users that haven’t confirmed their email in the forums, and that means that they have no chance to get a rank-up, when they probably miss they only had to confirm the email (even though 10 of these players are also builder rank, and 4 are trusted).
Sorry for posting on an inactive thread, hope I added something to the post.