dswp.de
http://www.dswp.de/old/

DSWP Bar for Firefox
http://www.dswp.de/old/forum-gameserver-support/dswp-bar-for-firefox-t1139-70.html
Page 8 of 12

Author:  SvaRoX [ 02.22.11 ]
Post subject:  Re: DSWP Bar for Firefox

I think the data table needs quite a while to be written so I would like to be sure the table is full before being read. Can't it be done with LOCK TABLES instruction ? Not sure it only prevents reading it, maybe only writing it. Any idea ?

Author:  wurst [ 02.22.11 ]
Post subject:  Re: DSWP Bar for Firefox

hmm, which table?

btw, i still cant get rid of that 002 bar...

Author:  JRandomNoob [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

SvaRoX wrote:
I'm surprised python always get wrong data, how do you retrieve it ?

I'm surprised too, because there shouldn't be any difference in results whether I'm retrieving the page via browser, using that Javanese voodoo in DSWP bar, or using Python libraries. I've tried urllib, urllib2, and httplib -- all of these give perfect results on first try, it's just that the last line of retrieved data is always wrong. Not truncated, not botched, server gives me wrong data. And yes, thank you, other pages come through just fine. There must be a workaround, but I've tried everything I can think of (and some more) to no avail.

Although now I downloaded Cuntie's source (you ain't making it easy to find it:-P) and found that she uses different address to retrieve the data. I was trying the method used in DSWP bar (POST a username and password to http://www.dswp.de/old/perso_friends.php), but Cuntie's looking at http://www.dswp.de/old/perso_friends_bot.php instead. Which is working perfectly, BTW. (Nonetheless, the issue with the former page needs fixing; there are some people is a Javascript using this data every day;-))

SvaRoX wrote:
Too bad you don't code on CuntBot, it's open source you know ;)

Scary thought, me writing something that I can't kill when someone inadvertently pushes it into infinite loop:-P (which happened twice when I tried conditional refreshing to force the page magically becoming correct). To make it clear: Today it's fourth day of writing code for me in any language (I suppose playing with Javascripts embedded in HTML so they become broken for some mystical reason, which I did ten years earlier, doesn't count).

---

Unclefragger just brought Cuntie back online, BTW. I'm going to continue working on aimlessbot anyway, it's not like Cuntie doesn't ever drop:-) And I should implement the randomizer used in Cuntie's code (for better penises, HELL YEAH), and do some magic so that both bots could listen for commands at the same time without aimlessbot trying to answer the same stuff, and... well, it's interesting, coding.

Author:  SvaRoX [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

wurst wrote:
hmm, which table?

btw, i still cant get rid of that 002 bar...

Ooops, the table name is plugin_account_data.

Sorry about the version, I haven't updated it yet :/ (ugly stuff to do to sign the bar, lazy to do that =). So the 0.0.3 is the right one, weather it asks you for installing a newer version or not...
JRandomNoob wrote:
I was trying the method used in DSWP bar (POST a username and password to perso_friends.php), but Cuntie's looking at perso_friends_bot.php instead.

Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser. Better use the other one (unless you only care about get info about your "friends" =)

GL learning programming :)

Author:  JRandomNoob [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

SvaRoX wrote:
Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser.

AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course.

SvaRoX wrote:
Better use the other one (unless you only care about get info about your "friends" =)

Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-)

SvaRoX wrote:
GL learning programming :)

Thanks, gonna need it. Breaking my teeth on regexes right now...

BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from. I take the version available at viewgit isn't exactly the newest one? UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD, unquote -- what does that mean? Yes, I know about Git, but how does this sentence parse?

Author:  SvaRoX [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

JRandomNoob wrote:
AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course.

SvaRoX wrote:
Better use the other one (unless you only care about get info about your "friends" =)

Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-)

I mean when you use perso_friend.php, what you get is related to your forum account. It's not needed for !status and !players, unless of course you want to get a playerlist with your friend's names highlighted or such (but you need your bot to be able to handle user accounts then).
JRandomNoob wrote:
BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from.

Right, I added the ASCII stuff for another cunbot and haven't updated git :)
JRandomNoob wrote:
UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD

"we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date ;)
Exercise for you : reproduce the output of the ASCII dick :p

Author:  JRandomNoob [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

SvaRoX wrote:
Right, I added the ASCII stuff for another cunbot and haven't updated git :)

Aha! Doitdoitdoitdoitdoitdoit

SvaRoX wrote:
"we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date ;)

Whoops, I meant to say UCF:-P Had a braino caused by him starting his sentence with onomatopoetic "uff".

SvaRoX wrote:
Exercise for you : reproduce the output of the ASCII dick :p

Well, a (ahem) full-blown !penis with appropriate graphics was the first thing I wrote (I started with a different bot, Phenny, but it proved much too unstable). I interpolated the data from my IRC log, found that the graphic grows by one equal sign for about every inch, and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now. (Only changed the algorithm from random.randint(), although there really shouldn't be much difference in results unless we're dealing with generations of CuntBot users:-P)

Author:  AimMe [ 02.23.11 ]
Post subject:  Re: DSWP Bar for Firefox

JRandomNoob wrote:
and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now.

Isn't there at least thing like case? (case penile_rand....)

Author:  natirips [ 02.24.11 ]
Post subject:  Re: DSWP Bar for Firefox

This is just some pseudocode:

Code:
float length;
length = random();
const float lenght_of_one_equals_sign=2.5;//for 1" per "=" if length is in cm
int len;
string foo;
foo = "8";
len=length/lenght_of_one_equals_sign ;
foo += len * "=";
foo += "D";

Where += is string concatenation, and where most languages have a function or operator which allows for a simple way of generating a string with N same characters in it (the len * "=" part).

Author:  eXtr33m [ 02.24.11 ]
Post subject:  Re: DSWP Bar for Firefox

Natirips got it. Well in lower languages you would have to Round that (length/length of one) and for the len * "=" you can use for cycle.

If u need help just ask in what language. :)

PS: That guy (JRN) is so awesome.. its just when that guy will want to save the world he will do it believe me. :D

P.S.2: I sometimes think he is sort of hacker and is making fun of us :D but whatever..

Page 8 of 12 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/