Lines Matching refs:words
84 std::string GetWord(const std::vector<std::string>& words,
86 if (words.size() > index) {
87 return words[index];
93 int GetInt(const std::vector<std::string>& words, size_t index, int def) {
95 if (words.size() > index && talk_base::FromString(words[index], &val)) {
141 std::vector<std::string> words;
155 words.push_back(word);
163 const std::string& command = GetWord(words, 0, "");
169 options.video_bandwidth = GetInt(words, 1, cricket::kAutoBandwidth);
187 } else if ((command == "dtmf") && (words.size() == 2)) {
188 int ev = std::string("0123456789*#").find(words[1][0]);
197 buzz::Jid jid(words[1]);
199 last_sent_to_ = words[1];
200 SendChat(words[1], words[2]);
202 SendChat(last_sent_to_, words[1]);
207 } else if ((words.size() == 2) && (command == "friend")) {
208 InviteFriend(words[1]);
210 std::string to = GetWord(words, 1, "");
213 std::string to = GetWord(words, 1, "");
214 int bandwidth = GetInt(words, 2, cricket::kAutoBandwidth);
220 JoinMuc(GetWord(words, 1, ""));
221 } else if ((words.size() >= 2) && (command == "invite")) {
222 InviteToMuc(words[1], GetWord(words, 2, ""));
224 LeaveMuc(GetWord(words, 1, ""));
227 } else if ((words.size() == 2) && (command == "setvol")) {
228 SetVolume(words[1]);
230 CallVoicemail((words.size() >= 2) ? words[1] : "");