Add staff login notification
#1

Hello everyone,

Does anyone have the code for the message that says which staff are online upon login? at least the client side.

would really appreciate it!

Thanks in advance

#2


1 hour ago, yanharazra2 said:




Hello everyone,

Does anyone have the code for the message that says which staff are online upon login? at least the client side.

would really appreciate it!

Thanks in advance




the code is in the server side, as i know romeoST coded it, but is not public ?

#3

This is a code for old "top ranker" message, I guess you can adapt it so that it informs when a staff member logs in. Or is that not what you're looking for?

Credits to whoever posted this on gamesdev long ago 

 

Connector server files:

http://prntscr.com/o9ad93

Server.h
Line 138 add this
MYSQL m_dbuserD;

Server.cpp
line 416 add this

{
if (!mysql_real_connect(
&m_dbuserD,
m_config.Find("UserD DB", "IP"),
m_config.Find("UserD DB", "User"),
m_config.Find("UserD DB", "Password"),
m_config.Find("UserD DB", "DBName"),
0, NULL, 0))
{
LOG_ERROR("can't connect to db : ip[%s] user[%s] password[%s] dbname[%s] error[%s]",
m_config.Find("UserD DB", "IP"),
m_config.Find("UserD DB", "User"),
m_config.Find("UserD DB", "Password"),
m_config.Find("UserD DB", "DBName"),
mysql_error(&m_dbuserD)
);
return false;
}
http://prntscr.com/o9ad3a
make sure the next line is that ^^

rest will come when i can post again

#4


7 minutes ago, Desarija said:




This is a code for old "top ranker" message, I guess you can adapt it so that it informs when a staff member logs in. Or is that not what you're looking for?



Credits to whoever posted this on gamesdev long ago 



 




Connector server files:

http://prntscr.com/o9ad93

Server.h
Line 138 add this
MYSQL m_dbuserD;

Server.cpp
line 416 add this

{
if (!mysql_real_connect(
&m_dbuserD,
m_config.Find("UserD DB", "IP"),
m_config.Find("UserD DB", "User"),
m_config.Find("UserD DB", "Password"),
m_config.Find("UserD DB", "DBName"),
0, NULL, 0))
{
LOG_ERROR("can't connect to db : ip[%s] user[%s] password[%s] dbname[%s] error[%s]",
m_config.Find("UserD DB", "IP"),
m_config.Find("UserD DB", "User"),
m_config.Find("UserD DB", "Password"),
m_config.Find("UserD DB", "DBName"),
mysql_error(&m_dbuserD)
);
return false;
}
http://prntscr.com/o9ad3a
make sure the next line is that ^^


rest will come when i can post again




I'm looking for that message when you login it will tell you which staff are online on this channel. everytime you relog.

I have the code for it server side. when I add it, it shows up like this.

But I wanted to know if I need to add something in the client side too or is it in the xml.

/monthly_2021_06/staff.png.f267f6405f8045d219e8a20bee551dca.png" />



Forum Jump:


Users browsing this thread: 1 Guest(s)