nhammond129 / ch.py

Python library for connecting to Chatango chat servers.
21 stars 20 forks source link

Adding the banned words section to the ch.py? #37

Closed AcePokeMaster closed 10 years ago

AcePokeMaster commented 10 years ago

Well not sure if anyone wants the banned words section in this ch.py besides me. I have the code for it so if anyone wants it added to the nullspeaker ch.py just comment and I'll make a pull request.

nhammond129 commented 10 years ago

Can you explain what banned words is? If it's a clientside profanity filter of sorts, that's kinda for the bot/client writer to add in, and not quite our responsibility.

AcePokeMaster commented 10 years ago

Well I mean some ch.py's are able to retrieve the chat's banned word lists and is able to add or remove(can't really do remove since you can't say the word to remove it) banned words from the list.

asl97 commented 10 years ago

stop calling other chatango library ch.py, they are NOT ch.py, they are other chatango library, NOT ch.py

AcePokeMaster commented 10 years ago

You are very wrong @asl97. On the top of the file clearly says "ch.py" just like any ch.py has. So please do tell me how I'm wrong?

asl97 commented 10 years ago

there is no ch.py officially release by anyone that support banned word.

this is not ch.py, https://github.com/cellsheet/chlib/blob/master/chlib.py this is also not ch.py, https://github.com/asl97/chatango.py/blob/master/chatango.py those are chatango library that support banned word, they aren't ch.py

AcePokeMaster commented 10 years ago

You haven't seen the version I have then of the ch.py. Only a few have it including myself, the owner of Lerxst, and about 10 others if not more. Also I clearly said "ch.py" not chlib.py or chatango.py

asl97 commented 10 years ago

so it's not even release, my point still stand, there is no ch.py that support banned word that is release

and if it isn't release, it isn't part of the network of revision of ch.pys on the web so it isn't and shouldn't be call ch.py

AcePokeMaster commented 10 years ago

Nope actually I'm correct. I looked up on pastebin.com for ch.py version 1.3 and found it. It was released by Agunq on March 21 2014. Which has the support banned word. And here's the proof: http://pastebin.com/n55fhAx5

asl97 commented 10 years ago

come on, why are you giving us rubbish again?

and i wouldn't call pasting into a pastebin a release, search engine wouldn't be able to find them through normal means

AcePokeMaster commented 10 years ago

It's not rubbish at all. It's proof that there was a version of the ch.py that was released with banned words. Therefore making my statement correct and your's false.

asl97 commented 10 years ago

so you telling me this is good code? don't tell me you can't see what's wrong with it

                for word in args[1:]:
                        words = urllib.parse.unquote(word).split(", ")
                        for word in words:
                                if word not in self._bannedwords:
                                        if len(word) > 4:
                                                self._bannedwords.append(word)
                for word in self._bannedwords:
                        wd = args[1:]
                        for wd in wd:
                                words = urllib.parse.unquote(wd).split(", ")
                                if word not in words:
                                        self._bannedwords.remove(word)
AcePokeMaster commented 10 years ago

Obviously not. That part needs to be redone, however it does do the job even if it is sloppy.

asl97 commented 10 years ago

you know i hate rubbish code and yet instead of coming up with a good example to convince me (and nullspeaker) to add it, you gave me a horrible example

nhammond129 commented 10 years ago

No need to be harsh. And he technically is right about it being ch.py. While it's not the official ch.py, it /is/ an older, unsupported derivative of the original. And if the implementation is ugly, at least it's available here for someone (like @AcePokeMaster since he's the one who wants this functionality :) ) to put in their fork and clean up until it's good enough to request a pull. Then we can discuss better ways to do things in the comments of said request or his/her fork. Dismissing it because it's 'rubbish code' right away isn't the most development-friendly way of handling suggestions. The -whole point- of the issues page is to raise awareness about things that could be improved or changed.

asl97 commented 10 years ago

@AcePokeMaster been EMAILING and FLOODING my inbox for a long time asking stupid things, wasting my time with rubbish code and other time wasting stuff, if it was someone else requesting it, i wouldn't mind adding it in myself but do tell me,

  1. who would use it?
  2. should we force banned word filter if we added it or let the people who use it filter their own message?
  3. would it be worth adding it?
  4. does it affect anything if it isn't added? it work fine without it iirc
nhammond129 commented 10 years ago

That's something to take up with him personally outside of this repository. Though, you should note that everyone starts out by asking stupid questions and making rubbish code. (I know I still do that.)

  1. People who need that functionality, I guess.
  2. Should not be forced. Optional is the way to go. Defaulting to not used, of course, because it might hamper bots that have it on.
  3. Depends on the demand for such functionality. I have no idea what goes on outside of my one little chatango group where people post less than ten times a day total. More features = a more useful library.
  4. No, not really.

I say adding it is a good idea to add this. However: We don't have to take the time implementing it, that can be @AcePokeMaster 's issue if neither of us want to deal with it right now. He can fix it up as best he can, submit a pull request, and then we/I/you/others can civilly suggest improvements before making the final adjudication on that request's acceptance.

AcePokeMaster commented 10 years ago

@asl97 What does this have to do with this issue at the first part of your comment?

1.) Many people use it since a lot of people have version 1.3 of ch.py because it is the only ch.py with working puids that was released to public and the only ch.py with banned words.

2.) That's up to you maintainers.

3.) Yes because then a updated ch.py would have it than a outdated ch.py.

4.) It could affect the choices on programmers on what version of the ch.py they should use.

AcePokeMaster commented 10 years ago

@Nullspeaker I agree with you the on more features = a more useful library part :P

asl97 commented 10 years ago

there you go, people are using that version of 1.3 cause it has PUID and not the banned list, don himself told me he DOESN'T used it, the only person who want it is you, no one else i know need or want it

also, more useless features = a more bloated library

AcePokeMaster commented 10 years ago

Actually two others want it added to this ch.py but don't know how to use github. There probably would be more, if people knew about this github.

nhammond129 commented 10 years ago

@AcePokeMaster Please review the existence of the edit button. Thank you. :)

@asl97 He made a conjunctive statement: puids and the banned words list. You also make a gross assumption with the statement, "the only person who want it is you". This suggestion is here for review on merits other than demand as well.

@AcePokeMaster If those two other people want it added, direct them to this github issue and explain how to use it. We can't accurately judge what people want without people telling us.

Sure would be nice if someone conducted a survey about what ch.py users really want. cough cough

asl97 commented 10 years ago

@Nullspeaker i am sure they all want a fast library which isn't bloated, piks, lumi, cellsheet and lots of other people all think it's flaw and bloated and needlessly adding 'features' would just make it worse.

AcePokeMaster commented 10 years ago

@Nullspeaker Yeah I'm on a outdated version of a iPod so it won't let me edit my comments because of my browser. Sorry about that. And sure I'll talk to them as soon as I can and teach them on how to use it. :P

AcePokeMaster commented 10 years ago

@asl97 You can't just assume that without actually having proof of them saying that. And also this is a opinion I think people just say that because the original author says that himself.

asl97 commented 10 years ago

your browser is what you always say, excuses only, if i can edit my comment on both python and the lynx browser, there no reason why your browser can't.

AcePokeMaster commented 10 years ago

@asl97 Ignore Learn more Please note that GitHub no longer supports old versions of Safari. We recommend upgrading to the latest Safari, Google Chrome, or Firefox.

asl97 commented 10 years ago

lynx is a terminal browser, your argument is invalid

nhammond129 commented 10 years ago

@asl97 It's not quite needlessly adding features when it's something people use and/or sees demand in its implementation. I guess we'll wait for him to get the other people to post here or for him to conduct a survey of all the ch.py users. And if it's always his browser, then that's probably true. Lynx is also more stable than my default android browser...

@asl97 Lynx is also maintained. Have you tried using old GUI browsers? elinks (my preferred terminal browser) works many orders better than them on modern sites.

On Bloat:

Library speed and library size are not the same. Loading time is negligible unless bots are crashing left and right, in which case there's a larger issue at hand. Fifty lines of code can be written in a manner where the feature is fast and has little impact on the rest of the library, or they can be written such that it bogs down everything else when called. It's all in the implementation and the feature itself. I'm not sure how puids would work right now, but I'm certain that the banned words list isn't going to do much to the library's speed, especially since it won't be expected to perform lightning fast: it's just some extra string operations and O(n) parsing with low values of n. We can probably perform operations with it still far faster than we get messages in normal operation.

asl97 commented 10 years ago

@Nullspeaker you must have never been to a room with over 1000 banned words, my room has got over 20000 mods for some unknown reason, there no saying there isn't a room with over 20000 banned words

nhammond129 commented 10 years ago

@asl97 That's incredibly... Odd... I would look into moving to another chat or something. My community's room is on its eighth iteration or so, since users would get mysteriously permabanned from that room and were unable to be unbanned by even the room owner. 'Hexbans' we called them -- I was only able to get out of one once, somehow. We've not had an issue with those in over a year, though.

However, with it, there would always be the option to just not turn it on. The bot can just up and ignore the banned words list if it wants.

Do the flash and html5 clients slow down noticeably with that many banned words? And how do you even carry a conversation that censored?

AcePokeMaster commented 10 years ago

@nullspeaker Chatango fixed those hexban issues so it won't happen anymore.

nhammond129 commented 10 years ago

@AcePokeMaster Good to hear. Do you happen to know why/how they happened and worked?

asl97 commented 10 years ago

off topic much? @AcePokeMaster get those people you talk about to comment or we be getting no where

AcePokeMaster commented 10 years ago

@asl97 They are not online at the moment. And @nullspeaker I actually never heard why they were happening but I do know there was a way to get yourself unban from the hexban.

Apollo9 commented 10 years ago

I'm one of AcePokeMaster's friends and I think the banned word section should be added because I'm looking for a ch.py with a lot of features like the banned words.

nhammond129 commented 10 years ago

There we have it. At least two people desire this functionality. In addition, it is not so heavy of a feature that we should concern ourselves with it causing issues. In freakishly huge chats, devs can just turn it off. On Jun 28, 2014 4:36 PM, "Apollo9" notifications@github.com wrote:

I'm one of AcePokeMaster's friends and I think the banned word section should be added because I'm looking for a ch.py with a lot of features like the banned words.

— Reply to this email directly or view it on GitHub https://github.com/Nullspeaker/ch.py/issues/37#issuecomment-47439180.

AcePokeMaster commented 10 years ago

@nullspeaker Yup :P I really haven't seen a chat with a lot banned words. The biggest banned word list I seen was at examplegroup.chatango.com

asl97 commented 10 years ago

@AcePokeMaster you say 2 others, i only see 1

AcePokeMaster commented 10 years ago

@asl97 I just found out the other went on vacation since he just got out of school. So he won't be able to commenf this week

asl97 commented 10 years ago

so we wait for next week :D

AlThamen commented 10 years ago

@AcePokeMaster I second this motion, would be nice to have for my bot ; o

piks commented 10 years ago

how would banned words even be helpful? I havent found a use for them at all except for informative instances, you cant post them in the room they are banned in so essentially you would have to have 2 different rooms to do it without bypassing the swear ban which keep in mind was set in place by the admin for a reason and that reason wasn't for a bot to post them with bypasses. And altho the ch wasnt ment to be a learners library it seems to be and banned words is a realitivly easy thing to add, in my mind thats the perfect thing for a programmer who wants to learn how to code in his life to acomplish.

AcePokeMaster commented 10 years ago

@piks It is true that they are easy to place in the library. And some pros for ban word list is that you can use the list to prevent the bot from saying any of them, you can get how many banned words there are in chat for information, and if the bot is a room owner it can add the ban words so you don't have to.

piks commented 10 years ago

@AcePokeMaster the bot CANNOT use any of them unless u modify it to bypass it as for the adding banned words to the bot when its admin would that be a new post? its harder to do isnt it?

AcePokeMaster commented 10 years ago

@piks I meant something like this:

if args.lower() in room.bannedwords: return

And what do you mean I can't understand what you're asking me.

asl97 commented 10 years ago

@AcePokeMaster it's completely useless like piks said, are you going to use it to self censor? self censoring is dumb, just let chatango censor it for you

nhammond129 commented 10 years ago

@asl97 I believe the point would lie within automoderation and games.

AcePokeMaster commented 10 years ago

@asl97 Yeah and the say command bots have to prevent the bot from trying say a banned word which might be against the chat rules

asl97 commented 10 years ago

there would be no args receive on the bot side that would match the banned word list cause it would become * once it send pass chatango

AcePokeMaster commented 10 years ago

@asl97 Look at the example I post for Piks.