Added convenience signals ircUserJoined(IrcUser *) and ircUserParted(IrcUser *) to...
authorMarcus Eggenberger <egs@quassel-irc.org>
Tue, 13 Nov 2007 16:23:44 +0000 (16:23 +0000)
committerMarcus Eggenberger <egs@quassel-irc.org>
Tue, 13 Nov 2007 16:23:44 +0000 (16:23 +0000)
src/common/ircchannel.cpp
src/common/ircchannel.h

index 29b618f..28d6c6e 100644 (file)
@@ -108,7 +108,9 @@ void IrcChannel::join(IrcUser *ircuser) {
     _userModes[ircuser] = QString();
     ircuser->joinChannel(name());
     connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));
-    // no emit here since the join is propagated by IrcUser
+    // if you wonder why there is no counterpart to ircUserJoined:
+    // the joines are propagted by the ircuser. the signal ircUserJoined is only for convenience
+    emit ircUserJoined(ircuser);
   }
 }
 
@@ -120,7 +122,9 @@ void IrcChannel::part(IrcUser *ircuser) {
   if(isKnownUser(ircuser)) {
     _userModes.remove(ircuser);
     ircuser->partChannel(name());
-    // no emit here since the part is propagated by IrcUser
+    // if you wonder why there is no counterpart to ircUserParted:
+    // the joines are propagted by the ircuser. the signal ircUserParted is only for convenience
+    emit ircUserParted(ircuser);
   }
 }
 
index 40ed3fb..e60634a 100644 (file)
@@ -85,6 +85,9 @@ signals:
   void userModeAdded(QString nick, QString mode);
   void userModeRemoved(QString nick, QString mode);
 
+  void ircUserJoined(IrcUser *ircuser);
+  void ircUserParted(IrcUser *ircuser);
+  
   void initDone();
 
 private slots: