Browse Source

Added Channel::UserTableType and Channel::getUsers()

release/0.19
Jessica James 8 years ago
parent
commit
527afc0abb
  1. 5
      Jupiter/IRC_Client.cpp
  2. 11
      Jupiter/IRC_Client.h

5
Jupiter/IRC_Client.cpp

@ -1638,6 +1638,11 @@ char Jupiter::IRC::Client::Channel::getUserPrefix(const Jupiter::ReadableString
return 0;
}
const Jupiter::IRC::Client::Channel::UserTableType &Jupiter::IRC::Client::Channel::getUsers() const
{
return m_users;
}
size_t Jupiter::IRC::Client::Channel::getUserCount() const
{
return m_users.size();

11
Jupiter/IRC_Client.h

@ -314,6 +314,8 @@ namespace Jupiter
Jupiter::StringS m_prefixes;
};
typedef Jupiter::Hash_Table<Jupiter::StringS, Channel::User, Jupiter::ReadableString> UserTableType;
/**
* @brief Returns the name of the channel.
*
@ -377,6 +379,13 @@ namespace Jupiter
*/
char getUserPrefix(const Jupiter::ReadableString &in_nickname) const;
/**
* @brief Fetches the channel's user table
*
* @return Reference to the channel's user table
*/
const UserTableType &getUsers() const;
/**
* @brief Returns the number of users in this channel.
*
@ -413,7 +422,7 @@ namespace Jupiter
Jupiter::StringS m_name;
Client *m_parent;
int m_type;
Jupiter::Hash_Table<Jupiter::StringS, Channel::User, Jupiter::ReadableString> m_users;
UserTableType m_users;
bool m_adding_names;
}; // Jupiter::IRC::Client::Channel class

Loading…
Cancel
Save