Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ login database and alternate character search tool

login database and alternate character search tool

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  3  

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Fri 27 Apr 2007 07:35 AM (UTC)
Message
I recently uploaded my modified version of the LAST command from smaug. basically i created a login database, and then built a FINDALTS function into the last command which will perform a search for possible alternate characters of the specified character. For the search it queries logins based on the day of the login and the ip address used, any other character that logged into the mud on that same day with the same ip address is flagged as a possible alternate character. it then displays all the names of the alt chars, along with how many different ip addresses were matched and how many total matches were found in the database. i would love to hear any comments on it for future improvement.

http://www.mudbytes.net/index.php?a=files&s=viewfile&fid=942
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #1 on Fri 27 Apr 2007 10:13 PM (UTC)
Message
I tried to install this snippet a few days ago and ran into some problems, so consider my feedback at http://www.mudbytes.net/index.php?a=comments&s=viewcomments&cid=76&c=100#p100 in response to your request, if you would. :)

It really looks like a great snippet, but even trying to fix the points I'd posted so that it'd compile, got the mud to crash complete with core dump as soon as anyone (including my admin character) successfully logged in, so for now I've gone back to Xorath's do_last replacement, but if I could understand how to make yours work for me, I'd far prefer it.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #2 on Mon 30 Apr 2007 02:17 AM (UTC)
Message
what was xorath's do_last replacement, never heard of it.
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #3 on Mon 30 Apr 2007 05:05 AM (UTC)
Message
He called it Login History, but basically it was a replacement for the do_last function that saves the logon data to last.lst just like yours does and lets you search that file in-game by number of logons, character name (with or with specified number of logons), or "today".

Since it doesn't appear to already be posted to MudBytes yet, I'll go ahead and submit a copy there so you can see it. (Sorry, but I don't recall any more which site I downloaded it from originally.)

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #4 on Tue 01 May 2007 01:54 AM (UTC)
Message
lol ok that is what i had to begin with, i thought it came with my code many many years ago, but maybe i got it from a snippet site. but then i went it and completely modified it, so this is basically an upgraded version of that code, hope ya likes it, hope to hear any comments good or bad.
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #5 on Tue 01 May 2007 03:17 AM (UTC)
Message
Ah, so it was the inspiration, can't say that I'm surprised, it's been a busier day than I would've liked and I have not ahd a chance to retry your update yet.

I was wondering if it still supported the "last <searchname?> <character> #" syntax?

I did notice that your supplied syntax and help don't seem to cover all the options, nor exactly match one another. :(

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #6 on Tue 01 May 2007 03:34 AM (UTC)
Message
hmm i didn't post the right helpfile, i two different helpfiles, one for lower admins and one for upper admins. as for the other two options in the code: last month and last countips, those options are not used, because they are incomplete, or just useless. here is the upper admin helpfile:

=============================================================================

Syntax: last <player name>
This option allows for one to see the last login of a specific
player.

Syntax: last <number>
This option allows for one to input a range and view the last
number of logins chosen.

Syntax: last searchname <name>
This option allows one to view 50 of the players logins ending
with the most recent login found.

Syntax: last findalts <main character name>
This option allows one to view all possible alternate characters
of the main character specified.

Syntax: last fromip <IP address>
This option allows one to view 50 of the most recent logins
from the given IP address.

This option also has one extra feature, it in a sense allows for
a wildcard. Lets say for example you want to see all ips starting
with 24.21.*.*, you would simple type last fromip 24.21.

Note the period at the end of 24.21., this is because if you were
to leave it out, an ip address like 154.24.212.234 might show up.

=============================================================================
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #7 on Tue 01 May 2007 05:23 AM (UTC)
Message
In that last findip <ip> option, is there anyway to have it search by string instead of number?

Since my system's setup such that by the time the IP address is being passed to the last struct (which may well be the cause of my logon crashes before with it) it's already been resolved to a host/domain name rather than still being considered an IP...

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #8 on Tue 01 May 2007 06:31 AM (UTC)
Message
umm it already searches by string, as d->host is a string already, which is what the ip is. if your mud is crashin then post a dump and we'll see what the prob be.
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #9 on Wed 02 May 2007 01:16 AM (UTC)
Message
It did before you updated the snippet, I was going to try it again today, but the lawn apparently needed mowing more urgently... *shrug*

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #10 on Wed 02 May 2007 04:51 AM (UTC)
Message
oh you know i never did rename that variable that you said time.h was having trouble with, only because it has no problem compiling on my server, really no idea what it does on yours, unless of course you already had time defined as a variable, since you did have xoraths snippet installed its a possibility.
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #11 on Wed 02 May 2007 05:13 AM (UTC)
Message
That's a minor enough detail, especially if I know about it in advance. ;)

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #12 on Sat 05 May 2007 01:22 AM (UTC)

Amended on Sat 05 May 2007 01:23 AM (UTC) by Conner

Message
Ok, got the new updated version installed and here are the fixes that were still needed to get GCC to compile it:

Compiling o/imc.o....
In file included from imc.c:42:
mud.h:4786: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
mud.h:4787: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
mud.h:4788: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘char’
cc1: warnings being treated as errors
imc.c: In function ‘imclog’:
imc.c:230: warning: declaration of ‘format’ shadows a global declaration
mud.h:4789: warning: shadowed declaration is here
imc.c: In function ‘imcbug’:
imc.c:250: warning: declaration of ‘format’ shadows a global declaration
mud.h:4789: warning: shadowed declaration is here
imc.c: In function ‘imcformat_channel’:
imc.c:1005: warning: declaration of ‘format’ shadows a global declaration
mud.h:4789: warning: shadowed declaration is here
imc.c: In function ‘imc_act_string’:
imc.c:7356: warning: declaration of ‘format’ shadows a global declaration
mud.h:4789: warning: shadowed declaration is here
make[2]: *** [o/imc.o] Error 1

The above were resolved by adding a second set of () to the
char *get_monthname args( ( int month ) );
char *get_daysuffix args( ( int day ) );
bool exists_player args( ( char *name ) );
in mud.h and by moving the
char *format args( ( char *fmt, ... ) );
to save.c from mud.h with a
const
in front of it immediately after
bool exists, recurse = FALSE;

Compiling o/comm.o....
cc1: warnings being treated as errors
comm.c: In function ‘nanny’:
comm.c:2000: warning: declaration of ‘time’ shadows a global declaration
/usr/include/time.h:187: warning: shadowed declaration is here
make[1]: *** [o/comm.o] Error 1

Resolved by changing time to ltime

Compiling o/tables.o....
tables.c: In function ‘write_last_file’:
tables.c:3129: error: ‘fpReserve’ undeclared (first use in this function)
tables.c:3129: error: (Each undeclared identifier is reported only once
tables.c:3129: error: for each function it appears in.)
tables.c: In function ‘exists_player’:
tables.c:3301: error: storage size of ‘fst’ isn’t known
cc1: warnings being treated as errors
tables.c:3311: warning: implicit declaration of function ‘stat’
tables.c:3301: warning: unused variable ‘fst’
make[1]: *** [o/tables.o] Error 1

Resolved by commenting out the two fpReserve references in write_last_file and adding
#include <sys/stat.h>
to the other includes at the top of tables.c

o/comm.o: In function `nanny':
/home/muddev/src/comm.c:2961: undefined reference to `first_on'
/home/muddev/src/comm.c:2961: undefined reference to `first_on'
/home/muddev/src/comm.c:2961: undefined reference to `last_on'
/home/muddev/src/comm.c:2961: undefined reference to `last_on'
/home/muddev/src/comm.c:2961: undefined reference to `first_on'
/home/muddev/src/comm.c:2961: undefined reference to `last_on'
/home/muddev/src/comm.c:2961: undefined reference to `last_on'
o/db.o: In function `load_logons':
/home/muddev/src/db.c:940: undefined reference to `first_on'
/home/muddev/src/db.c:940: undefined reference to `first_on'
/home/muddev/src/db.c:940: undefined reference to `last_on'
/home/muddev/src/db.c:940: undefined reference to `last_on'
/home/muddev/src/db.c:940: undefined reference to `first_on'
/home/muddev/src/db.c:940: undefined reference to `last_on'
/home/muddev/src/db.c:940: undefined reference to `last_on'
o/save.o: In function `do_last':
/home/muddev/src/save.c:2230: undefined reference to `first_on'
/home/muddev/src/save.c:2290: undefined reference to `first_on'
/home/muddev/src/save.c:2322: undefined reference to `first_on'
/home/muddev/src/save.c:2329: undefined reference to `first_on'
/home/muddev/src/save.c:2352: undefined reference to `first_on'
o/save.o:/home/muddev/src/save.c:2370: more undefined references to `first_on' follow
o/tables.o: In function `write_last_file':
/home/muddev/src/tables.c:3153: undefined reference to `last_on'
/home/muddev/src/tables.c:3153: undefined reference to `last_on'
/home/muddev/src/tables.c:3153: undefined reference to `last_on'
/home/muddev/src/tables.c:3160: undefined reference to `first_on'
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1

Resolved by adding:
LAST_DATA *first_on;
LAST_DATA *last_on;
to the beginning of db.c

After I got past all of those, I hotbooted the mud (which went fine) and then tried to log on one of my alts to see what would happen and the mud crashed with a core file which GDB reported:

#0 0x0810fcac in nanny (d=0x0, argument=0xbf9c4d35 "") at comm.c:2960
2960 newlogon->ip = str_dup(d->host);
(gdb) bt
#0 0x0810fcac in nanny (d=0x0, argument=0xbf9c4d35 "") at comm.c:2960
#1 0x0810a83f in game_loop () at comm.c:1010
#2 0x08109c9e in main (argc=6, argv=0xbf9c56a4) at comm.c:600

And that's where I'm at now.

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Conner   USA  (381 posts)  Bio
Date Reply #13 on Sat 05 May 2007 01:47 AM (UTC)
Message
Ok, resolved the crash by changing
newlogon->ip = str_dup(d->host);
to
newlogon->ip = str_dup(ch->desc->host);
and it seems to be working now. :)

(Thanks to Kiasyn for helping me figure out the last two issues there.)

Btw, Zeno also tested this and says that he's not gotten most of the errors that I did, so I guess I'm far from stock.. *shrug*

-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org
Top

Posted by Gohan_TheDragonball   USA  (183 posts)  Bio
Date Reply #14 on Sat 05 May 2007 05:14 AM (UTC)

Amended on Sat 05 May 2007 05:18 AM (UTC) by Gohan_TheDragonball

Message
its wierd that you needed to use ch->desc->host as opposed to d->host, unless of course whatever your code does disposes d->host, i truthfully have no clue. as to the other things i updated the snippet accordingly. as for needing to move format out of mud.h, by the errors i would assume there is a global declaration already in place named format, since i removed all traces of imc from my code i would think thats why i never ran into that. as for the shadowed declaration of time i'm still stumped on that, so i'll just modify it in the snippet to maybe help avoid head scratching of future implementors. soooo other than alllll that, did ya get it to work and how did ya like it?
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


94,564 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.