From: Marcus Eggenberger Date: Tue, 13 Nov 2007 16:23:44 +0000 (+0000) Subject: Added convenience signals ircUserJoined(IrcUser *) and ircUserParted(IrcUser *) to... X-Git-Tag: 0.1.0~73 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=1956aab57bf98ce072ed86f34785e5d7abba35a0;ds=sidebyside Added convenience signals ircUserJoined(IrcUser *) and ircUserParted(IrcUser *) to the IrcChannel. --- diff --git a/src/common/ircchannel.cpp b/src/common/ircchannel.cpp index 29b618f4..28d6c6ed 100644 --- a/src/common/ircchannel.cpp +++ b/src/common/ircchannel.cpp @@ -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); } } diff --git a/src/common/ircchannel.h b/src/common/ircchannel.h index 40ed3fbf..e60634a8 100644 --- a/src/common/ircchannel.h +++ b/src/common/ircchannel.h @@ -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: