Changeset - 2d3069e6029c
[Not reviewed]
0 1 0
HanzZ - 13 years ago 2012-12-04 18:42:00
hanzz.k@gmail.com
Remove IRC buddies when leaving channel
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
backends/libcommuni/session.h
Show inline comments
 
@@ -55,42 +55,47 @@ public:
 
	typedef std::map<std::string, std::map<std::string, IRCBuddy> > IRCBuddyMap;
 

	
 
	MyIrcSession(const std::string &user, IRCNetworkPlugin *np, const std::string &suffix = "", QObject* parent = 0);
 
	std::string suffix;
 
	int rooms;
 

	
 
	void addAutoJoinChannel(const std::string &channel, const std::string &password) {
 
		m_autoJoin[channel] = boost::make_shared<AutoJoinChannel>(channel, password);
 
	}
 

	
 
	void removeAutoJoinChannel(const std::string &channel) {
 
		m_autoJoin.erase(channel);
 
		removeIRCBuddies(channel);
 
	}
 

	
 
	void setIdentify(const std::string &identify) {
 
		m_identify = identify;
 
	}
 

	
 
	const std::string  &getIdentify() {
 
		return m_identify;
 
	}
 

	
 
	IRCBuddy &getIRCBuddy(const std::string &channel, const std::string &name) {
 
		return m_buddies[channel][name];
 
	}
 

	
 
	void removeIRCBuddy(const std::string &channel, const std::string &name) {
 
		m_buddies[channel].erase(name);
 
	}
 

	
 
	void removeIRCBuddies(const std::string &channel) {
 
		m_buddies.erase(channel);
 
	}
 

	
 
	bool correctNickname(std::string &nickname);
 

	
 
	void on_joined(IrcMessage *message);
 
	void on_parted(IrcMessage *message);
 
	void on_quit(IrcMessage *message);
 
	void on_nickChanged(IrcMessage *message);
 
	void on_modeChanged(IrcMessage *message);
 
	void on_topicChanged(IrcMessage *message);
 
	void on_messageReceived(IrcMessage *message);
 
	void on_numericMessageReceived(IrcMessage *message);
 

	
 
protected Q_SLOTS:
0 comments (0 inline, 0 general)