/* * Handles commands the user sends. * * Copyright: This file may be distributed under version 2 of the GPL licence. * * alias stuff GPL >= v2 Copyright Per Olofsson * history & find command Copyright Sebastian Felis * * $Id$ */ #include "micq.h" #include #include #include /* fopen parameter */ #include /* fopen parameter */ #include #include "cmd_user.h" #include "util.h" #include "util_ui.h" #include "util_io.h" #include "util_rl.h" #include "util_table.h" #include "util_parse.h" #include "oldicq_compat.h" #include "oldicq_client.h" #include "oscar_base.h" #include "oscar_snac.h" #include "oscar_service.h" #include "oscar_contact.h" #include "oscar_icbm.h" #include "oscar_bos.h" #include "oscar_roster.h" #include "oscar_oldicq.h" #include "im_icq8.h" #include "preferences.h" #include "packet.h" #include "tabs.h" #include "connection.h" #include "tcp.h" #include "icq_response.h" #include "conv.h" #include "peer_file.h" #include "file_util.h" #include "buildmark.h" #include "contact.h" #include "server.h" #include "util_tcl.h" #include "util_ssl.h" #define MAX_STR_BUF 256 /* buffer length for history */ #define DEFAULT_HISTORY_COUNT 10 /* count of last messages of history */ #define MEMALIGN(n) (((n) & -128)+128) /* align of 2^7 blocks for malloc() in CmdUserFind() */ static jump_f CmdUserChange, CmdUserRandom, CmdUserHelp, CmdUserInfo, CmdUserTrans, CmdUserAuto, CmdUserAlias, CmdUserUnalias, CmdUserMessage, CmdUserResend, CmdUserPeek, CmdUserAsSession, CmdUserVerbose, CmdUserRandomSet, CmdUserIgnoreStatus, CmdUserSMS, CmdUserStatusDetail, CmdUserStatusWide, CmdUserSound, CmdUserSoundOnline, CmdUserRegister, CmdUserStatusMeta, CmdUserSoundOffline, CmdUserAutoaway, CmdUserSet, CmdUserClear, CmdUserTogIgnore, CmdUserTogInvis, CmdUserTogVisible, CmdUserAdd, CmdUserRemove, CmdUserAuth, CmdUserURL, CmdUserSave, CmdUserTabs, CmdUserLast, CmdUserHistory, CmdUserFind, CmdUserUptime, CmdUserOldSearch, CmdUserSearch, CmdUserUpdate, CmdUserPass, CmdUserOther, CmdUserAbout, CmdUserQuit, CmdUserConn, CmdUserContact, CmdUserAnyMess, CmdUserGetAuto, CmdUserOpt; #ifdef ENABLE_PEER2PEER static jump_f CmdUserPeer; #endif #ifdef ENABLE_DEBUG static jump_f CmdUserListQueue; #endif static void CmdUserProcess (const char *command, time_t *idle_val, UBYTE *idle_flag); static alias_t *CmdUserLookupAlias (const char *name); static alias_t *CmdUserSetAlias (const char *name, const char *expansion); static int CmdUserRemoveAlias (const char *name); /* 1 = do not apply idle stuff next time v 2 = count this line as being idle v */ static jump_t jump[] = { { &CmdUserRandom, "rand", 0, 0 }, { &CmdUserRandomSet, "setr", 0, 0 }, { &CmdUserHelp, "help", 0, 0 }, { &CmdUserInfo, "f", 0, 0 }, { &CmdUserInfo, "finger", 0, 0 }, { &CmdUserInfo, "info", 0, 0 }, { &CmdUserInfo, "rinfo", 0, 1 }, { &CmdUserTrans, "lang", 0, 0 }, { &CmdUserTrans, "trans", 0, 0 }, { &CmdUserAuto, "auto", 0, 0 }, { &CmdUserAlias, "alias", 0, 0 }, { &CmdUserUnalias, "unalias", 0, 0 }, { &CmdUserAnyMess, "_msg", 0, 0 }, { &CmdUserMessage, "msg", 0, 1 }, { &CmdUserMessage, "r", 0, 2 }, { &CmdUserMessage, "a", 0, 4 }, { &CmdUserMessage, "chat", 0, 8 }, { &CmdUserGetAuto, "getauto", 0, 0 }, { &CmdUserResend, "resend", 0, 0 }, { &CmdUserVerbose, "verbose", 0, 0 }, { &CmdUserIgnoreStatus, "i", 0, 0 }, { &CmdUserStatusDetail, "status", 2, 2 + 8 }, { &CmdUserStatusDetail, "ww", 2, 2 }, { &CmdUserStatusDetail, "ee", 2, 1 + 2 }, { &CmdUserStatusDetail, "w", 2, 4 }, { &CmdUserStatusDetail, "e", 2, 1 + 4 }, { &CmdUserStatusDetail, "wwg", 2, 2 + 32 }, { &CmdUserStatusDetail, "eeg", 2, 1 + 2 + 32 }, { &CmdUserStatusDetail, "wg", 2, 4 + 32 }, { &CmdUserStatusDetail, "eg", 2, 1 + 4 + 32 }, { &CmdUserStatusDetail, "s", 2, 2 + 4 + 8 + 16 }, { &CmdUserStatusDetail, "wwv", 2, 2 + 64 }, { &CmdUserStatusDetail, "eev", 2, 1 + 2 + 64 }, { &CmdUserStatusDetail, "wv", 2, 4 + 64 }, { &CmdUserStatusDetail, "ev", 2, 1 + 4 + 64 }, { &CmdUserStatusDetail, "wwgv", 2, 2 + 32 + 64 }, { &CmdUserStatusDetail, "eegv", 2, 1 + 2 + 32 + 64 }, { &CmdUserStatusDetail, "wgv", 2, 4 + 32 + 64 }, { &CmdUserStatusDetail, "egv", 2, 1 + 4 + 32 + 64 }, { &CmdUserStatusDetail, "sv", 2, 2 + 4 + 8 + 16 + 64 }, { &CmdUserStatusDetail, "_s", 2, 0 }, { &CmdUserStatusMeta, "ss", 2, 1 }, { &CmdUserStatusMeta, "meta", 2, 0 }, { &CmdUserStatusWide, "wide", 2, 1 }, { &CmdUserStatusWide, "ewide", 2, 0 }, { &CmdUserSet, "set", 0, 0 }, { &CmdUserOpt, "opt", 0, 0 }, { &CmdUserOpt, "optglobal", 0, COF_GLOBAL }, { &CmdUserOpt, "optconnection",0, COF_GLOBAL | COF_GROUP }, { &CmdUserOpt, "optgroup", 0, COF_GROUP }, { &CmdUserOpt, "optcontact", 0, COF_CONTACT }, { &CmdUserSound, "sound", 2, 0 }, { &CmdUserSoundOnline, "soundonline", 2, 0 }, { &CmdUserSoundOffline, "soundoffline", 2, 0 }, { &CmdUserAutoaway, "autoaway", 2, 0 }, { &CmdUserChange, "change", 1, -1 }, { &CmdUserChange, "online", 1, STATUS_ONLINE }, { &CmdUserChange, "away", 1, STATUS_AWAY }, { &CmdUserChange, "na", 1, STATUS_NA }, { &CmdUserChange, "occ", 1, STATUS_OCC }, { &CmdUserChange, "dnd", 1, STATUS_DND }, { &CmdUserChange, "ffc", 1, STATUS_FFC }, { &CmdUserChange, "inv", 1, STATUS_INV }, { &CmdUserClear, "clear", 2, 0 }, { &CmdUserTogIgnore, "togig", 0, 0 }, { &CmdUserTogVisible, "togvis", 0, 0 }, { &CmdUserTogInvis, "toginv", 0, 0 }, { &CmdUserAdd, "add", 0, 0 }, { &CmdUserAdd, "addalias", 0, 1 }, { &CmdUserAdd, "addgroup", 0, 2 }, { &CmdUserRemove, "rem", 0, 0 }, { &CmdUserRemove, "remalias", 0, 1 }, { &CmdUserRemove, "remgroup", 0, 2 }, { &CmdUserRegister, "reg", 0, 0 }, { &CmdUserAuth, "auth", 0, 0 }, { &CmdUserURL, "url", 0, 0 }, { &CmdUserSave, "save", 0, 0 }, { &CmdUserTabs, "tabs", 0, 0 }, { &CmdUserLast, "last", 0, 0 }, { &CmdUserUptime, "uptime", 2, 0 }, { &CmdUserHistory, "h", 2, 0 }, { &CmdUserHistory, "history", 2, 0 }, { &CmdUserHistory, "historyd", 2, 1 }, { &CmdUserFind, "find", 2, 0 }, { &CmdUserFind, "finds", 2, 1 }, { &CmdUserQuit, "q", 0, 1 }, { &CmdUserQuit, "quit", 0, 1 }, { &CmdUserQuit, "x", 0, 2 }, { &CmdUserQuit, "exit", 0, 1 }, { &CmdUserPass, "pass", 0, 0 }, { &CmdUserSMS, "sms", 0, 0 }, { &CmdUserPeek, "peek", 0, 0 }, { &CmdUserGetAuto, "peek2", 0, MSGF_GETAUTO | MSG_GET_AWAY }, { &CmdUserAsSession, "as", 0, 0 }, { &CmdUserContact, "contact", 0, 0 }, { &CmdUserOldSearch, "oldsearch", 0, 0 }, { &CmdUserSearch, "search", 0, 0 }, { &CmdUserUpdate, "update", 0, 0 }, { &CmdUserOther, "other", 0, 0 }, { &CmdUserAbout, "about", 0, 0 }, { &CmdUserConn, "conn", 0, 0 }, { &CmdUserConn, "login", 0, 2 }, #ifdef ENABLE_PEER2PEER { &CmdUserPeer, "peer", 0, 0 }, { &CmdUserPeer, "tcp", 0, 0 }, { &CmdUserPeer, "file", 0, 4 }, { &CmdUserPeer, "accept", 0, 22 }, #endif #ifdef ENABLE_TCL { &CmdUserTclScript, "tclscript", 0, 0 }, { &CmdUserTclScript, "tcl", 0, 1 }, #endif #ifdef ENABLE_DEBUG { &CmdUserListQueue, "_queue", 0, 0 }, #endif { NULL, NULL, 0, 0 } }; static alias_t *aliases = NULL; static Connection *conn = NULL; /* Have an opened server connection ready. */ #define OPENCONN \ if (!conn) conn = ConnectionFind (TYPEF_ANY_SERVER, 0, NULL); \ if (!conn || ~conn->connect & CONNECT_OK) \ { rl_print (i18n (1931, "Current session is closed. Try another or open this one.\n")); return 0; } \ /* Try to have any server connection ready. */ #define ANYCONN if (!conn) conn = ConnectionFind (TYPEF_ANY_SERVER, 0, NULL); \ if (!conn) { rl_print (i18n (2397, "No server session found.\n")); return 0; } /* * Returns a pointer to the jump table. */ jump_t *CmdUserTable (void) { return jump; } /* * Looks up an entry in the jump table. */ jump_t *CmdUserLookup (const char *cmd) { jump_t *j; for (j = CmdUserTable (); j->f; j++) if (!strcasecmp (cmd, j->name)) return j; return NULL; } /* * Returns the alias list. */ alias_t *CmdUserAliases (void) { return aliases; } /* * Looks up an alias. */ static alias_t *CmdUserLookupAlias (const char *name) { alias_t *node; for (node = aliases; node; node = node->next) if (!strcasecmp (name, node->name)) break; return node; } /* * Sets an alias. */ static alias_t *CmdUserSetAlias (const char *name, const char *expansion) { alias_t *alias; alias = CmdUserLookupAlias (name); if (!alias) { alias = calloc (1, sizeof (alias_t)); if (aliases) { alias_t *node; for (node = aliases; node->next; node = node->next) ; node->next = alias; } else aliases = alias; } s_repl (&alias->name, name); s_repl (&alias->expansion, expansion); return alias; } /* * Removes an alias. */ static int CmdUserRemoveAlias (const char *name) { alias_t *node, *prev_node = NULL; for (node = aliases; node; node = node->next) { if (!strcasecmp (name, node->name)) break; prev_node = node; } if (node) { if (prev_node) prev_node->next = node->next; else aliases = node->next; free (node->name); free (node->expansion); free (node); return TRUE; } else return FALSE; } /* * Change status. */ static JUMP_F(CmdUserChange) { char *arg1 = NULL; ANYCONN; if (data + 1 == 0) { if (!s_parseint (&args, &data)) { rl_print (i18n (1703, "Status modes:\n")); rl_printf (" %-20s %d\n", i18n (1921, "Online"), STATUS_ONLINE); rl_printf (" %-20s %d\n", i18n (1923, "Away"), STATUS_AWAY); rl_printf (" %-20s %d\n", i18n (1922, "Do not disturb"), STATUS_DND); rl_printf (" %-20s %d\n", i18n (1924, "Not Available"), STATUS_NA); rl_printf (" %-20s %d\n", i18n (1927, "Free for chat"), STATUS_FFC); rl_printf (" %-20s %d\n", i18n (1925, "Occupied"), STATUS_OCC); rl_printf (" %-20s %d\n", i18n (1926, "Invisible"), STATUS_INV); return 0; } } if (!(arg1 = s_parserem (&args))) arg1 = ""; if (data & STATUSF_DND) OptSetStr (&prG->copts, CO_TAUTODND, arg1); else if (data & STATUSF_OCC) OptSetStr (&prG->copts, CO_TAUTOOCC, arg1); else if (data & STATUSF_NA) OptSetStr (&prG->copts, CO_TAUTONA, arg1); else if (data & STATUSF_AWAY) OptSetStr (&prG->copts, CO_TAUTOAWAY, arg1); else if (data & STATUSF_FFC) OptSetStr (&prG->copts, CO_TAUTOFFC, arg1); else if (data & STATUSF_INV) OptSetStr (&prG->copts, CO_TAUTOINV, arg1); if (~conn->connect & CONNECT_OK) conn->status = data; else if (conn->type == TYPE_SERVER) SnacCliSetstatus (conn, data, 1); else { CmdPktCmdStatusChange (conn, data); rl_printf ("%s %s\n", s_now, s_status (conn->status)); } return 0; } /* * Finds random user. */ static JUMP_F(CmdUserRandom) { UDWORD arg1 = 0; OPENCONN; if (!s_parseint (&args, &arg1)) { rl_print (i18n (1704, "Groups:\n")); rl_printf (" %2d %s\n", 1, i18n (1705, "General")); rl_printf (" %2d %s\n", 2, i18n (1706, "Romance")); rl_printf (" %2d %s\n", 3, i18n (1707, "Games")); rl_printf (" %2d %s\n", 4, i18n (1708, "Students")); rl_printf (" %2d %s\n", 6, i18n (1709, "20 something")); rl_printf (" %2d %s\n", 7, i18n (1710, "30 something")); rl_printf (" %2d %s\n", 8, i18n (1711, "40 something")); rl_printf (" %2d %s\n", 9, i18n (1712, "50+")); rl_printf (" %2d %s\n", 10, i18n (1713, "Seeking women")); rl_printf (" %2d %s\n", 11, i18n (1714, "Seeking men")); rl_printf (" %2d %s\n", 49, i18n (1715, "mICQ")); } else IMCliInfo (conn, NULL, arg1); return 0; } /* * Sets the random user group. */ static JUMP_F(CmdUserRandomSet) { UDWORD arg1 = 0; OPENCONN; if (!s_parseint (&args, &arg1)) { rl_print (i18n (1704, "Groups:\n")); rl_printf (" %2d %s\n", conn->version > 6 ? 0 : -1, i18n (1716, "None")); rl_printf (" %2d %s\n", 1, i18n (1705, "General")); rl_printf (" %2d %s\n", 2, i18n (1706, "Romance")); rl_printf (" %2d %s\n", 3, i18n (1707, "Games")); rl_printf (" %2d %s\n", 4, i18n (1708, "Students")); rl_printf (" %2d %s\n", 6, i18n (1709, "20 something")); rl_printf (" %2d %s\n", 7, i18n (1710, "30 something")); rl_printf (" %2d %s\n", 8, i18n (1711, "40 something")); rl_printf (" %2d %s\n", 9, i18n (1712, "50+")); rl_printf (" %2d %s\n", 10, i18n (1713, "Seeking women")); rl_printf (" %2d %s\n", 11, i18n (1714, "Seeking men")); rl_printf (" %2d %s\n", 49, i18n (1715, "mICQ")); } else { if (conn->type == TYPE_SERVER) SnacCliSetrandom (conn, arg1); else CmdPktCmdRandSet (conn, arg1); } return 0; } /* * Displays help. */ static JUMP_F(CmdUserHelp) { struct { const char *category; const char *keyword; const char *help; const char *cmds; const char *warn; } myhelp[] = { { _i18n (1448, "Message"), "message", _i18n (1446, "Commands relating to sending messages."), "msg, a, r, url, sms, chat, getauto, auth, resend, last, h = history, historyd, find, finds, tabs", NULL }, { _i18n (2541, "Status"), "status", _i18n (2542, "Commands to change your status."), "login, online, away, na, occ, dnd, ffc, inv, change", NULL }, { _i18n (1449, "User"), "user", _i18n (1444, "Commands relating to seeing and finding other users."), "f = finger, ss, i, s, e, ee, eg, eeg, ev, eev, egv, eegv, w, ..., wwgv, ewide, wide, search, rand", NULL }, { _i18n (2543, "Contacts"), "contacts", _i18n (2544, "Commands to modify your contact list."), "add, rem, togig, toginv, togvis, addgroup, addalias, remgroup, remalias", NULL }, { _i18n (1450, "Account"), "account", _i18n (1445, "Commands relating to your ICQ account."), "pass, update, other, about, setr, reg", NULL }, { _i18n (1447, "Client"), "client", _i18n (1443, "Commands relating to mICQ displays and configuration."), "verbose, clear, sound, autoaway, auto, alias, unalias, lang, uptime, set, opt, optcontact, optgroup, optconnection, optglobal, save, q = quit = exit, x, !", NULL }, { _i18n (2171, "Advanced"), "advanced", _i18n (2172, "Advanced commands."), "meta, conn, peer, file, accept, contact, peek, peek2, as", _i18n (2314, "These are advanced commands. Be sure to have read the manual pages for complete information.\n") }, #ifdef ENABLE_TCL { _i18n (2342, "Scripting"), "scripting", _i18n (2343, "Advanced commands for scripting."), "tclscript, tcl", _i18n (2314, "These are advanced commands. Be sure to have read the manual pages for complete information.\n") }, #endif { "0000:", "--none--", NULL, NULL, NULL }, { "0000:", "all", NULL, "message status user contacts account client advanced scripting", NULL }, /* trans(=lang) info(=finger) status(>(ee?|ww?)v?g?) rinfo(>info) soundonline(>event) soundoffline(>event) oldsearch(>search) tcp(=peer) */ /* _s _msg _queue */ { NULL } }; strc_t par; char *newargs = NULL; int i; if (!(par = s_parse_s (&args, " \t\r\n,"))) { rl_printf ("%s\n", i18n (1442, "Please select one of the help topics below.")); for (i = 0; myhelp[i].cmds; i++) { rl_printf ("\n"); rl_printf (i18n (2184, "%s%-14s%s - %s\n"), COLQUOTE, i18n (-1, myhelp[i].category), COLNONE, myhelp[i].cmds); if (myhelp[i].help) rl_printf (i18n (2545, " %s\n"), i18n (-1, myhelp[i].help)); if (myhelp[i].warn) rl_printf (i18n (-1, myhelp[i].warn)); } return 0; } do { for (i = 0; myhelp[i].category; i++) { if (myhelp[i].cmds && (!strcasecmp (par->txt, myhelp[i].keyword) || !strcasecmp (par->txt, i18n (-1, myhelp[i].category)))) { char *line = malloc (strlen (args) + strlen (myhelp[i].cmds) + 2); sprintf (line, "%s %s", args, myhelp[i].cmds); s_free (newargs); args = newargs = line; i = -1; par = s_parse_s (&args, " \t\r\n,"); } } /* Message */ if (!strcasecmp (par->txt, "msg")) { CMD_USER_HELP ("msg []", i18n (1409, "Sends a message to .")); CMD_USER_HELP (" ", i18n (1721, "Sending a blank message will put the client into multiline mode.\nUse . on a line by itself to end message.\nUse # on a line by itself to cancel the message.")); } else if (!strcasecmp (par->txt, "a")) CMD_USER_HELP ("a ", i18n (1412, "Sends a message to the last person you sent a message to.")); else if (!strcasecmp (par->txt, "r")) CMD_USER_HELP ("r ", i18n (1414, "Replies to the last person to send you a message.")); else if (!strcasecmp (par->txt, "url")) CMD_USER_HELP ("url ", i18n (1410, "Sends a url and message to .")); else if (!strcasecmp (par->txt, "sms")) CMD_USER_HELP ("sms ", i18n (2039, "Sends a message to a ('s) phone.")); else if (!strcasecmp (par->txt, "chat")) CMD_USER_HELP ("chat []", i18n (2569, "Send and further messages to until canceled.")); else if (!strcasecmp (par->txt, "getauto")) CMD_USER_HELP ("getauto [auto|away|na|dnd|occ|ffc] []", i18n (2304, "Get automatic reply from all for current status, away, not available, do not disturb, occupied, or free for chat.")); else if (!strcasecmp (par->txt, "auth")) CMD_USER_HELP ("auth [grant|deny|req|add] ", i18n (2313, "Grant, deny, request or acknowledge authorization from/to to you/them to their/your contact list.")); else if (!strcasecmp (par->txt, "resend")) CMD_USER_HELP ("resend ", i18n (1770, "Resend your last message to .")); else if (!strcasecmp (par->txt, "last")) CMD_USER_HELP ("last []", i18n (1403, "Displays the last message received from or from everyone.")); else if (!strcasecmp (par->txt, "h")) CMD_USER_HELP ("h [ []]", i18n (2383, "View your last messages of . Type 'h' as short command.")); else if (!strcasecmp (par->txt, "history")) CMD_USER_HELP ("history [ []]", i18n (2383, "View your last messages of . Type 'h' as short command.")); else if (!strcasecmp (par->txt, "historyd")) CMD_USER_HELP ("historyd [ []]", i18n (2395, "View your messages of since .")); else if (!strcasecmp (par->txt, "find")) CMD_USER_HELP ("find ", i18n (2384, "Case insensitive search of in log file of .")); else if (!strcasecmp (par->txt, "finds")) CMD_USER_HELP ("finds ", i18n (2391, "Case sensitive search of in log file of .")); else if (!strcasecmp (par->txt, "tabs")) CMD_USER_HELP ("tabs", i18n (1098, "Display a list of nicknames that you can tab through.")); /* Status */ else if (!strcasecmp (par->txt, "login")) CMD_USER_HELP ("login", "= conn login"); else if (!strcasecmp (par->txt, "online")) CMD_USER_HELP ("online []", i18n (1431, "Set status to \"online\".")); else if (!strcasecmp (par->txt, "away")) CMD_USER_HELP ("away []", i18n (1432, "Set status to \"away\".")); else if (!strcasecmp (par->txt, "na")) CMD_USER_HELP ("na []", i18n (1433, "Set status to \"not available\".")); else if (!strcasecmp (par->txt, "occ")) CMD_USER_HELP ("occ []", i18n (1434, "Set status to \"occupied\".")); else if (!strcasecmp (par->txt, "dnd")) CMD_USER_HELP ("dnd []", i18n (1435, "Set status to \"do not disturb\".")); else if (!strcasecmp (par->txt, "ffc")) CMD_USER_HELP ("ffc []", i18n (1436, "Set status to \"free for chat\".")); else if (!strcasecmp (par->txt, "inv")) CMD_USER_HELP ("inv []", i18n (1437, "Set status to \"invisible\".")); else if (!strcasecmp (par->txt, "change")) CMD_USER_HELP ("change []", i18n (1427, "Changes your status to the status number, or list the available modes.")); /* User */ else if (!strcasecmp (par->txt, "f")) CMD_USER_HELP ("f ", i18n (1430, "Displays general info on or .")); else if (!strcasecmp (par->txt, "finger")) CMD_USER_HELP ("finger ", i18n (1430, "Displays general info on or .")); else if (!strcasecmp (par->txt, "ss")) CMD_USER_HELP ("ss ", i18n (2547, "Displays saved meta data about .")); else if (!strcasecmp (par->txt, "i")) CMD_USER_HELP ("i", i18n (1405, "Lists ignored nicks/uins.")); else if (!strcasecmp (par->txt, "s")) CMD_USER_HELP ("s ", i18n (1400, "Shows locally stored info on or , or on yourself.")); else if (!strcasecmp (par->txt, "e")) CMD_USER_HELP ("e", i18n (1407, "Displays the current status of online people on your contact list.")); else if (!strcasecmp (par->txt, "ee")) CMD_USER_HELP ("ee", i18n (2177, "Displays verbosely the current status of online people on your contact list.")); else if (!strcasecmp (par->txt, "eg")) CMD_USER_HELP ("eg", i18n (2307, "Displays the current status of online people on your contact list, sorted by contact group.")); else if (!strcasecmp (par->txt, "eeg")) CMD_USER_HELP ("eeg", i18n (2309, "Displays verbosely the current status of online people on your contact list, sorted by contact group.")); else if (!strcasecmp (par->txt, "ev")) CMD_USER_HELP ("ev", i18n (2548, "Displays the current status of online people on your contact list, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "eev")) CMD_USER_HELP ("eev", i18n (2549, "Displays verbosely the current status of online people on your contact list, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "egv")) CMD_USER_HELP ("egv", i18n (2550, "Displays the current status of online people on your contact list, sorted by contact group, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "eegv")) CMD_USER_HELP ("eegv", i18n (2551, "Displays verbosely the current status of online people on your contact list, sorted by contact group, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "w")) CMD_USER_HELP ("w", i18n (1416, "Displays the current status of everyone on your contact list.")); else if (!strcasecmp (par->txt, "ww")) CMD_USER_HELP ("ww", i18n (2176, "Displays verbosely the current status of everyone on your contact list.")); else if (!strcasecmp (par->txt, "wg")) CMD_USER_HELP ("wg", i18n (2308, "Displays the current status of everyone on your contact list, sorted by contact group.")); else if (!strcasecmp (par->txt, "wwg")) CMD_USER_HELP ("wwg", i18n (2310, "Displays verbosely the current status of everyone on your contact list, sorted by contact group.")); else if (!strcasecmp (par->txt, "wv")) CMD_USER_HELP ("wv", i18n (2552, "Displays the current status of everyone on your contact list, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "wwv")) CMD_USER_HELP ("wwv", i18n (2553, "Displays verbosely the current status of everyone on your contact list, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "wgv")) CMD_USER_HELP ("wgv", i18n (2554, "Displays the current status of everyone on your contact list, sorted by contact group, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "wwgv")) CMD_USER_HELP ("wwgv", i18n (2555, "Displays verbosely the current status of everyone on your contact list, sorted by contact group, including otherwise hidden contacts.")); else if (!strcasecmp (par->txt, "ewide")) CMD_USER_HELP ("ewide", i18n (2042, "Displays a list of online people on your contact list in a screen wide format.")); else if (!strcasecmp (par->txt, "wide")) CMD_USER_HELP ("wide", i18n (1801, "Displays a list of people on your contact list in a screen wide format.")); else if (!strcasecmp (par->txt, "search")) CMD_USER_HELP ("search [|| ]", i18n (1429, "Searches for an ICQ user.")); else if (!strcasecmp (par->txt, "rand")) CMD_USER_HELP ("rand []", i18n (1415, "Finds a random user in interest group or lists the groups.")); /* Contacts */ else if (!strcasecmp (par->txt, "add")) CMD_USER_HELP ("add [ []| []]", i18n (2556, "Add contact, alias, or contact to group.")); else if (!strcasecmp (par->txt, "rem")) CMD_USER_HELP ("rem [] ", i18n (2557, "Remove alias, or contact from group or contact list.")); else if (!strcasecmp (par->txt, "togig")) CMD_USER_HELP ("togig ", i18n (1404, "Toggles ignoring/unignoring the .")); else if (!strcasecmp (par->txt, "toginv")) CMD_USER_HELP ("toginv ", i18n (2045, "Toggles your visibility to when you're online.")); else if (!strcasecmp (par->txt, "togvis")) CMD_USER_HELP ("togvis ", i18n (1406, "Toggles your visibility to when you're invisible.")); else if (!strcasecmp (par->txt, "addgroup")) CMD_USER_HELP ("addgroup []", i18n (1428, "Adds all contacts in to contact group .")); else if (!strcasecmp (par->txt, "addalias")) CMD_USER_HELP ("addalias []", i18n (2311, "Adds as , or add alias for or .")); else if (!strcasecmp (par->txt, "remgroup")) CMD_USER_HELP ("remgroup [all] group ", i18n (2043, "Remove all contacts in from contact group .")); else if (!strcasecmp (par->txt, "remalias")) CMD_USER_HELP ("remalias [all] ", i18n (2312, "Remove all aliases in , removes contact if 'all' is given.")); /* Account */ else if (!strcasecmp (par->txt, "pass")) CMD_USER_HELP ("pass ", i18n (1408, "Changes your password to .")); else if (!strcasecmp (par->txt, "update")) CMD_USER_HELP ("update", i18n (1438, "Updates your basic info (email, nickname, etc.).")); else if (!strcasecmp (par->txt, "other")) CMD_USER_HELP ("other", i18n (1401, "Updates more user info like age and sex.")); else if (!strcasecmp (par->txt, "about")) CMD_USER_HELP ("about", i18n (1402, "Updates your about user info.")); else if (!strcasecmp (par->txt, "setr")) CMD_USER_HELP ("setr ", i18n (1439, "Sets your random user group.")); else if (!strcasecmp (par->txt, "reg")) CMD_USER_HELP ("reg ", i18n (1426, "Creates a new UIN with the specified password.")); /* Client */ else if (!strcasecmp (par->txt, "verbose")) CMD_USER_HELP ("verbose []", i18n (1418, "Set the verbosity level, or display verbosity level.")); else if (!strcasecmp (par->txt, "clear")) CMD_USER_HELP ("clear", i18n (1419, "Clears the screen.")); else if (!strcasecmp (par->txt, "sound")) CMD_USER_HELP3 ("sound [%s|%s|event]", i18n (1085, "on"), i18n (1086, "off"), i18n (1420, "Switches beeping when receiving new messages on or off, or using the event script.")); else if (!strcasecmp (par->txt, "autoaway")) CMD_USER_HELP ("autoaway []", i18n (1767, "Toggles auto cycling to away/not available.")); else if (!strcasecmp (par->txt, "auto")) { CMD_USER_HELP ("auto [on|off]", i18n (1424, "Set whether autoreplying when not online, or displays setting.")); CMD_USER_HELP ("auto ", i18n (1425, "Sets the message to send as an auto reply for the status.")); } else if (!strcasecmp (par->txt, "alias")) CMD_USER_HELP ("alias [ []]", i18n (2300, "Set an alias or list current aliases.")); else if (!strcasecmp (par->txt, "unalias")) CMD_USER_HELP ("unalias ", i18n (2301, "Delete an alias.")); else if (!strcasecmp (par->txt, "lang")) CMD_USER_HELP ("lang [...]", i18n (1800, "Change the working language (and encoding) to or display string .")); else if (!strcasecmp (par->txt, "uptime")) CMD_USER_HELP ("uptime", i18n (1719, "Shows how long mICQ has been running and some statistics.")); else if (!strcasecmp (par->txt, "set")) CMD_USER_HELP ("set