archive_me1Add my vote for this tag create new tag
, view all tags

Feature Proposal: Add an online IRC Chat to the Support Web


Not many users are familiar with IRC. To facilitate online help we could provide an online IRC client such as CGI:IRC.

-- Contributors: ArthurClemens - 21 Aug 2007


Yes and no. Let me start with the no, so i can end with a positive note. If you are not familiar with irc, ending up in an irc channel might be quite confusing. For example, irc is extremely asynchronous. You ask something, and it might be that your answer arrives 30 minutes later. Or 60.

On the other hand, there could be a short explanation of irc, the medium, to go with the chat page. Just to tell people what to expect (hey, the might even end up in the middle of a flame war smile

CGI:IRC is a nice piece of software, and i have used it on several occassions where a web-based chat is required.

As i mentioned on irc, it might be wise to not install this on twiki.org at the moment, what with the performance problems. I don't believe cgi:irc will affect t.o significantly, but the reverse (the irc session going unresponsive) is likely.

All in all, i'd say it is worth the experiment!

-- KoenMartens - 21 Aug 2007

Nice idea. Yes, worth the experiment! To reduce load, possible to constrain the web based client to just #twiki?

-- PeterThoeny - 22 Aug 2007

just remember that Freenode has bad issues with spammers, and that they (used to?) discourage the use of open web relays.

-- SvenDowideit - 22 Aug 2007

To reduce spamming we could provide the service just for registered TWiki.org users.

-- ArthurClemens - 22 Aug 2007

We should restrict the client to #twiki only anyway. Also, note that freenode does not allow privmsg's for non-registered users. We could even disable /msg in the client, or better: just any command. Just plain chat, if it is meant for people who are not familiar with irc they will not miss, for example, the /nick command.

-- KoenMartens - 22 Aug 2007

Yes, makes sense. No /msg, no /nick, just TWiki.org's WikiName (no TWikiGuest)

-- PeterThoeny - 22 Aug 2007

Even better if the solution can be packaged up for other projects/groups to use as well!

-- CrawfordCurrie - 22 Aug 2007

To not let us held up: let's pack it up after our initial use impressions.

-- ArthurClemens - 22 Aug 2007

This would be fantastic, and I'd love to see it packaged for easy use in my own TWikiSites. Combine a re-useable bot that records own TWikiIRC#Logs with AddOnlineIrcChatToSupportWeb and this could really help out lots of TWikiSites !

-- KeithHelfrich - 22 Aug 2007

Yep, lets go for it.

-- CarloSchulz - 22 Aug 2007

I have set up the CGI:IRC client on my server at home. It is restricted to the following channels: #twiki, #twiki-dev, #motion. When I get a chance I will add #twiki.de to the list. I have created a TWiki interface to it that automatically fills in the user's WikiName, if they don't have one they become Main.TWikiGuestXX where XX is a random two-digit number. Check it out in TWikiIRCWebInterface.

-- JasonHill - 23 Aug 2007

Great! Now we need to make it as simple as possible:

  • no selection of channels, for Support just offer #twiki by default (users should not have to think about it)
  • do not display the server (not important for users)
  • Nickname = "Your nickname" [__________] (or enter your real name)
  • The link in the header "TWikiIRC Login" can be omitted. Avanced users may be directed to the TWikiIRC topic in an explanation text
  • Change the button "Login" to "Start chat"

-- ArthurClemens - 23 Aug 2007

I'll go ahead and remove the channel selection, hide the server, leave just the nickname field, and fix the button. I was going to leave the header on, add a link to TWikiIRC, and just include the topic (just the form of course) into TWikiIRC.

-- JasonHill - 23 Aug 2007

Much better. And it even works now!

-- ArthurClemens - 23 Aug 2007

Ok, we need to put it on twiki.org afterall, since we need to validate whether the user is actually logged on. We could set up some elaborate thing where we send cookies or auth tokens or something, but just putting it on t.o is the simpler solution. Plus, we will have new kick-ass ponies^H^H^H^H^H^Hservers in a few weeks anyway, so load becomes less of a consideration.

-- KoenMartens - 24 Aug 2007

I've written a small irssi script that prints the webchatters IP and reverse IP lookup, so we know who they are and they know we know who they are.. It is running in my irssi atm (which is always on).

use Irssi;
use Irssi::Irc;
use Net::DNS;

use vars qw($VERSION %IRSSI $FINDER);
$VERSION = "0.1";
%IRSSI = (
        authors => "Koen Martens",
        contact => 'gmc@metro.cx',   
        name => "webchatip",
        description => "Identifies web chatters",
        license => "GPLv2",
        url => "http://wordpress.metro.cx/",

sub hex_to_ip
  my $hex=shift;
  if($hex=~/^([a-zA-Z0-9]{2})([a-zA-Z0-9]{2})([a-zA-Z0-9]{2})([a-zA-Z0-9]{2})$/) {
    return hex($1).".".hex($2).".".hex($3).".".hex($4);
  return "unknown";
sub ptr_lookup
  my $ip=shift;

  my $res = Net::DNS::Resolver->new;

  my $packet=$res->search($ip,'PTR');

  if(defined $packet) {

    my @answer=$packet->answer; 
    my @rv=();
    foreach(@answer) {
      push(@rv,$_->rdatastr) if($_->type eq "PTR");

    return join(',',@rv) if($#rv!=-1);
  return "not resolving for PTR" if($#rv==-1);

sub process_join
  my ($server,$channel,$nick,$address) = @_;

  my @channels=('#twiki','#twiki-dev');

  if(grep(/^$channel$/,@channels)) {
    if($address=~/([a-fA-F0-9]{8})\@/) {
        print CLIENTCRAP "[$channel] $nick ($address) is on IP ".hex_to_ip($1).", which is ".ptr_lookup(hex_to_ip($1));
        $server->send_message($channel,"$nick ($address) is on IP ".hex_to_ip($1).", which is ".ptr_lookup(hex_to_ip($1)),

Irssi::signal_add_last('message join', \&process_join);

-- KoenMartens - 24 Aug 2007

The chat login is now on the Support homepage.

-- ArthurClemens - 24 Aug 2007

and appears to be a resounding success already. Well done to all who contributed !!

-- SvenDowideit - 25 Aug 2007

Koen they know we know who they are is really an important feature. I had a CGIirc interface set up on my company web site and some neonazi jerk used it to flame on other channels, thinking he was anonymous. The machine IP was banned from freenode as a result, banning also the twiki irc [LOGGER], and I had a hard time making it allowed again (I provided them the IP of the guy and disabled the interface altogether). Requesting TWiki.org login and showing that we know their IP are important measures, kudos to all on this!

-- ColasNahaboo - 25 Aug 2007

Very nice, good usability enhancement for casual users! Easier for the non-geeks.

Colas brings up a good point. I think we should only allow registered users to log into the web IRC, and exclude TWikiGuest.

Also, it would be cool to have a select list to select between #twiki, #twiki_release, #twiki_marketing and any other TWiki related channel there might be.

-- PeterThoeny - 31 Aug 2007

If you use the script's login form at http://cgiirc.qbfreak.dyndns.org/cgi-bin/cgiirc/irc.cgi you can select between the various TWiki channels. It is not possible to get it to use any channels that not in that list.

As for restricting to registered users, you can do it a couple of ways. We could simply disable the Chat button based on username (easy, not very secure). Alternatively, the script could be installed on TWiki.org and restricted with a .htaccess file in the same way that TWiki's edit and related scripts are.

-- JasonHill - 01 Sep 2007

We've seen many users coming to #twiki via this interface - well done.

-- SvenDowideit - 11 Jan 2008

Edit | Attach | Watch | Print version | History: r24 < r23 < r22 < r21 < r20 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r24 - 2008-01-11 - SvenDowideit
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.