hushhush has asked for the wisdom of the Perl Monks concerning the following question:
hi
I'd like a chatterbox type app, as used here to run on my site.
Basically allowing one public chat area for all, and then the ability to privately chat with the admin. I want to make sure no one can impersonate the admin, and I want users to be able to choose a new nickname at will.
Any suggestions for this sort of thing, right now all I can think of is building something off a jabber server with a javascript client which seems like a lot of work for this minimal functionality.
I guess the server app. as run here isn't available, only clients. So I can't go the route of modifying it to my needs.
thanks for any help in advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: chatterbox like server app (a highly insecure example)
by Corion (Patriarch) on Sep 17, 2008 at 14:34 UTC | |
This reminds me of my highly insecure CGI chat that I have lying around. It has horrible security problems because users can easily impersonate each other and it doesn't escape links or Javascript properly. On the other hand, it's 5 years old already and the security holes were known back then even. Nowadays, I'd clean up the user input using clinton's HTML::StripScripts or something else that limits what kinds of tags you can submit as HTML to the chat. The user authentication would be done as cookies using a secret salt so impersonation couldn't be done by simply by setting a parameter in your request. I haven't included the templates - if there is large enough interest, I can package up the tree and release it onto CPAN.
| [reply] [d/l] |
by kubrat (Scribe) on Sep 17, 2008 at 14:49 UTC | |
I am interested. | [reply] |
|
Re: chatterbox like server app
by mr_mischief (Monsignor) on Sep 17, 2008 at 14:25 UTC | |
Something like these BBSes could be stripped down, but I believe all of them are written in C. Citadel and YAWC are open source, and I think you might be able to get DOC code as well. All of the DOC, Citadel, and YAWC BBSes support direct messages to another user while some also allow public chat. Not all BBSes have chat rooms because it was primarily a posting medium. TheBBS I know uses its own code base which is a couple of major rewrites away from YAWC, and it has a nice chat functionality. Telnet to thebbs.nicorinc.com and start an account to see it in action, and you can tell them Mr Mischief recommended the board. I used to have an all-Perl code base similar to it, but that code was lost years ago. It'd be simple to write again if I had the time. IRC is all about chat, and that's what the 'C' stands for. The 'R' stands for 'relay', because you can have a network of more than one server. There are at least Net::IRC, POE::Component::IRC, POE::Component::Server::IRC, Parse::IRC, and all of their related modules to help with that protocol and command set in Perl. There are also Bot::BasicBot, IRC::Bot, and Infobot among others to handle writing automated IRC bots. Talkers are often similar to MUDs with no game programmed into them. There are pure chat systems all the way through MUSHes and MOOs that have elaborate room editing, navigation between rooms, and even object editing. http://www.talker.com is a hosting provider that specializes in hosting talkers and MUDs. They have a page that links to the code for many talker and MUD server systems on their site, although some of the links are busted. There used to be good support for talkers on IRC under the alt.talkers groups, such as alt.talkers itself, alt.talkers.programming, and alt.talkers.nuts for example. I doubt there's much traffic there these days, but Google Groups likely has lots of the old info. | [reply] |
|
Re: chatterbox like server app
by skiphoppy (Acolyte) on Sep 17, 2008 at 14:02 UTC | |
| [reply] |
|
Re: chatterbox like server app
by bduggan (Pilgrim) on Sep 17, 2008 at 19:02 UTC | |
| [reply] [d/l] |
|
Re: chatterbox like server app
by Anonymous Monk on Sep 17, 2008 at 13:57 UTC | |
| [reply] | |
by Anonymous Monk on Sep 17, 2008 at 14:04 UTC | |
| [reply] | |
|
Re: chatterbox like server app
by kubrat (Scribe) on Sep 17, 2008 at 14:42 UTC | |
I don't think that there's javascript involved in the chatterbox app on this site. It's an html form which you have to keep submitting if you want the follow the conversation. If you want your chatterbox to behave more like a typical chat app then you will need javascript to keep the chatwindow updated or at least use html refresh which isn't pretty. Jabber? If you want your chatterbox app to be accessible to everyone then it will have to work over port 80. And if you already have a webserver running on the machine where you are going to host the app then your only option is to make it a webserver app, like CGI or whatever. Anyway, as you have already guessed a chat app is not as straightforward to build as it may seem on first sight. But there are plenty of free chat apps available on the net and even chat services you can use. Good luck. | [reply] |
|
Re: chatterbox like server app
by hushhush (Novice) on Sep 18, 2008 at 13:03 UTC | |
I think I might try something like a basic cgi client to a local running irc server, exposing only what I need. cheers | [reply] |