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
6512f830
Commit
6512f830
authored
Oct 12, 2015
by
louiz’
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The realname is also saved as an IrcClient member
parent
60d340be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
src/irc/irc_client.cpp
src/irc/irc_client.cpp
+8
-7
src/irc/irc_client.hpp
src/irc/irc_client.hpp
+6
-2
No files found.
src/irc/irc_client.cpp
View file @
6512f830
...
...
@@ -27,6 +27,7 @@ IrcClient::IrcClient(std::shared_ptr<Poller> poller, const std::string& hostname
TCPSocketHandler
(
poller
),
hostname
(
hostname
),
username
(
username
),
realname
(
username
),
current_nick
(
username
),
bridge
(
bridge
),
welcomed
(
false
),
...
...
@@ -115,18 +116,18 @@ void IrcClient::on_connected()
if
(
!
options
.
pass
.
value
().
empty
())
this
->
send_pass_command
(
options
.
pass
.
value
());
#endif
this
->
send_nick_command
(
this
->
username
);
#ifdef USE_DATABASE
std
::
string
username
=
this
->
username
;
if
(
!
options
.
username
.
value
().
empty
())
username
=
options
.
username
.
value
();
std
::
string
realname
=
this
->
username
;
this
->
username
=
options
.
username
.
value
();
if
(
!
options
.
realname
.
value
().
empty
())
realname
=
options
.
realname
.
value
();
this
->
realname
=
options
.
realname
.
value
();
this
->
send_user_command
(
username
,
realname
);
#e
lse
this
->
send_user_command
(
this
->
username
,
this
->
user
name
);
#endif // USE_DATABASE
#e
ndif
this
->
send_user_command
(
this
->
username
,
this
->
real
name
);
this
->
send_gateway_message
(
"Connected to IRC server"
s
+
(
this
->
use_tls
?
" (encrypted)"
:
""
)
+
"."
);
this
->
send_pending_data
();
}
...
...
src/irc/irc_client.hpp
View file @
6512f830
...
...
@@ -254,9 +254,13 @@ private:
*/
const
std
::
string
hostname
;
/**
* The user
name used in the USER irc command
* The username used in the USER irc command
*/
const
std
::
string
username
;
std
::
string
username
;
/**
* The realname used in the USER irc command
*/
std
::
string
realname
;
/**
* Our current nickname on the server
*/
...
...
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