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
| Conner
USA (381 posts) Bio
|
Date
| Reply #15 on Sat 05 May 2007 05:58 AM (UTC) |
Message
| As a matter of fact, yes, I did get it to work (took some reworking of my existing last.lst file to match the new format since I'd previously been using Xerves' snippet) and made some minor modifications already (made it so that "last month" takes a month and year argument, made fromip accept non-numeric argmuents, got rid of a . after the month display, added a header to the findalt display, and expanded the syntax message to include all the options) but it's great, I love it even compared to Xerves' snippet. I can't say what other changes I'm liable to make, but I'll keep you aware if you'd like. In any event, thanks very much for a great snippet. :) |
-=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 #16 on Sat 05 May 2007 06:13 AM (UTC) |
Message
| yeah sure any changes ya make that you feel i'd like to include please do keep me posted. i'm glad ya likes it, also glad ya already had a previous list to insert into the database. | Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #17 on Sat 05 May 2007 05:45 PM (UTC) Amended on Sun 06 May 2007 02:28 AM (UTC) by Zeno
|
Message
| Strangely, it doesn't seem to be working for me. Or at least the "findalts" part.
There are characters with the same IP in the last.lst file, and fromip shows that fine. But doing "findalts" with the character that shares that IP with other characters says there are no alts, even though there are.
Next time you're on, check it out. I have no idea why it's not working.
[EDIT] His response is as follows:
Remove this part from both main and recursive.
// Have we already done a search for the argument on this day?
if ( day == logon->day && month == logon->month && year == logon->year )
{
continue;
}
It was only finding one login per day, so if multiple IPs were on from the same char it would only check the first match. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #18 on Sun 06 May 2007 04:39 AM (UTC) |
Message
| now what i originally did was go day by day, pick the first login that day from that character, and do a search based on that logins ip address. once that search was done we skip to the next day and so forth. now this served a problem on zeno's due to the first login of the day of one character differed from every other login from that character that day. now what zeno posted was my simple fix, but be warned the computing time will suffer.
My mud has the limit of logins in the database, which is 20000.
Before fix:
<PL:(502,500,000)> <Gohan> timecmd last findalts gohan
Timing
Starting timer.
Possible Alts of Gohan:
----------------------------------------------------------
....Matches
----------------------------------------------------------
25 Total Possible Alts: 7 still exist, 18 are deleted.
Timing complete.
Timing took 0.823513 seconds.
After fix:
<PL:(502,500,000)> <Gohan> timecmd last findalts gohan
Timing
Starting timer.
Possible Alts of Gohan:
----------------------------------------------------------
....Matches
----------------------------------------------------------
25 Total Possible Alts: 7 still exist, 18 are deleted.
Timing complete.
Timing took 2.104752 seconds.
Now based on just a search for my alt chars, it really didn't improve it much, but on Zeno's it would have produced results in his scenario. The choice is yours!!! | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #19 on Sun 06 May 2007 08:58 PM (UTC) |
Message
| Wow, that's almost three times as long.. and it doesn't change the results? |
-=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
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #20 on Sun 06 May 2007 09:04 PM (UTC) |
Message
| No, as we said it changes the results. The shorter time only checks the first login each day. So if there are 20 logins during the day on the same char, it won't check them all and won't be accurate. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Gohan_TheDragonball
USA (183 posts) Bio
|
Date
| Reply #21 on Mon 07 May 2007 02:02 AM (UTC) |
Message
| it really depends on the database its searching really, my db is at its max, the more logins you have the easier it will be to determine possible alternate characters based on the first match only. zeno had just barely started his db so it had very few references for a specific character, so the results were affected. i did many checks against multiple characters on my db, and the change really didn't seem to affect my results, except for the number of matches found and the number of different ip addresses found. also, and i am not sure about this, but zeno and probably you too conner have dns resolving, whereas i just use ip addresses, but that might affect it, if the players host doesn't resolve correctly and just defaults to the ip address instead. but again im not sure exactly what zeno has installed that shows stuff liek xerves.something.com instead of just an ip address. | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #22 on Mon 07 May 2007 04:23 AM (UTC) |
Message
| Hmm, I may have to try it to see what difference it produces on mine then, I currently do have DNS resolving enabled, though there are always a few that don't resolve as well. As for the size of the "database" mine currently shows:
last -1
There were 5018 logons (0 Unique IPs) -1, 0/0/0.
last countips
There were 1677 different IP addresses in the database.
But I had my last.lst file set to max out at 5000 before I installed this so it's slowly growing from that point (the last couple of days have been fairly slow).
Without this "fix" when I try the findalts using timecmd, I get:
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
65 Total Possible Alts: 65 still exist, 0 are deleted.
Timing complete.
Timing took 0.335328 seconds.
Now, to be completely honest, 44 of those 65 are not my alts and it's not listing Conner as a match, but the other 21 are mine. However, of the ones it's listing, the reason they're matching are because they're either alts of Dragona (who has in the recent past used my machine on occassion) or of Zelose (who is Dragona's brother and we've had to logon as one of his characters once in the last eleven months (as far back as my last.lst goes) to fix a problem he was having, so it is guessing correctly based on what it's got to go off of.
Now, am I understanding correctly that, given the size of my last.lst file, this "fix" will make that same findalts take roughly a full second and will probably generate the same output because it's already getting it pretty close to accurate to begin with? |
-=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 #23 on Tue 08 May 2007 04:35 AM (UTC) |
Message
| yes, from what i can tell without the fix, the code is pretty accurate, granted i wouldn't know if i ever missed an alt due to not having this fix. i personally am not implementing this fix, as i feel the code as it is suits my needs and is accurate enough for me to make a fair estimate on a players possible alternate chars. | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #24 on Tue 08 May 2007 07:51 PM (UTC) |
Message
| When Dragona gets done using me for her current spring cleaning project, I'll give it a shot and see if it changes my results on the search, fortunately, for immortals at least, I track alts separately anyway, so I already have a list I can check to see if it's catching them all or not. I suspect that in my case it may not be because I've noticed that some folks here will logon with several alts more or less grouped, so they're not being logged on separately over different days so this fix may actually improve the accuracy of the search some. Either way, I'll post my results here as soon as I have them to post. |
-=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 #25 on Tue 08 May 2007 11:47 PM (UTC) |
Message
| Ok, on my dev port, before the "fix":
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
21 Total Possible Alts: 15 still exist, 6 are deleted.
Timing complete.
Timing took 0.248079 seconds.
last countips
There were 67 different IP addresses in the database.
last -1
There were 1168 logons (0 Unique IPs) -1, 0/0/0.
After the "fix":
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
21 Total Possible Alts: 15 still exist, 6 are deleted.
Timing complete.
Timing took 0.151553 seconds.
last countips
There were 67 different IP addresses in the database.
last -1
There were 1168 logons (0 Unique IPs) -1, 0/0/0.
So, at least on my development port, the only difference was that it took roughly 7x as long to run the command. Perhaps once I get today's portion of the family spring cleaning done, I'll try it again on my live mud to see if having the larger "database" makes more of a difference. *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 #26 on Wed 09 May 2007 12:45 AM (UTC) |
Message
| Before fix: Timing took 0.248079 seconds.
After fix: Timing took 0.151553 seconds.
Where exactly did you get 7x longer from your posted times? to me that looks like less time. | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #27 on Wed 09 May 2007 03:14 AM (UTC) |
Message
| You're right, I misread it as 0.024 for the first one. *L*
ok, same "test" on my live mud...
Before fix (since you pointed that out, I tried it twice in a row to see what the timing difference was, and it was significant):
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
65 Total Possible Alts: 65 still exist, 0 are deleted.
Timing complete.
Timing took 0.924846 seconds.
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
65 Total Possible Alts: 65 still exist, 0 are deleted.
Timing complete.
Timing took 0.238696 seconds.
last -1
There were 5054 logons (0 Unique IPs) -1, 0/0/0.
last countips
There were 1687 different IP addresses in the database.
After the fix:
timecmd last findalts conner
Timing
Starting timer.
Possible Alts of Conner:
----------------------------------------------------------
Character Name Matchs IPs Exists?
----------------------------------------------------------
....Matches
------------Recurssive Matches------------
....More Matches
----------------------------------------------------------
65 Total Possible Alts: 65 still exist, 0 are deleted.
Timing complete.
Timing took 0.327006 seconds.
last -1
There were 5054 logons (0 Unique IPs) -1, 0/0/0.
last countips
There were 1687 different IP addresses in the database.
Hmm, interesting results, this time there was a slight difference between the outputs, aside from the actual timing, the very first of the Matches on the list had 137 "Matchs" after the fix and only had 71 before but everything else was identical. I suppose for the meager difference in timing, I'll leave the "fix" in place (though maybe I'll add an e to the word "Matchs" since I'm noticing that I'd left one out) since, in theory this way is more accurate, but I'm not really seeing a significant difference here even in the time for the command to run. *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
| Conner
USA (381 posts) Bio
|
Date
| Reply #28 on Wed 09 May 2007 03:24 AM (UTC) |
Message
| Hmm, I just crashed my live mud by trying some other names (folks I know have a bunch of alts) to see how much the timing would change.. gdb shows:
#0 0x08123e75 in str_cmp (astr=0x1 <Address 0x1 out of bounds>,
bstr=0xdd7c1c8 "ts1-231.nmkt.auracom.net") at db.c:5591
5591 for( ; *astr || *bstr; astr++, bstr++ )
(gdb) bt
#0 0x08123e75 in str_cmp (astr=0x1 <Address 0x1 out of bounds>,
bstr=0xdd7c1c8 "ts1-231.nmkt.auracom.net") at db.c:5591
#1 0x081ca8d7 in do_last (ch=0xddf29d0, argument=0xbfc7d77a "rand")
at save.c:2541
#2 0x0816009b in interpret (ch=0xddf29d0, argument=0xbfc7d771 "findalts rand")
at interp.c:446
#3 0x0816102a in do_timecmd (ch=0xddf29d0,
argument=0xbfc7d76c "last findalts rand") at interp.c:850
#4 0x0816009b in interpret (ch=0xddf29d0,
argument=0xbfc7d76c "last findalts rand") at interp.c:446
#5 0x0810a868 in game_loop () at comm.c:1014
#6 0x08109c9e in main (argc=6, argv=0xbfc7e0d4) at comm.c:600
I'm not sure why astr would've been out of bounds though. :(
It worked for the first three names besides my own that I'd tried, and on the fourth one it dropped a core dump. :(
...
tried it again with just him and got the same results, so it's something about him. His character's name is Rand, could the code think it's looking up a random number because of that? :( |
-=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
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #29 on Wed 09 May 2007 05:06 AM (UTC) |
Message
|
5591 for( ; *astr || *bstr; astr++, bstr++ )
(gdb) bt
#0 0x08123e75 in str_cmp (astr=0x1 <Address 0x1 out of bounds>,
Looks like astr was NULL, as it is now 1 after adding 1 to it. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
95,502 views.
This is page 2, subject is 3 pages long:
1
2 3
It is now over 60 days since the last post. This thread is closed.
Refresh page
top