01BTC10 / xmpphp

Automatically exported from code.google.com/p/xmpphp
0 stars 0 forks source link

litle botName bug #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
litle bug:

$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'myBOT', 'password',
'xmpphp', 'gmail.com', $printlog=true, $loglevel=XMPPHP_Log::LEVEL_ERROR);
<-- this is te good way

$conn = new XMPPHP_XMPP('talk.google.com', 5222, 'myBOT@gmail.com',
'password', 'xmpphp', 'gmail.com', $printlog=true,
$loglevel=XMPPHP_Log::LEVEL_ERROR);

it is working but the vcard is not

te problem is:
the google not take diferent:
myBOT
and
myBOT@gmail.com
but the script mage this the simple "vcard" message
username + "@" + servername
myBOT -> myBOT@gmail.com
myBOT@gmail.com -> myBOT@gmail.com@gmail.com
<-- the last is false is not working...

you can fix it:
XMPP.php
line 116:
change this:
$this->user  = $user;
to this:
$this->user  = str_replace("@gmail.com", "", $user);

ps: sorry for my english

Original issue reported on code.google.com by errat...@gmail.com on 24 Oct 2009 at 6:14

GoogleCodeExporter commented 8 years ago
Are you saying you cannot login to gmail with "myBOT" as username only but have 
to
use "myBOT@gmail.com"?

Original comment by cwei...@cweiske.de on 25 Feb 2010 at 6:40

GoogleCodeExporter commented 8 years ago
i can login, just the vcard function is not working if i use myBOT@gmail.com 
because :

"
username + "@" + servername
myBOT -> myBOT@gmail.com
myBOT@gmail.com -> myBOT@gmail.com@gmail.com
"

Original comment by errat...@gmail.com on 25 Feb 2010 at 7:01

GoogleCodeExporter commented 8 years ago
but you should not use myBOT@gmail.com as username. this is plain wrong.

Original comment by cwei...@cweiske.de on 25 Feb 2010 at 7:07

GoogleCodeExporter commented 8 years ago
i can use it (2 mounths ago) and i can login...
thats why i say this is bug in program, because the gtalk is accepted it...

Original comment by errat...@gmail.com on 25 Feb 2010 at 7:11