Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
9c5e422d
Commit
9c5e422d
authored
13 years ago
by
Perttu Ahola
Browse files
Options
Downloads
Patches
Plain Diff
Ban and Auth managers use infostream rather than dstream
parent
5e001410
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/auth.cpp
+6
-6
6 additions, 6 deletions
src/auth.cpp
src/ban.cpp
+6
-6
6 additions, 6 deletions
src/ban.cpp
with
12 additions
and
12 deletions
src/auth.cpp
+
6
−
6
View file @
9c5e422d
...
...
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
//#include "main.h" // for g_settings
#include
<sstream>
#include
"strfnd.h"
#include
"
debu
g.h"
#include
"
lo
g.h"
std
::
set
<
std
::
string
>
privsToSet
(
u64
privs
)
{
...
...
@@ -123,7 +123,7 @@ AuthManager::AuthManager(const std::string &authfilepath):
}
catch
(
SerializationError
&
e
)
{
d
stream
<<
"WARNING: AuthManager: creating "
info
stream
<<
"WARNING: AuthManager: creating "
<<
m_authfilepath
<<
std
::
endl
;
}
}
...
...
@@ -137,11 +137,11 @@ void AuthManager::load()
{
JMutexAutoLock
lock
(
m_mutex
);
d
stream
<<
"AuthManager: loading from "
<<
m_authfilepath
<<
std
::
endl
;
info
stream
<<
"AuthManager: loading from "
<<
m_authfilepath
<<
std
::
endl
;
std
::
ifstream
is
(
m_authfilepath
.
c_str
(),
std
::
ios
::
binary
);
if
(
is
.
good
()
==
false
)
{
d
stream
<<
"AuthManager: failed loading from "
<<
m_authfilepath
<<
std
::
endl
;
info
stream
<<
"AuthManager: failed loading from "
<<
m_authfilepath
<<
std
::
endl
;
throw
SerializationError
(
"AuthManager::load(): Couldn't open file"
);
}
...
...
@@ -183,11 +183,11 @@ void AuthManager::save()
{
JMutexAutoLock
lock
(
m_mutex
);
d
stream
<<
"AuthManager: saving to "
<<
m_authfilepath
<<
std
::
endl
;
info
stream
<<
"AuthManager: saving to "
<<
m_authfilepath
<<
std
::
endl
;
std
::
ofstream
os
(
m_authfilepath
.
c_str
(),
std
::
ios
::
binary
);
if
(
os
.
good
()
==
false
)
{
d
stream
<<
"AuthManager: failed saving to "
<<
m_authfilepath
<<
std
::
endl
;
info
stream
<<
"AuthManager: failed saving to "
<<
m_authfilepath
<<
std
::
endl
;
throw
SerializationError
(
"AuthManager::save(): Couldn't open file"
);
}
...
...
This diff is collapsed.
Click to expand it.
src/ban.cpp
+
6
−
6
View file @
9c5e422d
...
...
@@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include
<sstream>
#include
<set>
#include
"strfnd.h"
#include
"
debu
g.h"
#include
"
lo
g.h"
BanManager
::
BanManager
(
const
std
::
string
&
banfilepath
)
:
m_banfilepath
(
banfilepath
),
...
...
@@ -35,7 +35,7 @@ BanManager::BanManager(const std::string &banfilepath):
}
catch
(
SerializationError
&
e
)
{
d
stream
<<
"WARNING: BanManager: creating "
info
stream
<<
"WARNING: BanManager: creating "
<<
m_banfilepath
<<
std
::
endl
;
}
}
...
...
@@ -48,11 +48,11 @@ BanManager::~BanManager()
void
BanManager
::
load
()
{
JMutexAutoLock
lock
(
m_mutex
);
d
stream
<<
"BanManager: loading from "
<<
m_banfilepath
<<
std
::
endl
;
info
stream
<<
"BanManager: loading from "
<<
m_banfilepath
<<
std
::
endl
;
std
::
ifstream
is
(
m_banfilepath
.
c_str
(),
std
::
ios
::
binary
);
if
(
is
.
good
()
==
false
)
{
d
stream
<<
"BanManager: failed loading from "
<<
m_banfilepath
<<
std
::
endl
;
info
stream
<<
"BanManager: failed loading from "
<<
m_banfilepath
<<
std
::
endl
;
throw
SerializationError
(
"BanManager::load(): Couldn't open file"
);
}
...
...
@@ -75,12 +75,12 @@ void BanManager::load()
void
BanManager
::
save
()
{
JMutexAutoLock
lock
(
m_mutex
);
d
stream
<<
"BanManager: saving to "
<<
m_banfilepath
<<
std
::
endl
;
info
stream
<<
"BanManager: saving to "
<<
m_banfilepath
<<
std
::
endl
;
std
::
ofstream
os
(
m_banfilepath
.
c_str
(),
std
::
ios
::
binary
);
if
(
os
.
good
()
==
false
)
{
d
stream
<<
"BanManager: failed loading from "
<<
m_banfilepath
<<
std
::
endl
;
info
stream
<<
"BanManager: failed loading from "
<<
m_banfilepath
<<
std
::
endl
;
throw
SerializationError
(
"BanManager::load(): Couldn't open file"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment