1
0
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:
Adam
2012-10-01 04:35:36 -04:00
parent b19a3af4db
commit f14a3dfb8a
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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;