+QString IrcUser::nick() const {
+ return _nick;
+}
+
+QString IrcUser::hostmask() const {
+ return QString("%1!%2@%3").arg(nick()).arg(user()).arg(host());
+}
+
+QString IrcUser::userModes() const {
+ return _userModes;
+}
+
+QStringList IrcUser::channels() const {
+ QStringList chanList;
+ IrcChannel *channel;
+ foreach(channel, _channels) {
+ chanList << channel->name();
+ }
+ return chanList;
+}
+
+// ====================
+// PUBLIC SLOTS:
+// ====================
+void IrcUser::setUser(const QString &user) {
+ if(!user.isEmpty() && _user != user) {
+ _user = user;
+ emit userSet(user);
+ }
+}
+
+void IrcUser::setHost(const QString &host) {
+ if(!host.isEmpty() && _host != host) {
+ _host = host;
+ emit hostSet(host);
+ }