Mercurial > hg
comparison mcabber/src/commands.c @ 265:49e9e02dd6d0
Add "/roster search" command
author | mikael@frmp8452 |
---|---|
date | Sat, 02 Jul 2005 19:23:45 +0100 |
parents | ab6f83a82811 |
children | 4d7040cff8ee |
comparison
equal
deleted
inserted
replaced
264:b7dd4c337888 | 265:49e9e02dd6d0 |
---|---|
102 compl_add_category_word(COMPL_STATUS, "notavail"); | 102 compl_add_category_word(COMPL_STATUS, "notavail"); |
103 compl_add_category_word(COMPL_STATUS, "away"); | 103 compl_add_category_word(COMPL_STATUS, "away"); |
104 | 104 |
105 // Roster category | 105 // Roster category |
106 compl_add_category_word(COMPL_ROSTER, "bottom"); | 106 compl_add_category_word(COMPL_ROSTER, "bottom"); |
107 compl_add_category_word(COMPL_ROSTER, "top"); | |
107 compl_add_category_word(COMPL_ROSTER, "hide_offline"); | 108 compl_add_category_word(COMPL_ROSTER, "hide_offline"); |
108 compl_add_category_word(COMPL_ROSTER, "show_offline"); | 109 compl_add_category_word(COMPL_ROSTER, "show_offline"); |
109 compl_add_category_word(COMPL_ROSTER, "top"); | 110 compl_add_category_word(COMPL_ROSTER, "search"); |
110 compl_add_category_word(COMPL_ROSTER, "unread_first"); | 111 compl_add_category_word(COMPL_ROSTER, "unread_first"); |
111 compl_add_category_word(COMPL_ROSTER, "unread_next"); | 112 compl_add_category_word(COMPL_ROSTER, "unread_next"); |
112 | 113 |
113 // Roster category | 114 // Roster category |
114 compl_add_category_word(COMPL_BUFFER, "bottom"); | 115 compl_add_category_word(COMPL_BUFFER, "bottom"); |
274 update_roster = TRUE; | 275 update_roster = TRUE; |
275 } else if (!strcasecmp(arg, "unread_first")) { | 276 } else if (!strcasecmp(arg, "unread_first")) { |
276 scr_RosterUnreadMessage(0); | 277 scr_RosterUnreadMessage(0); |
277 } else if (!strcasecmp(arg, "unread_next")) { | 278 } else if (!strcasecmp(arg, "unread_next")) { |
278 scr_RosterUnreadMessage(1); | 279 scr_RosterUnreadMessage(1); |
280 } else if (!strncasecmp(arg, "search", 6)) { | |
281 char *string = arg+6; | |
282 if (*string && (*string != ' ')) { | |
283 scr_LogPrint("Unrecognized parameter!"); | |
284 return; | |
285 } | |
286 while (*string == ' ') | |
287 string++; | |
288 if (!*string) { | |
289 scr_LogPrint("What name or jid are you looking for?"); | |
290 return; | |
291 } | |
292 scr_RosterSearch(string); | |
293 update_roster = TRUE; | |
279 } else | 294 } else |
280 scr_LogPrint("Unrecognized parameter!"); | 295 scr_LogPrint("Unrecognized parameter!"); |
281 } | 296 } |
282 | 297 |
283 void do_status(char *arg) | 298 void do_status(char *arg) |