|
Post by Powdersjam1 on Nov 19, 2010 21:37:16 GMT
If you look at the chat below, Megaloler made a fridge which you can store things in. I want to know how you make it.
|
|
|
Post by danballrocks on Nov 19, 2010 22:41:47 GMT
It was something called Python I think.
|
|
|
Post by ~Memzak~ on Nov 20, 2010 7:01:30 GMT
He programmed it himself with a programming language called python. Very clever actually.
|
|
|
Post by Qwerty on Nov 21, 2010 2:24:58 GMT
He based it off of a chatango.lib file designed by Guyfox through some packet-sniffing.
If you are willing to learn to program, and Megaloler or Guyfox are feeling nice, they may teach it to you.
|
|
|
Post by ~Memzak~ on Nov 21, 2010 9:57:02 GMT
Or you could read MicroFarad Python tutorial.
|
|
|
Post by Qwerty on Nov 22, 2010 9:48:24 GMT
That only shows you Python, not how to use the chatango library. You would still need Guyfox or Megaloler to show you how to use it.
|
|
|
Post by disabled on Nov 22, 2010 10:10:09 GMT
You got a link to the library? I once reverse engineered the protocol myself, but stopped when I was able to read and write text. Would be interesting to see what he got...
|
|
|
Post by ~Memzak~ on Nov 22, 2010 15:51:27 GMT
Waitwut? This just gets more and more complicated.
And who's guyfox?
|
|
|
Post by Qwerty on Nov 22, 2010 19:51:07 GMT
You'll have to ask Megaloler for the library, he gave it to BoL and Dhoom.
Guyfox is one of the programmers of B0t, not from this forum, but he still comes here sometimes.
|
|
|
Post by ~Memzak~ on Nov 23, 2010 5:33:48 GMT
I was wondering who that guy was. Is there any way to get contact with megaloler other than chat?
|
|
|
Post by Qwerty on Nov 23, 2010 5:47:50 GMT
Well, you can use his own bot to page him, but that's still in chat, I guess.
|
|
|
Post by guyfox on Nov 27, 2010 7:22:58 GMT
the most recent version of the lib can always be found at: guyfox.pastebay.com/if you need any help using it, feel free to PM me on chatango
|
|
|
Post by ~Memzak~ on Nov 27, 2010 8:58:12 GMT
Haha a gift from the master himself!
Cool. A wall of coding text. XD
As I said on chat, until I fully master Java (which will take a while) I won't start python. I'll only start it after I finish Java. Although I've done a lot of the basics (on another PC) I have none of the software needed here. (which isn't much, but is needed)
Basically, I'll finish learning Java first and then go to python. XD I've always thought of python as a bit sloppy for long codes, but a lot simpler for small quick codes.
Anyways,this is good for anyone else who wants to make a chatbot. (like GV and his idea for a Moderator Bot)
|
|
|
Post by Draxorion on Nov 28, 2010 18:32:14 GMT
I got in contact with Krissy (which I believe NONE of you have done), and she told me... That... She deleted B0t... Although she is making a new one, she's only going to go back to it if she gets super bored. Any questions?
|
|
|
Post by ~Memzak~ on Nov 28, 2010 19:39:50 GMT
Yes, why? Why did she delete b0t?
|
|
|
Post by Fringe Pioneer on Nov 28, 2010 23:49:17 GMT
I also have a question: why the apparent attitude as conveyed with capitalizing the word "none" within your parenthetical?
|
|
|
Post by Qwerty on Nov 29, 2010 3:45:01 GMT
Drac, I was regularly chatting with Krissy back when B0t was first introduced. Plenty of us were. Your belief is incorrect.
On a different note, sad to see b0t go, but now we have the tools to make our own, less vulgar version.
|
|
|
Post by Fringe Pioneer on Nov 29, 2010 4:13:15 GMT
As a matter of fact, I think I might be done with the code for a moderator bot that will discourage non-staff (and probably most chatters in general) from using it by requiring a well formed quasi-English syntax.
If it works as intended, it will be capable of banning, unbanning, deleting posts by a user, "easybanning," and leaving chat. It is not as fun as b0t or the fridge bot, but then it is only intended to be a moderating tool, nothing more.
As a matter of fact, I should probably put up my code so others more apt with Python can see if I made any false assumptions or other mistakes...
|
|
|
Post by ~Memzak~ on Nov 29, 2010 6:03:09 GMT
Wow, you've already made it? When did you start it, wasn't it just a couple days ago?
Does it ban depending how many swear words you say per hour?
|
|
|
Post by Rabidbadger on Nov 29, 2010 17:05:47 GMT
Or how many posts in a minute to discourage spam? I never knew we had so many programmers on the site, myself...
|
|
|
Post by Fringe Pioneer on Nov 29, 2010 17:40:37 GMT
Well, I'm more of a Java programmer, not a Python programmer. I didn't even know Java when I first joined the site, but needed AP Computer Science A to get me started. Apparently, somewhere around 2007 or before, College Board switched from teaching C++ to teaching Java. Anyhow, I present to you my attempt at the moderator bot source, minus the password it would use to log in... Attachments:
|
|
|
Post by ~Memzak~ on Nov 29, 2010 18:26:28 GMT
Whoa, you did it for college?! Awesome. Although if you have done Java then python is quite a bit easier to pick up.
|
|
|
Post by disabled on Nov 29, 2010 18:48:27 GMT
I'm kind of missing the function isMod in there. Also there are some weired tabs or spaces in there... But aside from that, not bad, even if I don't understand why its called imperial recruit...
|
|
|
Post by Fringe Pioneer on Nov 29, 2010 19:36:04 GMT
Actually, Memzak, I did it because I wanted to learn it, not necessarily for college. Despite that college is better and, so far, easier than high school, college is not an end, but a mean to an end.
Just as I'm supposedly an Imperial officer, the bot is supposedly a fresh graduate from the Imperial Academy. It's a small joke.
The isMod() function, as defined in the chatango.py library that I used, is supposed to ensure that the bot only listens to chat moderators. The bot is only a moderator's tool, nothing more. Did I use it incorrectly?
As for the weird tabs and spaces, I made the script with Notepad++. Despite that Python script formatting guidelines suggest that one use four spaces instead of a tab, I use tabs that have been modified in Notepad++'s properties to only be 4 spaces long. I hope the nesting is still clear in spite of the weird spacing, since Python is apparently whitespace sensitive?
It turns out that I made a mistake, assuming something was true for Python as it is for Java. I have to use the word "not" to negate a Boolean expression, rather than insert "!" directly in front of a Boolean expression...
|
|
|
Post by MegaLoler on Nov 29, 2010 21:30:52 GMT
On my copy of the chatango lib, it is is_mod() instead of isMod(). Also, from my experience, is_mod() doesn't count the admin. So you would have to do an additional check for the admin by comparing the username with room.admin(). And, yes, Python is whitespace sensitive. Nesting is indicated by the indention of the lines.
|
|
|
Post by disabled on Nov 29, 2010 22:17:20 GMT
I only find an is_mod function too. And shouldn't it be "room.is_mod(poster)" (or "poster.is_mod()" perhaps)? And the whitespaces I was talking about is after the isMod call for example, after the : follow 140 spaces. The next two lines also have around 100 useless spaces. Its nothing serious, but breaks the viewability for me.
And right now, the bot can ban people by someone who could ban the people themself... is there a deeper meaning to this or is this just the beginning?
|
|
|
Post by Fringe Pioneer on Nov 29, 2010 22:33:18 GMT
Oh, some of the lines have side comments. There should be a single-line comment saying that the is_mod() function ensures that only moderators can use the bot. I can probably take those sideline comments out, though...
Also, although maybe only from my perspective, typing commands with a keyboard is better than interfacing with a GUI, with some exceptions. Also, now that I am thinking about it, making commands that will take multiple username arguments would be more ideal, thereby making the textual bot banning superior to GUI manual banning from perspectives other than my own.
So, I need to modify the condition so the chat owner can also use the bot, I need to go through and ensure all borrowed commands are preceded by the constant "room," I need to change the two instances of exclamation marks to "not" (correcting from Java's Boolean NOT to Python's Boolean NOT), and unban does not yet have support in the chatango.py file I have. Are there any other problems with my code?
|
|
|
Post by disabled on Nov 30, 2010 13:52:28 GMT
Side comments are ok for me, its only that the comments come 130 spaces after the code. And I prefere typing commands too. I just didn't know how chatango works...
I didn't try to run the code and didn't pay attention enough to get the error with the not/! but generally it looks ok to me.
|
|
|
Post by Fringe Pioneer on Nov 30, 2010 15:02:29 GMT
Alright, well, I'm going to see if I can't add any more functionality, such as permitting multiple arguments for the ban, unban, delete, and bomb commands...
|
|
|
Post by ~Memzak~ on Nov 30, 2010 16:27:36 GMT
Could you add russian roulette? (so we can get the contest back up)
It isn't really a mod function but bot is never on and when this bot is completed I'm sure it'll be on a lot...
Oh and a lot of code speakers in this thread... *points to disabled and Veers*
|
|