print $sckSocket "WHO $1\r\n"; #Ask a who from the channel if ($strResponse =~ m/352/) #if it matches 352, start to split { @arystrNames = split(/ /, $strResponse); #split } $arystrNames[5] =~ tr/~&@//d; #the splitted tobanhost print $sckSocket "MODE $strChannel +b $arystrNames[5]\r\n"; #ban him