#!/usr/bin/perl ################################################################### # Whoson.pl # # Version: 1.3 Blind Wolf Edition ################################################################### ### Version Info ### $YaBBversion = '1 Gold - SP 1.3.1'; $whosonplver = '1 Gold - SP 1.3.1'; ###### ################################################# ## SETTINGS ## ################################################# $adv_imbox = 1; #Set to 1 if you have The Advanced IM Box installed ################################################# &WhoHeader; &WhoIM; sub WhoHeader { ### This section is taken from YaBB.pl ### if( $ENV{'SERVER_SOFTWARE'} =~ /IIS/ ) { $yyIIS = 1; $0 =~ m~(.*)(\\|/)~; $yypath = $1; $yypath =~ s~\\~/~g; chdir($yypath); push(@INC,$yypath); } use CGI::Carp qw(fatalsToBrowser); require "Settings.pl"; require "$language"; require "$sourcedir/Subs.pl"; require "$sourcedir/Load.pl"; require "$vardir/WhosonSettings.txt"; use CGI qw/:standard/; ### Load the user's cookie (or set to guest) ### &LoadCookie; if( fopen(FILE, "$memberdir/$username.dat") ) {; @settings=; fclose(FILE); for( $_ = 0; $_ < @settings; $_++ ) { $settings[$_] =~ s~[\n\r]~~g; } $realname = $settings[1]; } ### Prints HTTP headers - based on header in Sub.pl ### if( $yyForceIIS ) { $headers = "HTTP/1.0 200 OK\n"; } $headers .= "Content-type: text/html;CHARSET=$yycharset\n\n"; print $headers; &WriteLog; } sub WhoIM { print qq~~; if($username ne "Guest" && $username ne '' && $action ne "logout") { fopen(IM, "$memberdir/$username.msg"); @immessages = ; fclose(IM); fopen(OM, "$memberdir/$username.outbox"); @outmessages = ; fclose(OM); $moutnum=@outmessages; foreach $curline (@immessages) { ($imusername, $imsub, $imdate, $mmessage, $imessageid, $mip, $imnew) = split(/\|/,$curline); if($imnew == 1) { $imnewcount++; } } if($imnewcount eq "") { $imnewcount=0; } if($imnewcount == 1) { $imnewtext = qq~$imtxt{'16'}.~; } else { $imnewtext = qq~$imtxt{'17'}.~; } if($enable_mailsounds == 1) { if($imnewcount > 0 && $action eq "" && $INFO{'board'} eq "" || $imnewcount > 0 && $action eq "login2") { if(fopen (FILE, "$memberdir/$username.imconfig") ) { open(FILE, "$memberdir/$username.imconfig"); @userimcfg = ; close(FILE); $userimcfg[2] =~ s/\n//g; if($userimcfg[2] ne "blank.wav" && $userimcfg[2] ne "") { $imsound = qq~~; } } } } $mnum = @immessages; $minnum = @immessages; } if ($username ne 'Guest') { if ($adv_imbox eq '1') { print qq~ ~; } if ($adv_imbox eq '0') { print qq~ ~; } } else { ### Quick Login Box by Michael ### print qq~ ~; } ###/Quick Login Box ### print qq~
» $whotxt{'15'}
$txt{'247'} $realname,
$txt{'152'} $minnum ~; if($minnum == 1) { print $whotxt{'13'}; } else { print $whotxt{'05'}; } print qq~ $imnewcount $imnewtext
» $whotxt{'15'}
$txt{'247'} $realname,
$txt{'152'} $messnum ~; if($messnum == 1) { print $txt{'153a'}; } else { print $whotxt{'05'}; } print qq~
» $whotxt{'09'}
$txt{'35'}:
$txt{'36'}:
$whotxt{'10'}
~; } exit;