mirror of
https://github.com/anope/anope.git
synced 2026-07-04 23:13:13 +02:00
Fix a few problems found by Cronusa and KindOne
This commit is contained in:
+2
-2
@@ -326,11 +326,11 @@ MessageSource::MessageSource(const Anope::string &src) : source(src), u(NULL), s
|
||||
this->u = finduser(src);
|
||||
}
|
||||
|
||||
MessageSource::MessageSource(User *_u) : source(_u->nick), u(_u), s(NULL)
|
||||
MessageSource::MessageSource(User *_u) : source(_u ? _u->nick : ""), u(_u), s(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
MessageSource::MessageSource(Server *_s) : source(_s->GetName()), u(NULL), s(_s)
|
||||
MessageSource::MessageSource(Server *_s) : source(_s ? _s->GetName() : ""), u(NULL), s(_s)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ void Server::SetSID(const Anope::string &sid)
|
||||
*/
|
||||
const Anope::string &Server::GetSID() const
|
||||
{
|
||||
if (!this->SID.empty())
|
||||
if (!this->SID.empty() && ircdproto->RequiresID)
|
||||
return this->SID;
|
||||
else
|
||||
return this->Name;
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ const Anope::string &User::GetCloakedHost() const
|
||||
|
||||
const Anope::string &User::GetUID() const
|
||||
{
|
||||
if (!this->uid.empty())
|
||||
if (!this->uid.empty() && ircdproto->RequiresID)
|
||||
return this->uid;
|
||||
else
|
||||
return this->nick;
|
||||
|
||||
Reference in New Issue
Block a user