I'm pretty sure this is a simple fix, but I don't see it:
foreach($rows as $row) {
$result .= "<li><a href='"javascript:void(0)" onclick="javascript:chatWith('.$row->username.')">" .htmlspecialchars(getNameFormatOnline($row->name,$row->username,$ueConfig['name_format']))."</a></li>\n";
}
This is a list of online users; putting the username inside "javascript:chatWith('USERNAME_HERE')", to initiate a chat.
Thanks, James