EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Table 'tellque' missing (https://www.eqemulator.org/forums/showthread.php?t=33471)

Zothen 05-06-2011 02:49 AM

Table 'tellque' missing
 
Got a world error this morning, when tell-chatting with a buddy of mine. The world window reports "[...] peq.tellque doesnt exist." and it is actually right. There is no such table, but in the source code there are 3 sql commands for it.

Is there an update script for that table or could someone just post the columns so I can add it manually?

Thanks in advance!

trevius 05-06-2011 04:00 AM

I haven't ever messed with it, but judging by the source related to it, I would think the table would be something like this:

Code:

CREATE TABLE `tellque` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `date` varchar(65) NOT NULL default '',
  `receiver` varchar(65) NOT NULL default '',
  `sender` varchar(65) NOT NULL default '',
  `message` varchar(256) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8;

I only looked at the source for it briefly, but as far as I can tell, the tellque doesn't actually get sent to clients automatically after they finish zoning. They would have to run the #viewmessage command.

Though, it seems like messages could be checked and automatically sent during the finishing zoning process.

Zothen 05-06-2011 04:27 AM

Thanks for the sql, mate!

It must be automatically, cause my buddy does not even know the #viewmessage command, nor do I ;)

trevius 05-06-2011 04:31 AM

Well yeah, it gets inserted into the table automatically when someone is zoning and is sent a tell. The command would be for retrieving the message after zoning is completed, as I didn't see any way that automatically sends the messages.

Though, all I did was search Google SVN for "tellque" and got this result:

http://www.google.com/codesearch?q=t...G=Search+Trunk

Searching the SVN often misses entries for whatever reason, so maybe support for sending them automatically is already in.

trevius 05-06-2011 10:56 AM

Looks like that table basically works, though the timestamp field doesn't record the timestamp properly.

I was at least able to confirm that it does not automatically send the queued tells after the receiver finishes zoning. It puts them into the table and you have to get them manually using the #viewmessage command. Seems like it might not be all that hard to implement the rest of it and then add the table to the SVN for updates that everyone can get. Though, I would like to know the correct way to set the date field for sure before that.

It would probably also need some sort of cleanup step to empty out the table upon server reset or something.

dcosper 05-06-2011 02:39 PM

I had a similar time stamp problem, the sql and server wants a UNIX timestamp and i cant find a way in sql to make that, so instead i did a int 11 to hold the UNIX_TIMESTAMP date, seems to work fine, but i am just a novice.

trevius 05-06-2011 09:46 PM

Yeah, if it is unix timestamp, then int(11) is what it wants. I just thought it was supposed to be a timestamp, since it looks to be using asctime() to make it a string in this snippet from the source:

Code:

time_t rawtime;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
char *telldate=asctime(timeinfo);
....
if (database.RunQuery(query, MakeAnyLenString(&query, "INSERT INTO tellque (Date,Receiver,Sender,Message) values('%s','%s','%s','%s')",telldate,scm->deliverto,scm->from,scm->message), errbuf, &result))

Looks like it just needs to be varchar, so I updated the SQL I posted previously. Tested it and it worked fine.

sorvani 05-06-2011 09:49 PM

would be awesome if this gets finished.


All times are GMT -4. The time now is 06:13 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.