From ff5d306228d1637c9f60481c251d53cb0b20553a Mon Sep 17 00:00:00 2001 From: dgl Date: Fri, 5 Apr 2002 22:02:48 +0000 Subject: [PATCH] *** empty log message *** --- TODO | 26 +++++--------------------- nph-irc.cgi | 13 ++++++++++--- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/TODO b/TODO index 714b51f..8bb1b0d 100644 --- a/TODO +++ b/TODO @@ -12,37 +12,21 @@ IRC Module: :www.polarhome.com 005 a SAFELIST SILENCE KNOCK IRCOPS WATCH=128 MODES=6 MAXCHANNELS=10 MAXBANS=60 MAXEXEMPTS=60 NICKLEN=30 TOPICLEN=307 CHANTYPES=#& CHANMODES=be,k,l,N PREFIX=(aohv)*@%+ NETWORK=BetaONE :are available on this server Commands: -- commands that will call to interface: help += commands that will call to interface: help Interfaces: -Javascript Interface: -- options for userlist - right click context menus -- pop-out needs to work in mozilla too -= tab completeion in mozilla? -- key worded channels / nick in use text entry? +- pop-out/userlist needs to work in mozilla too +- dblclick == query in userlist. = better handling of stream disconnections (also config option to go to page) -= channel part -- close windows --? quit in more than one channel -- configurable things : timestamps - fonts and so on... - -NonJS Interface: -+ do this :) -+ auto detection of browser - += close windows - selecting colour in interfaces? - -irc.cgi: -= how does login work with multiple channels and keys? +- configurable things : timestamps - fonts and so on... nph-irc.cgi: - config fonts - config timestamps - config vhost -+ random value via http referer problem (needs adding to client.c and doing in - nph-irc.cgi) cookie read on frameset load -= session timeout if no data sent (set optionally) Abuse: - ctcp kill/ban diff --git a/nph-irc.cgi b/nph-irc.cgi index bcef53e..3d5a800 100755 --- a/nph-irc.cgi +++ b/nph-irc.cgi @@ -29,7 +29,7 @@ use vars qw( ); ($VERSION = -'$Name: $ 0_5_CVS $Id: nph-irc.cgi,v 1.22 2002/04/03 23:52:42 dgl Exp $' +'$Name: $ 0_5_CVS $Id: nph-irc.cgi,v 1.23 2002/04/05 22:02:48 dgl Exp $' ) =~ s/^.*?(\d\S+) .*$/$1/; $VERSION =~ s/_/./g; @@ -101,17 +101,24 @@ sub net_tcpconnect { my($inet_addr, $port, $family) = @_; my $fh = Symbol::gensym; + socket($fh, $family, SOCK_STREAM, getprotobyname('tcp')) or return(0, $!); + setsockopt($fh, SOL_SOCKET, SO_KEEPALIVE, pack("l", 1)) or return(0, $!); + my $saddr; if($family == AF_INET) { $saddr = sockaddr_in($port, $inet_addr); + if(config_set('vhost')) { + bind($fh, pack_sockaddr_in(0, $config->{vhost})); + } }elsif($family == AF_INET6) { $saddr = sockaddr_in6($port, $inet_addr); + if(config_set('vhost6')) { + bind($fh, pack_sockaddr_in6(0, $config->{vhost6})); + } }else{ return 0; } - socket($fh, $family, SOCK_STREAM, getprotobyname('tcp')) or return(0, $!); - setsockopt($fh, SOL_SOCKET, SO_KEEPALIVE, pack("l", 1)) or return(0, $!); connect($fh, $saddr) or return (0,$!); select($fh);