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
90
Issues
90
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
fa466f33
Commit
fa466f33
authored
May 19, 2015
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore commands that flood the user with private messages when listing chans
ref
#2472
parent
21952929
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
0 deletions
+35
-0
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+12
-0
src/irc/irc_client.hpp
src/irc/irc_client.hpp
+23
-0
No files found.
src/irc/irc_client.cpp
View file @
fa466f33
...
...
@@ -459,6 +459,18 @@ void IrcClient::on_channel_message(const IrcMessage& message)
this
->
bridge
->
send_message
(
iid
,
nick
,
body
,
muc
);
}
void
IrcClient
::
on_rpl_liststart
(
const
IrcMessage
&
)
{
}
void
IrcClient
::
on_rpl_list
(
const
IrcMessage
&
)
{
}
void
IrcClient
::
on_rpl_listend
(
const
IrcMessage
&
)
{
}
void
IrcClient
::
empty_motd
(
const
IrcMessage
&
message
)
{
(
void
)
message
;
...
...
src/irc/irc_client.hpp
View file @
fa466f33
...
...
@@ -151,6 +151,23 @@ public:
* IrcUsers in the IrcChannel
*/
void
set_and_forward_user_list
(
const
IrcMessage
&
message
);
/**
* Signal the start of the LIST response. The RFC says its obsolete and
* “not used”, but I we receive it on some servers, so just ignore it.
*/
void
on_rpl_liststart
(
const
IrcMessage
&
message
);
/**
* A single LIST response line (one channel)
*
* The command is handled in a wait_irc callback. This general handler is
* empty and just used to avoid sending a message stanza for each received
* channel.
*/
void
on_rpl_list
(
const
IrcMessage
&
message
);
/**
* Signal the end of the LIST response, ignore.
*/
void
on_rpl_listend
(
const
IrcMessage
&
message
);
/**
* Remember our nick and host, when we are joined to the channel. The list
* of user comes after so we do not send the self-presence over XMPP yet.
...
...
@@ -324,6 +341,12 @@ static const std::unordered_map<std::string, irc_callback_t> irc_callbacks = {
{
"002"
,
&
IrcClient
::
forward_server_message
},
{
"003"
,
&
IrcClient
::
forward_server_message
},
{
"005"
,
&
IrcClient
::
on_isupport_message
},
{
"RPL_LISTSTART"
,
&
IrcClient
::
on_rpl_liststart
},
{
"321"
,
&
IrcClient
::
on_rpl_liststart
},
{
"RPL_LIST"
,
&
IrcClient
::
on_rpl_list
},
{
"322"
,
&
IrcClient
::
on_rpl_list
},
{
"RPL_LISTEND"
,
&
IrcClient
::
on_rpl_listend
},
{
"323"
,
&
IrcClient
::
on_rpl_listend
},
{
"RPL_MOTDSTART"
,
&
IrcClient
::
empty_motd
},
{
"375"
,
&
IrcClient
::
empty_motd
},
{
"RPL_MOTD"
,
&
IrcClient
::
on_motd_line
},
...
...
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