All pastes #912056 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-21 02:38 UTC
rendered paste body
while(<$sock>) 
{	
	open (MYFILE, '>>data.txt');
        print "--> $_";
	my @personal = split(/ /,$_);
	chomp @personal;
	my @nick2 = split(/!/,$personal[0]);
	my @nick3 = split(/:/,$nick2[0]);
        my $nick = $nick3[1];
	my $chan = $personal[2];
        if ($personal[1] =~ /^PING/)
	{
		my @PONG = split(/:/,$_);
		print $sock "PONG $PONG[1]" 
	}
      	if ($personal[1] =~ /001/)
	{

		
	}
	if ($nick == $master) 
	{
      		if ($personal[3] =~ /:!join/) 
		{ 
			print $sock "join $personal[4]\n";   
 		}
      		if ($personal[3] =~ /:!msg/) 
		{ 
			print $sock "PRIVMSG $personal[4] :$personal[5..]\n";   
 		}
      		if ($personal[3] =~ /:!weather/) 
		{ 
			$zip = $personal[4];
			getWeather();
			print $sock "PRIVMSG $chan :$place - $faren°F\\$celc°C, $humid humidity.\n";
 		}
	}
}