Mercurial > pidgin.yaz
comparison src/util.c @ 1254:9da444224f0e
[gaim-migrate @ 1264]
bmiller's away-on-signon patch. does --away=mesg use "mesg" or the away message titled "mesg"? i didn't look hehe. but if it uses "mesg" instead of the away message titled "mesg" then i'm not sure it works.... i figured someone would report a bug if it didn't work
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 14 Dec 2000 00:11:59 +0000 |
parents | 46c09828e929 |
children | 677e2c9e8baf |
comparison
equal
deleted
inserted
replaced
1253:8342d3aab1f1 | 1254:9da444224f0e |
---|---|
1101 { | 1101 { |
1102 switch (mode) { | 1102 switch (mode) { |
1103 case 0: /* full help text */ | 1103 case 0: /* full help text */ |
1104 printf("Usage: %s [OPTION]...\n\n" | 1104 printf("Usage: %s [OPTION]...\n\n" |
1105 " -a, --acct display account editor window\n" | 1105 " -a, --acct display account editor window\n" |
1106 " -w, --away[=MESG] make away on signon (optional argument MESG specifies\n" | |
1107 " name of away message to use)\n" | |
1106 " -l, --login[=NAME] automatically login (optional argument NAME specifies\n" | 1108 " -l, --login[=NAME] automatically login (optional argument NAME specifies\n" |
1107 " account(s) to use)\n" | 1109 " account(s) to use)\n" |
1108 " -u, --user=NAME use account NAME\n" | 1110 " -u, --user=NAME use account NAME\n" |
1109 " -v, --version display version information window\n" | 1111 " -v, --version display version information window\n" |
1110 " -h, --help display this help and exit\n", name); | 1112 " -h, --help display this help and exit\n", name); |
1268 dest += 4; | 1270 dest += 4; |
1269 } else | 1271 } else |
1270 *dest++ = *src++; | 1272 *dest++ = *src++; |
1271 } | 1273 } |
1272 } | 1274 } |
1275 | |
1276 | |
1277 void away_on_login (char *mesg) | |
1278 { | |
1279 GSList *awy = away_messages; | |
1280 struct away_message *a, *message = NULL; | |
1281 | |
1282 if (!blist) { | |
1283 return; | |
1284 } | |
1285 | |
1286 if (mesg == NULL) { | |
1287 /* Use default message */ | |
1288 do_away_message((GtkWidget*)NULL, default_away); | |
1289 } else { | |
1290 /* Use argument */ | |
1291 while (awy) { | |
1292 a = (struct away_message *)awy->data; | |
1293 if (strcmp (a->name, mesg) == 0) { | |
1294 message = a; | |
1295 break; | |
1296 } | |
1297 awy = awy->next; | |
1298 } | |
1299 if (message == NULL) | |
1300 message = default_away; | |
1301 do_away_message((GtkWidget*)NULL, message); | |
1302 } | |
1303 return; | |
1304 } |