Where is $msg instantiated? If not within the function, the scope is wrong.
Are you sure you want a strict comparison, rather than a general comparison (=== vs. ==)?
Where is $nick instantiated? It's not part of the function so it won't see it.
If the function declaration was like:
function process_replies($msg, $nick, $buffer)
{
$user = substr($buffer[1], 1, strpos($buffer[1], "!")-1);
if( ($buffer[2] === $nick) && ($user === 'PRIVMSG') )
{
this->pm($msg, $user);
}
}
~Brett