Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
louiz’
biboumi
Commits
7fe0dc26
Commit
7fe0dc26
authored
May 11, 2015
by
louiz’
Browse files
Fix the case of the nick for ping requests
fix #3041
parent
ad5bd996
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bridge/bridge.cpp
View file @
7fe0dc26
...
...
@@ -409,13 +409,13 @@ void Bridge::send_irc_user_ping_request(const std::string& irc_hostname, const s
Iid
iid
(
nick
+
"!"
+
irc_hostname
);
this
->
send_private_message
(
iid
,
"
\01
PING "
+
iq_id
+
"
\01
"
);
irc_responder_callback_t
cb
=
[
this
,
nick
,
iq_id
,
to_jid
,
irc_hostname
,
from_jid
](
const
std
::
string
&
hostname
,
const
IrcMessage
&
message
)
->
bool
irc_responder_callback_t
cb
=
[
this
,
nick
=
utils
::
tolower
(
nick
)
,
iq_id
,
to_jid
,
irc_hostname
,
from_jid
](
const
std
::
string
&
hostname
,
const
IrcMessage
&
message
)
->
bool
{
if
(
irc_hostname
!=
hostname
)
return
false
;
IrcUser
user
(
message
.
prefix
);
const
std
::
string
body
=
message
.
arguments
[
1
];
if
(
message
.
command
==
"NOTICE"
&&
user
.
nick
==
nick
&&
if
(
message
.
command
==
"NOTICE"
&&
utils
::
tolower
(
user
.
nick
)
==
nick
&&
message
.
arguments
.
size
()
>=
2
&&
body
.
substr
(
0
,
6
)
==
"
\01
PING "
)
{
const
std
::
string
id
=
body
.
substr
(
6
,
body
.
size
()
-
6
);
...
...
src/irc/irc_client.cpp
View file @
7fe0dc26
...
...
@@ -452,7 +452,7 @@ void IrcClient::on_channel_message(const IrcMessage& message)
else
if
(
body
.
substr
(
1
,
8
)
==
"VERSION
\01
"
)
this
->
bridge
->
send_iq_version_request
(
nick
,
this
->
hostname
);
else
if
(
body
.
substr
(
1
,
5
)
==
"PING "
)
this
->
bridge
->
send_xmpp_ping_request
(
nick
,
this
->
hostname
,
this
->
bridge
->
send_xmpp_ping_request
(
utils
::
tolower
(
nick
)
,
this
->
hostname
,
body
.
substr
(
6
,
body
.
size
()
-
7
));
}
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment