Download & Extend

you allways get logged in as Guest

Project:PJIRC
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

it seems that the component dont take care of the nick of the user logged in.
it always connects to irc as Guest. I´ve changed the "Guest-prefix" to Gast in backend. this is working, so it connects as "Gast" but if you are logged in, it does the same (you are "Gast" not the user)

i am using drupal 5.1

any fix is highly appreciated!

thank you!

Comments

#1

Status:active» needs review

I found that this is the case as well. I *think* it's fixed by adding the line global $user to the function pjirc_page -- at least it seems to work for me. I've included a patch, lemme know what you think.

I added another little bit, too:

$pjirc_nick = $user->uid && $user->name <> 'admin' ? $user->name : variable_get('pjirc_nick','Guest');

I found that if I'm logged into drupal as 'admin' and I'm connecting to freenode, for instance, 'admin' is considered an 'erroneous nickname', so I can't connect. I suspect this would be the case for other folks, too. Not sure if this is a good fix, but it works ok.

AttachmentSize
pjirc_userfix.patch 611 bytes

#2

great job..

i´ve found, that this "bug" was in a former version of this module also :)

so, pjirc-team, maybe its better to implement the bugfixes of former releases into future releases as well..? ;-)

thank you for your help!

#3

Would someone mind explaining to me how to do this patch? I'm not really very php savvy, but would like to have this problem fixed.

Thanks :)

#4

Nevermind, I figured it out. Sorry, didn't see the patch download link above earlier.

#5

Status:needs review» fixed

Fixed the part about global $user.

The part about forbidden nicknames is another issue and should be requested as a task for commenting.

Thanks for the patch.

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here