-void IrcUser::joinChannel(IrcChannel *channel) {
- Q_ASSERT(channel);
- if(!_channels.contains(channel)) {
- _channels.insert(channel);
- channel->joinIrcUsers(this);
- }
+
+void IrcUser::updateHostmask(const QString &mask)
+{
+ if (mask == hostmask())
+ return;
+
+ QString user = userFromMask(mask);
+ QString host = hostFromMask(mask);
+ setUser(user);
+ setHost(host);
+}
+
+
+void IrcUser::joinChannel(IrcChannel *channel, bool skip_channel_join)
+{
+ Q_ASSERT(channel);
+ if (!_channels.contains(channel)) {
+ _channels.insert(channel);
+ if (!skip_channel_join)
+ channel->joinIrcUser(this);
+ }
+}
+
+
+void IrcUser::joinChannel(const QString &channelname)
+{
+ joinChannel(network()->newIrcChannel(channelname));