It doesn't detect it is a registered user and it always enters to the irc channel with the guest name I setup in the pjirc settings page.

Comments

eddanx’s picture

I've fixed this with a simple edit of the pjirc.module file:

Around line 96 change from:
function pjirc_page() {
$pjirc_nick = $user->uid ? $user->name : variable_get('pjirc_nick','Guest');
...

To:

function pjirc_page() {
global $user;
$pjirc_nick = $user->uid ? $user->name : variable_get('pjirc_nick','Guest');
...

In other words, insert a new line with "global $user;" on line 97.

I don't know if this is the recommended way of accessing $user, but it works.

eddanx’s picture

Oh, and (slightly off-topic) to enable registered users with spaces in their name to log on to irc, you have to do something about those spaces. I did str_replace(" ","_",$nick) to replace them with underscores.

hedac’s picture

Status: Active » Fixed

great
fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)