you allways get logged in as Guest

Goose4all - May 22, 2007 - 16:47
Project:PJIRC
Version:5.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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!

#1

two2the8 - May 29, 2007 - 02:34
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

Goose4all - May 29, 2007 - 10:16

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

Ishmayl - September 8, 2007 - 16:00

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

Ishmayl - September 8, 2007 - 16:04

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

#5

ruharen - August 8, 2009 - 00:45
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

System Message - August 22, 2009 - 00:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.