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
c23c99da
Commit
c23c99da
authored
Aug 24, 2017
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t forget to remove the user from the channel, when kicked
fix #3291
parent
fe4ceb72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+10
-3
No files found.
src/irc/irc_client.cpp
View file @
c23c99da
...
...
@@ -1073,12 +1073,18 @@ void IrcClient::on_nick(const IrcMessage& message)
void
IrcClient
::
on_kick
(
const
IrcMessage
&
message
)
{
const
std
::
string
chan_name
=
utils
::
tolower
(
message
.
arguments
[
0
]);
const
std
::
string
target
=
message
.
arguments
[
1
];
const
std
::
string
target
_nick
=
message
.
arguments
[
1
];
const
std
::
string
reason
=
message
.
arguments
[
2
];
IrcChannel
*
channel
=
this
->
get_channel
(
chan_name
);
if
(
!
channel
->
joined
)
return
;
const
bool
self
=
channel
->
get_self
()
->
nick
==
target
;
const
IrcUser
*
target
=
channel
->
find_user
(
target_nick
);
if
(
!
target
)
{
log_warning
(
"Received a KICK command from a nick absent from the channel."
);
return
;
}
const
bool
self
=
channel
->
get_self
()
==
target
;
if
(
self
)
channel
->
joined
=
false
;
IrcUser
author
(
message
.
prefix
);
...
...
@@ -1086,7 +1092,8 @@ void IrcClient::on_kick(const IrcMessage& message)
iid
.
set_local
(
chan_name
);
iid
.
set_server
(
this
->
hostname
);
iid
.
type
=
Iid
::
Type
::
Channel
;
this
->
bridge
.
kick_muc_user
(
std
::
move
(
iid
),
target
,
reason
,
author
.
nick
,
self
);
this
->
bridge
.
kick_muc_user
(
std
::
move
(
iid
),
target_nick
,
reason
,
author
.
nick
,
self
);
channel
->
remove_user
(
target
);
}
void
IrcClient
::
on_invite
(
const
IrcMessage
&
message
)
...
...
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