<< (n[0] == '\0' ? "NULL" : n) << endl;
strcpy(nick, n);
stats = NULL;
+ flags = 0;
}
aClient::aClient(const aClient &right)
cout << "aClient created from another aClient: " << right.nick
<< endl;
stats = NULL;
+ flags = 0;
setData(&right);
}
aClient::aClient()
{
aClient("");
+ flags = 0;
}
aClient::~aClient()
{
- cout << "aClient deleted: " << *this;
+ cout << "aClient deleted: " << *this << flush;
if (stats)
{
- cout << ' ' << stats->name;
+ cout << ' ' << stats->name << ' ' << stats->password << endl << flush;
delete stats;
}
- cout << endl;
+ flags = 0;
+ cout << endl << flush;
}
ostream &operator<<( ostream &out, const aClient &c )
}
}
}
+
+long int aClient::setFlags(long int newflags)
+{
+ flags = newflags;
+ return getFlags();
+}
+
+long int aClient::addFlag(long int flag)
+{
+ flags |= flag;
+ return getFlags();
+}
+
+long int aClient::remFlag(long int flag)
+{
+ flags &= ~flag;
+ return getFlags();
+}