Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
biboumi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
88
Issues
88
List
Boards
Labels
Service Desk
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
louiz’
biboumi
Commits
1d2f2060
Commit
1d2f2060
authored
Oct 31, 2016
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle IRC message 341 (invite confirmation)
parent
fdf336af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+9
-0
src/irc/irc_client.hpp
src/irc/irc_client.hpp
+4
-0
No files found.
src/irc/irc_client.cpp
View file @
1d2f2060
...
...
@@ -46,6 +46,7 @@ static const std::unordered_map<std::string,
{
"323"
,
{
&
IrcClient
::
on_rpl_listend
,
{
0
,
0
}}},
{
"RPL_NOTOPIC"
,
{
&
IrcClient
::
on_empty_topic
,
{
0
,
0
}}},
{
"331"
,
{
&
IrcClient
::
on_empty_topic
,
{
0
,
0
}}},
{
"341"
,
{
&
IrcClient
::
on_invited
,
{
3
,
0
}}},
{
"RPL_MOTDSTART"
,
{
&
IrcClient
::
empty_motd
,
{
0
,
0
}}},
{
"375"
,
{
&
IrcClient
::
empty_motd
,
{
0
,
0
}}},
{
"RPL_MOTD"
,
{
&
IrcClient
::
on_motd_line
,
{
2
,
0
}}},
...
...
@@ -709,6 +710,14 @@ void IrcClient::empty_motd(const IrcMessage&)
this
->
motd
.
erase
();
}
void
IrcClient
::
on_invited
(
const
IrcMessage
&
message
)
{
const
std
::
string
&
chan_name
=
message
.
arguments
[
2
];
const
std
::
string
&
invited_nick
=
message
.
arguments
[
1
];
this
->
bridge
.
send_xmpp_message
(
this
->
hostname
,
""
,
invited_nick
+
" has been invited to "
+
chan_name
);
}
void
IrcClient
::
on_empty_topic
(
const
IrcMessage
&
message
)
{
const
std
::
string
chan_name
=
utils
::
tolower
(
message
.
arguments
[
1
]);
...
...
src/irc/irc_client.hpp
View file @
1d2f2060
...
...
@@ -213,6 +213,10 @@ public:
* Empty the topic
*/
void
on_empty_topic
(
const
IrcMessage
&
message
);
/**
* The IRC server is confirming that the invitation has been forwarded
*/
void
on_invited
(
const
IrcMessage
&
message
);
/**
* The channel has been completely joined (self presence, topic, all names
* received etc), send the self presence and topic to the XMPP user.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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