Changeset c453ada


Ignore:
Timestamp:
May 31, 2008, 11:40:29 PM (16 years ago)
Author:
Geoffrey Thomas <geofft@mit.edu>
Branches:
barnowl_perlaim
Children:
7a1c90d
Parents:
b1fd36e
Message:
Remove aim.c. buddylist.c, buddy.c, libfaim, and everything that uses them.
Files:
47 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • Makefile.in

    r84d48cc rc453ada  
    1010
    1111CC=@CC@
    12 LIBS=@LIBS@ -L./libfaim -lfaim
    13 CFLAGS=@CFLAGS@ -I. -I./libfaim -DDATADIR=\"${datadir}\" -DOWL_SVN_REVNO=$(shell ./svkversion)
     12LIBS=@LIBS@
     13CFLAGS=@CFLAGS@ -DDATADIR=\"${datadir}\" -DOWL_SVN_REVNO=$(shell ./svkversion)
    1414LDFLAGS=@LDFLAGS@
    1515XSUBPPDIR=@XSUBPPDIR@
     
    2525     regex.c history.c view.c dict.c variable.c filterelement.c pair.c \
    2626     keypress.c keymap.c keybinding.c cmd.c context.c zcrypt.c \
    27      aim.c buddy.c buddylist.c timer.c style.c errqueue.c \
     27     timer.c style.c errqueue.c \
    2828     zbuddylist.c muxevents.c popexec.c obarray.c select.c wcwidth.c \
    2929     glib_compat.c
     
    5050all: $(EXE) $(MODULE_DIRS)
    5151
    52 $(EXE): $(AUTOGEN) $(OBJS) owl.o libfaim
     52$(EXE): $(AUTOGEN) $(OBJS) owl.o
    5353        $(ATHSTATIC) $(CC) -o $(EXE) owl.o $(OBJS) $(LDFLAGS) $(LIBS)
    5454
     
    6767        ./tester reg
    6868
    69 clean: libfaimclean modules_clean
     69clean: modules_clean
    7070        $(RM) $(EXE) tester *.o $(AUTOGEN) owl_prototypes.h.new
    7171
    72 distclean: clean libfaimdistclean
     72distclean: clean
    7373        $(RM) config.cache config.log config.status  Makefile config.h TAGS *~ core
    7474
     
    116116$(BASE_OBJS) varstubs.h: owl.h config.h owl_prototypes.h
    117117
    118 libfaim: libfaim/libfaim.a
    119 
    120 libfaim/libfaim.a:
    121         (cd libfaim; $(MAKE))
    122 
    123 libfaimclean:
    124         (cd libfaim; $(MAKE) clean)
    125 
    126 libfaimdistclean:
    127         (cd libfaim; $(MAKE) distclean)
    128 
    129118install: all installdirs
    130119        ${INSTALL_PROGRAM} $(EXE) ${DESTDIR}${bindir}/$(EXE)
  • commands.c

    rb1fd36e rc453ada  
    122122              "      Send to the specified opcode\n"),
    123123
    124   OWLCMD_ARGS("aimwrite", owl_command_aimwrite, OWL_CTX_INTERACTIVE,
    125               "send an AIM message",
    126               "aimwrite <user> [-m <message...>]",
    127               "Send an aim message to a user.\n\n"
    128               "The following options are available:\n\n"
    129               "-m    Specifies a message to send without prompting.\n"),
    130 
    131124  OWLCMD_ARGS("loopwrite", owl_command_loopwrite, OWL_CTX_INTERACTIVE,
    132125              "send a loopback message",
     
    232225              "Execute the owl commands in <filename>.\n"),
    233226
    234   OWLCMD_ARGS("aim", owl_command_aim, OWL_CTX_INTERACTIVE,
    235               "AIM specific commands",
    236               "aim search <email>",
    237               ""),
    238 
    239227  OWLCMD_ARGS("addbuddy", owl_command_addbuddy, OWL_CTX_INTERACTIVE,
    240228              "add a buddy to a buddylist",
    241229              "addbuddy <protocol> <screenname>",
    242               "Add the named buddy to your buddylist.  <protocol> can be aim or zephyr\n"),
     230              "Add the named buddy to your buddylist.  <protocol> can be zephyr\n"),
    243231
    244232  OWLCMD_ARGS("delbuddy", owl_command_delbuddy, OWL_CTX_INTERACTIVE,
     
    246234              "delbuddy <protocol> <screenname>",
    247235              "Delete the named buddy from your buddylist.  <protocol> can be aim or zephyr\n"),
    248 
    249   OWLCMD_ARGS("join", owl_command_join, OWL_CTX_INTERACTIVE,
    250               "join a chat group",
    251               "join aim <groupname> [exchange]",
    252               "Join the AIM chatroom with 'groupname'.\n"),
    253236
    254237  OWLCMD_ARGS("smartzpunt", owl_command_smartzpunt, OWL_CTX_INTERACTIVE,
     
    306289              "znol [-f file]",
    307290              "Print a znol-style listing of users logged in"),
    308 
    309   OWLCMD_ARGS("alist", owl_command_alist, OWL_CTX_INTERACTIVE,
    310               "List AIM users logged in",
    311               "alist",
    312               "Print a listing of AIM users logged in"),
    313291
    314292  OWLCMD_ARGS("blist", owl_command_blist, OWL_CTX_INTERACTIVE,
     
    465443              "Turn on or off a zaway message.  If 'message' is\n"
    466444              "specified turn on zaway with that message, otherwise\n"
    467               "use the default.\n"),
    468 
    469   OWLCMD_ARGS("aaway", owl_command_aaway, OWL_CTX_INTERACTIVE,
    470               "Set, enable or disable AIM away message",
    471               "aaway [ on | off | toggle ]\n"
    472               "aaway <message>",
    473               "Turn on or off the AIM away message.  If 'message' is\n"
    474               "specified turn on aaway with that message, otherwise\n"
    475445              "use the default.\n"),
    476446
     
    530500              "    body       -  message body\n"
    531501              "    hostname   -  hostname of sending host\n"
    532               "    type       -  message type (zephyr, aim, admin)\n"
     502              "    type       -  message type (zephyr, admin...)\n"
    533503              "    direction  -  either 'in' 'out' or 'none'\n"
    534504              "    login      -  either 'login' 'logout' or 'none'\n"
     
    734704          "no argument, it makes search inactive."),
    735705
    736   OWLCMD_ARGS("aimlogin", owl_command_aimlogin, OWL_CTX_ANY,
    737               "login to an AIM account",
    738               "aimlogin <screenname> [<password>]\n",
    739               ""),
    740 
    741   OWLCMD_ARGS("aimlogout", owl_command_aimlogout, OWL_CTX_ANY,
    742               "logout from AIM",
    743               "aimlogout\n",
    744               ""),
    745 
    746706  OWLCMD_ARGS("error", owl_command_error, OWL_CTX_ANY,
    747707              "Display an error message",
     
    1015975}
    1016976
    1017 char *owl_command_alist()
    1018 {
    1019   owl_function_buddylist(1, 0, NULL);
    1020   return(NULL);
    1021 }
    1022 
    1023977char *owl_command_blist()
    1024978{
     
    1044998  sprintf(buff, "Owl version %s", OWL_VERSION_STRING);
    1045999  owl_function_makemsg(buff);
    1046 }
    1047 
    1048 char *owl_command_aim(int argc, char **argv, char *buff)
    1049 {
    1050   if (argc<2) {
    1051     owl_function_makemsg("not enough arguments to aim command");
    1052     return(NULL);
    1053   }
    1054 
    1055   if (!strcmp(argv[1], "search")) {
    1056     if (argc!=3) {
    1057       owl_function_makemsg("not enough arguments to aim search command");
    1058       return(NULL);
    1059     }
    1060     owl_aim_search(argv[2]);
    1061   } else {
    1062     owl_function_makemsg("unknown subcommand '%s' for aim command", argv[1]);
    1063     return(NULL);
    1064   }
    1065   return(NULL);
    10661000}
    10671001
     
    10731007  }
    10741008
    1075   if (!strcasecmp(argv[1], "aim")) {
    1076     if (!owl_global_is_aimloggedin(&g)) {
    1077       owl_function_makemsg("addbuddy: You must be logged into aim to use this command.");
    1078       return(NULL);
    1079     }
    1080     /*
    1081     owl_function_makemsg("This function is not yet operational.  Stay tuned.");
    1082     return(NULL);
    1083     */
    1084     owl_aim_addbuddy(argv[2]);
    1085     owl_function_makemsg("%s added as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g));
    1086   } else if (!strcasecmp(argv[1], "zephyr")) {
     1009  /* TODO add a hook for perl modules */
     1010  if (!strcasecmp(argv[1], "zephyr")) {
    10871011    owl_zephyr_addbuddy(argv[2]);
    10881012    owl_function_makemsg("%s added as zephyr buddy", argv[2]);
    10891013  } else {
    1090     owl_function_makemsg("addbuddy: currently the only supported protocols are 'zephyr' and 'aim'");
     1014    owl_function_makemsg("addbuddy: currently the only supported protocol is 'zephyr'");
    10911015  }
    10921016
     
    11011025  }
    11021026
    1103   if (!strcasecmp(argv[1], "aim")) {
    1104     if (!owl_global_is_aimloggedin(&g)) {
    1105       owl_function_makemsg("delbuddy: You must be logged into aim to use this command.");
    1106       return(NULL);
    1107     }
    1108     owl_aim_delbuddy(argv[2]);
    1109     owl_function_makemsg("%s deleted as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g));
    1110   } else if (!strcasecmp(argv[1], "zephyr")) {
     1027  /* TODO add a hook for perl modules */
     1028  if (!strcasecmp(argv[1], "zephyr")) {
    11111029    owl_zephyr_delbuddy(argv[2]);
    11121030    owl_function_makemsg("%s deleted as zephyr buddy", argv[2]);
    11131031  } else {
    1114     owl_function_makemsg("delbuddy: currently the only supported protocols are 'zephyr' and 'aim'");
    1115   }
    1116 
    1117   return(NULL);
    1118 }
    1119 
    1120 char *owl_command_join(int argc, char **argv, char *buff)
    1121 {
    1122   if (argc!=3 && argc!=4) {
    1123     owl_function_makemsg("usage: join <protocol> <buddyname> [exchange]");
    1124     return(NULL);
    1125   }
    1126 
    1127   if (!strcasecmp(argv[1], "aim")) {
    1128     if (!owl_global_is_aimloggedin(&g)) {
    1129       owl_function_makemsg("join aim: You must be logged into aim to use this command.");
    1130       return(NULL);
    1131     }
    1132     if (argc==3) {
    1133       owl_aim_chat_join(argv[2], 4);
    1134     } else {
    1135       owl_aim_chat_join(argv[2], atoi(argv[3]));
    1136     }
    1137     /* owl_function_makemsg("%s deleted as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g)); */
    1138   } else {
    1139     owl_function_makemsg("join: currently the only supported protocol is 'aim'");
    1140   }
     1032    owl_function_makemsg("delbuddy: currently the only supported protocol is 'zephyr'");
     1033  }
     1034
    11411035  return(NULL);
    11421036}
     
    14211315
    14221316
    1423 char *owl_command_aaway(int argc, char **argv, char *buff)
    1424 {
     1317char *owl_command_away(int argc, char **argv, char *buff)
     1318{
     1319  /* TODO add a hook for perl modules */
    14251320  if ((argc==1) ||
    14261321      ((argc==2) && !strcmp(argv[1], "on"))) {
    1427     owl_global_set_aaway_msg(&g, owl_global_get_aaway_msg_default(&g));
    1428     owl_function_aaway_on();
     1322    owl_global_set_zaway_msg(&g, owl_global_get_zaway_msg_default(&g));
     1323    owl_function_zaway_on();
    14291324    return NULL;
    14301325  }
    14311326
    14321327  if (argc==2 && !strcmp(argv[1], "off")) {
    1433     owl_function_aaway_off();
    1434     return NULL;
    1435   }
    1436 
    1437   if (argc==2 && !strcmp(argv[1], "toggle")) {
    1438     owl_function_aaway_toggle();
    1439     return NULL;
    1440   }
    1441 
    1442   buff = skiptokens(buff, 1);
    1443   owl_global_set_aaway_msg(&g, buff);
    1444   owl_function_aaway_on();
    1445   return NULL;
    1446 }
    1447 
    1448 
    1449 char *owl_command_away(int argc, char **argv, char *buff)
    1450 {
    1451   if ((argc==1) ||
    1452       ((argc==2) && !strcmp(argv[1], "on"))) {
    1453     owl_global_set_aaway_msg(&g, owl_global_get_aaway_msg_default(&g));
    1454     owl_global_set_zaway_msg(&g, owl_global_get_zaway_msg_default(&g));
    1455     owl_function_aaway_on();
    1456     owl_function_zaway_on();
    1457     owl_function_makemsg("Away messages set.", owl_global_get_aaway_msg_default(&g));
    1458     return NULL;
    1459   }
    1460 
    1461   if (argc==2 && !strcmp(argv[1], "off")) {
    1462     owl_function_aaway_off();
    14631328    owl_function_zaway_off();
    14641329    return NULL;
     
    14691334     *  them both on)
    14701335     */
    1471     if (!owl_global_is_zaway(&g) && !owl_global_is_aaway(&g)) {
    1472       owl_function_aaway_toggle();
     1336    if (!owl_global_is_zaway(&g) /* && !owl_global_is_aaway(&g) */) {
    14731337      owl_function_zaway_toggle();
    14741338      owl_function_makemsg("Away messages set.");
    14751339    } else {
    14761340      if (owl_global_is_zaway(&g)) owl_function_zaway_toggle();
    1477       if (owl_global_is_aaway(&g)) owl_function_aaway_toggle();
    14781341      owl_function_makemsg("Away messages off.");
    14791342    }
     
    14821345
    14831346  buff = skiptokens(buff, 1);
    1484   owl_global_set_aaway_msg(&g, buff);
    14851347  owl_global_set_zaway_msg(&g, buff);
    1486   owl_function_aaway_on();
    14871348  owl_function_zaway_on();
    14881349  owl_function_makemsg("Away messages set.");
     
    18571718    owl_function_zwrite_setup(buff);
    18581719  }
    1859   return(NULL);
    1860 }
    1861 
    1862 char *owl_command_aimwrite(int argc, char **argv, char *buff)
    1863 {
    1864   char *newbuff, *recip, **myargv;
    1865   int i, j, myargc;
    1866   owl_message *m;
    1867  
    1868   if (!owl_global_is_aimloggedin(&g)) {
    1869     owl_function_makemsg("You are not logged in to AIM.");
    1870     return(NULL);
    1871   }
    1872 
    1873   if (argc < 2) {
    1874     owl_function_makemsg("Not enough arguments to the aimwrite command.");
    1875     return(NULL);
    1876   }
    1877 
    1878   myargv=argv;
    1879   if (argc<0) {
    1880     owl_function_error("Unbalanced quotes in aimwrite");
    1881     return(NULL);
    1882   }
    1883   myargc=argc;
    1884   if (myargc && *(myargv[0])!='-') {
    1885     myargc--;
    1886     myargv++;
    1887   }
    1888   while (myargc) {
    1889     if (!strcmp(myargv[0], "-m")) {
    1890       if (myargc<2) {
    1891         break;
    1892       }
    1893 
    1894       /* Once we have -m, gobble up everything else on the line */
    1895       myargv++;
    1896       myargc--;
    1897       newbuff=owl_malloc(1);
    1898       newbuff=owl_strdup("");
    1899       while (myargc) {
    1900         newbuff=realloc(newbuff, strlen(newbuff)+strlen(myargv[0])+5);
    1901         strcat(newbuff, myargv[0]);
    1902         strcat(newbuff, " ");
    1903         myargc--;
    1904         myargv++;
    1905       }
    1906       newbuff[strlen(newbuff)-1]='\0'; /* remove last space */
    1907 
    1908       recip=owl_malloc(strlen(argv[0])+5);
    1909       sprintf(recip, "%s ", argv[1]);
    1910       owl_aim_send_im(recip, newbuff);
    1911       m=owl_function_make_outgoing_aim(newbuff, recip);
    1912       if (m) {
    1913           owl_global_messagequeue_addmsg(&g, m);
    1914       } else {
    1915           owl_function_error("Could not create outgoing AIM message");
    1916       }
    1917 
    1918       owl_free(recip);
    1919       owl_free(newbuff);
    1920       return(NULL);
    1921     } else {
    1922       /* we don't care */
    1923       myargv++;
    1924       myargc--;
    1925     }
    1926   }
    1927 
    1928   /* squish arguments together to make one screenname w/o spaces for now */
    1929   newbuff=owl_malloc(strlen(buff)+5);
    1930   sprintf(newbuff, "%s ", argv[0]);
    1931   j=argc-1;
    1932   for (i=0; i<j; i++) {
    1933     strcat(newbuff, argv[i+1]);
    1934   }
    1935    
    1936   owl_function_aimwrite_setup(newbuff);
    1937   owl_free(newbuff);
    19381720  return(NULL);
    19391721}
     
    24992281}
    25002282
    2501 char *owl_command_aimlogin(int argc, char **argv, char *buff)
    2502 {
    2503   if ((argc<2) || (argc>3)) {
    2504     owl_function_makemsg("Wrong number of arguments to aimlogin command");
    2505     return(NULL);
    2506   }
    2507 
    2508   /* if we get two arguments, ask for the password */
    2509   if (argc==2) {
    2510     owl_global_set_buffercommand(&g, argv[1]);
    2511     owl_global_set_buffercallback(&g, &owl_callback_aimlogin);
    2512     owl_function_start_password("AIM Password: ");
    2513     return(NULL);
    2514   } else {
    2515     owl_function_aimlogin(argv[1], argv[2]);
    2516   }
    2517 
    2518   /* this is a test */
    2519   return(NULL);
    2520 }
    2521 
    2522 char *owl_command_aimlogout(int argc, char **argv, char *buff)
    2523 {
    2524   /* clear the buddylist */
    2525   owl_buddylist_clear(owl_global_get_buddylist(&g));
    2526 
    2527   owl_aim_logout();
    2528   return(NULL);
    2529 }
    2530 
    25312283char *owl_command_getstyle(int argc, char **argv, char *buff)
    25322284{
  • configure.ac

    rd9337637 rc453ada  
    126126AC_PROG_INSTALL
    127127
    128 AC_CONFIG_SUBDIRS(libfaim)
    129 
    130128AC_OUTPUT(Makefile)
  • functions.c

    rb1fd36e rc453ada  
    211211}
    212212
    213 /* Create an outgoing AIM message, returns a pointer to the created
    214  * message or NULL if we're not logged into AIM (and thus unable to
    215  * create the message).  Does not put it on the global queue.  Use
    216  * owl_function_add_message() for that .
    217  */
    218 owl_message *owl_function_make_outgoing_aim(char *body, char *to)
    219 {
    220   owl_message *m;
    221 
    222   /* error if we're not logged into aim */
    223   if (!owl_global_is_aimloggedin(&g)) return(NULL);
    224  
    225   m=owl_malloc(sizeof(owl_message));
    226   owl_message_create_aim(m,
    227                          owl_global_get_aim_screenname(&g),
    228                          to,
    229                          body,
    230                          OWL_MESSAGE_DIRECTION_OUT,
    231                          0);
    232   return(m);
    233 }
    234 
    235213/* Create an outgoing loopback message and return a pointer to it.
    236214 * Does not append it to the global queue, use
     
    292270  owl_global_set_buffercommand(&g, line);
    293271  owl_global_set_buffercallback(&g, &owl_callback_zwrite);
    294 }
    295 
    296 void owl_function_aimwrite_setup(char *line)
    297 {
    298   owl_editwin *e;
    299   char buff[1024];
    300 
    301   /* check the arguments */
    302 
    303   /* create and setup the editwin */
    304   e=owl_global_get_typwin(&g);
    305   owl_editwin_new_style(e, OWL_EDITWIN_STYLE_MULTILINE, owl_global_get_msg_history(&g));
    306 
    307   if (!owl_global_get_lockout_ctrld(&g)) {
    308     owl_function_makemsg("Type your message below.  End with ^D or a dot on a line by itself.  ^C will quit.");
    309   } else {
    310     owl_function_makemsg("Type your message below.  End with a dot on a line by itself.  ^C will quit.");
    311   }
    312 
    313   owl_editwin_clear(e);
    314   owl_editwin_set_dotsend(e);
    315   strcpy(buff, "----> ");
    316   strcat(buff, line);
    317   strcat(buff, "\n");
    318   owl_editwin_set_locktext(e, buff);
    319 
    320   /* make it active */
    321   owl_global_set_typwin_active(&g);
    322 
    323   owl_global_set_buffercommand(&g, line);
    324   owl_global_set_buffercallback(&g, &owl_callback_aimwrite);
    325272}
    326273
     
    449396  owl_free(cryptmsg);
    450397  owl_zwrite_free(&z);
    451 }
    452 
    453 void owl_callback_aimwrite(owl_editwin *e) {
    454   owl_function_aimwrite(owl_editwin_get_command(e),
    455                         owl_editwin_get_text(e));
    456 }
    457 
    458 void owl_function_aimwrite(char *line, char *msg)
    459 {
    460   int ret;
    461   char *to, *format_msg;
    462   owl_message *m;
    463 
    464   to = line + 9;
    465 
    466   /* make a formatted copy of the message */
    467   format_msg=owl_strdup(msg);
    468   owl_text_wordunwrap(format_msg);
    469  
    470   /* send the message */
    471   ret=owl_aim_send_im(to, format_msg);
    472   if (!ret) {
    473     owl_function_makemsg("AIM message sent.");
    474   } else {
    475     owl_function_error("Could not send AIM message.");
    476   }
    477 
    478   /* create the outgoing message */
    479   m=owl_function_make_outgoing_aim(msg, to);
    480 
    481   if (m) {
    482     owl_global_messagequeue_addmsg(&g, m);
    483   } else {
    484     owl_function_error("Could not create outgoing AIM message");
    485   }
    486 
    487   owl_free(format_msg);
    488 }
    489 
    490 void owl_function_send_aimawymsg(char *to, char *msg)
    491 {
    492   int ret;
    493   char *format_msg;
    494   owl_message *m;
    495 
    496   /* make a formatted copy of the message */
    497   format_msg=owl_strdup(msg);
    498   owl_text_wordunwrap(format_msg);
    499  
    500   /* send the message */
    501   ret=owl_aim_send_awaymsg(to, format_msg);
    502   if (!ret) {
    503     /* owl_function_makemsg("AIM message sent."); */
    504   } else {
    505     owl_function_error("Could not send AIM message.");
    506   }
    507 
    508   /* create the message */
    509   m=owl_function_make_outgoing_aim(msg, to);
    510   if (m) {
    511     owl_global_messagequeue_addmsg(&g, m);
    512   } else {
    513     owl_function_error("Could not create AIM message");
    514   }
    515   owl_free(format_msg);
    516398}
    517399
     
    895777}
    896778
    897 void owl_callback_aimlogin(owl_editwin *e) {
    898   owl_function_aimlogin(owl_editwin_get_command(e),
    899                         owl_editwin_get_text(e));
    900 }
    901 
    902 void owl_function_aimlogin(char *user, char *passwd) {
    903   int ret;
    904 
    905   /* clear the buddylist */
    906   owl_buddylist_clear(owl_global_get_buddylist(&g));
    907 
    908   /* try to login */
    909   ret=owl_aim_login(user, passwd);
    910   if (ret) owl_function_makemsg("Warning: login for %s failed.\n", user);
    911 }
    912 
    913779void owl_function_suspend()
    914780{
     
    943809}
    944810
    945 void owl_function_aaway_toggle()
    946 {
    947   if (!owl_global_is_aaway(&g)) {
    948     owl_global_set_aaway_msg(&g, owl_global_get_aaway_msg_default(&g));
    949     owl_function_aaway_on();
    950   } else {
    951     owl_function_aaway_off();
    952   }
    953 }
    954 
    955 void owl_function_aaway_on()
    956 {
    957   owl_global_set_aaway_on(&g);
    958   /* owl_aim_set_awaymsg(owl_global_get_zaway_msg(&g)); */
    959   owl_function_makemsg("AIM away set (%s)", owl_global_get_aaway_msg(&g));
    960 }
    961 
    962 void owl_function_aaway_off()
    963 {
    964   owl_global_set_aaway_off(&g);
    965   /* owl_aim_set_awaymsg(""); */
    966   owl_function_makemsg("AIM away off");
    967 }
    968 
    969811void owl_function_quit()
    970812{
     
    988830  owl_zephyr_shutdown();
    989831 
    990   /* Quit AIM */
    991   if (owl_global_is_aimloggedin(&g)) {
    992     owl_aim_logout();
    993   }
    994 
    995832  /* done with curses */
    996833  endwin();
     
    19481785    owl_fmtext_append_normal(&fm, "no\n");
    19491786  }
    1950   owl_fmtext_append_normal(&fm, "  AIM included       : yes\n");
     1787  owl_fmtext_append_normal(&fm, "  AIM included       : no\n");
    19511788  owl_fmtext_append_normal(&fm, "  Loopback included  : yes\n");
    19521789
     
    19601797#endif
    19611798 
    1962 
    1963   owl_fmtext_append_normal(&fm, "\nAIM Status:\n");
    1964   owl_fmtext_append_normal(&fm, "  Logged in: ");
    1965   if (owl_global_is_aimloggedin(&g)) {
    1966     owl_fmtext_append_normal(&fm, owl_global_get_aim_screenname(&g));
    1967     owl_fmtext_append_normal(&fm, "\n");
    1968   } else {
    1969     owl_fmtext_append_normal(&fm, "(not logged in)\n");
    1970   }
    1971 
    1972   owl_fmtext_append_normal(&fm, "  Processing events: ");
    1973   if (owl_global_is_doaimevents(&g)) {
    1974     owl_fmtext_append_normal(&fm, "yes\n");
    1975   } else {
    1976     owl_fmtext_append_normal(&fm, "no\n");
    1977   }
    19781799
    19791800  owl_function_popless_fmtext(&fm);
     
    21201941        if (cc) owl_free(cc);
    21211942      }
    2122     } else if (owl_message_is_type_aim(m)) {
    2123       /* aim */
    2124       if (owl_message_is_direction_out(m)) {
    2125         buff=owl_sprintf("aimwrite %s", owl_message_get_recipient(m));
    2126       } else {
    2127         buff=owl_sprintf("aimwrite %s", owl_message_get_sender(m));
    2128       }
    21291943    } else {
    21301944      char *cmd;
     
    26762490  owl_free(longuser);
    26772491  owl_free(shortuser);
    2678 
    2679   return(filtname);
    2680 }
    2681 
    2682 /* Create a filter for AIM IM messages to or from the specified
    2683  * screenname.  The name of the filter will be 'aimuser-<user>'.  If a
    2684  * filter already exists with this name, no new filter will be
    2685  * created.  This allows the configuration to override this function.
    2686  * Returns the name of the filter, which the caller must free.
    2687  */
    2688 char *owl_function_aimuserfilt(char *user)
    2689 {
    2690   owl_filter *f;
    2691   char *argbuff, *filtname;
    2692   char *escuser;
    2693 
    2694   /* name for the filter */
    2695   filtname=owl_malloc(strlen(user)+40);
    2696   sprintf(filtname, "aimuser-%s", user);
    2697 
    2698   /* if it already exists then go with it.  This lets users override */
    2699   if (owl_global_get_filter(&g, filtname)) {
    2700     return(owl_strdup(filtname));
    2701   }
    2702 
    2703   /* create the new-internal filter */
    2704   f=owl_malloc(sizeof(owl_filter));
    2705 
    2706   escuser = owl_text_quote(user, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    2707 
    2708   argbuff=owl_malloc(1000);
    2709   sprintf(argbuff,
    2710           "( type ^aim$ and ( ( sender ^%s$ and recipient ^%s$ ) or ( sender ^%s$ and recipient ^%s$ ) ) )",
    2711           escuser, owl_global_get_aim_screenname_for_filters(&g),
    2712           owl_global_get_aim_screenname_for_filters(&g), escuser);
    2713 
    2714   owl_filter_init_fromstring(f, filtname, argbuff);
    2715 
    2716   /* add it to the global list */
    2717   owl_global_add_filter(&g, f);
    2718 
    2719   /* free stuff */
    2720   owl_free(argbuff);
    2721   owl_free(escuser);
    27222492
    27232493  return(filtname);
     
    28122582  if (owl_message_is_type_loopback(m)) {
    28132583    return(owl_function_typefilt("loopback"));
    2814   }
    2815 
    2816   /* aim messages */
    2817   if (owl_message_is_type_aim(m)) {
    2818     if (owl_message_is_direction_in(m)) {
    2819       filtname=owl_function_aimuserfilt(owl_message_get_sender(m));
    2820     } else if (owl_message_is_direction_out(m)) {
    2821       filtname=owl_function_aimuserfilt(owl_message_get_recipient(m));
    2822     }
    2823     return(filtname);
    28242584  }
    28252585
     
    32573017void owl_function_buddylist(int aim, int zephyr, char *filename)
    32583018{
    3259   int i, j, x, idle;
     3019  int i, j, x;
    32603020  owl_fmtext fm;
    3261   owl_buddylist *bl;
    3262   owl_buddy *b;
    32633021  owl_list anyone;
    3264   char *foo, *timestr;
    32653022#ifdef HAVE_LIBZEPHYR
    32663023  char *tmp, *user, *line;
     
    32713028  owl_fmtext_init_null(&fm);
    32723029
    3273   /* AIM first */
    3274   if (aim && owl_global_is_aimloggedin(&g)) {
    3275     bl=owl_global_get_buddylist(&g);
    3276 
    3277     owl_fmtext_append_bold(&fm, "AIM users logged in:\n");
    3278     /* we're assuming AIM for now */
    3279     j=owl_buddylist_get_size(bl);
    3280     for (i=0; i<j; i++) {
    3281       b=owl_buddylist_get_buddy_n(bl, i);
    3282       idle=owl_buddy_get_idle_time(b);
    3283       if (idle!=0) {
    3284         timestr=owl_util_minutes_to_timestr(idle);
    3285       } else {
    3286         timestr=owl_strdup("");
    3287       }
    3288       foo=owl_sprintf("  %-20.20s %-12.12s\n", owl_buddy_get_name(b), timestr);
    3289       owl_fmtext_append_normal(&fm, foo);
    3290       owl_free(timestr);
    3291       owl_free(foo);
    3292     }
    3293   }
     3030  if (aim && !zephyr)
     3031    owl_fmtext_append_normal(&fm, "Warning: AIM support in C has been disabled.\n");
    32943032
    32953033#ifdef HAVE_LIBZEPHYR
  • glib_compat.c

    rc60ade2 rc453ada  
    1 #include <owl.h>
     1#include "owl.h"
    22
    33#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 14)
  • global.c

    r9f4e3f8 rc453ada  
    9797  owl_popwin_init(&(g->pw));
    9898
    99   g->aim_screenname=NULL;
    100   g->aim_screenname_for_filters=NULL;
    101   g->aim_loggedin=0;
    102   owl_timer_create_countdown(&(g->aim_noop_timer), 30);
    103   owl_timer_create_countdown(&(g->aim_ignorelogin_timer), 0);
    104   owl_timer_create_countdown(&(g->aim_buddyinfo_timer), 60);
    105   owl_buddylist_init(&(g->buddylist));
    106    
    10799  g->havezephyr=0;
    108   g->haveaim=0;
    109   owl_global_set_no_doaimevents(g);
    110100
    111101  owl_errqueue_init(&(g->errqueue));
     
    733723}
    734724
    735 /* AIM stuff */
    736 
    737 int owl_global_is_aimloggedin(owl_global *g)
    738 {
    739   if (g->aim_loggedin) return(1);
    740   return(0);
    741 }
    742 
    743 char *owl_global_get_aim_screenname(owl_global *g)
    744 {
    745   if (owl_global_is_aimloggedin(g)) {
    746     return (g->aim_screenname);
    747   }
    748   return("");
    749 }
    750 
    751 char *owl_global_get_aim_screenname_for_filters(owl_global *g)
    752 {
    753   if (owl_global_is_aimloggedin(g)) {
    754     return (g->aim_screenname_for_filters);
    755   }
    756   return("");
    757 }
    758 
    759 void owl_global_set_aimloggedin(owl_global *g, char *screenname)
    760 {
    761   char *sn_escaped, *quote;
    762   g->aim_loggedin=1;
    763   if (g->aim_screenname) owl_free(g->aim_screenname);
    764   if (g->aim_screenname_for_filters) owl_free(g->aim_screenname_for_filters);
    765   g->aim_screenname=owl_strdup(screenname);
    766   sn_escaped = owl_text_quote(screenname, OWL_REGEX_QUOTECHARS, OWL_REGEX_QUOTEWITH);
    767   quote = owl_getquoting(sn_escaped);
    768   g->aim_screenname_for_filters=owl_sprintf("%s%s%s", quote, sn_escaped, quote);
    769   owl_free(sn_escaped);
    770 }
    771 
    772 void owl_global_set_aimnologgedin(owl_global *g)
    773 {
    774   g->aim_loggedin=0;
    775 }
    776 
    777 int owl_global_is_doaimevents(owl_global *g)
    778 {
    779   if (g->aim_doprocessing) return(1);
    780   return(0);
    781 }
    782 
    783 void owl_global_set_doaimevents(owl_global *g)
    784 {
    785   g->aim_doprocessing=1;
    786 }
    787 
    788 void owl_global_set_no_doaimevents(owl_global *g)
    789 {
    790   g->aim_doprocessing=0;
    791 }
    792 
    793 aim_session_t *owl_global_get_aimsess(owl_global *g)
    794 {
    795   return(&(g->aimsess));
    796 }
    797 
    798 aim_conn_t *owl_global_get_bosconn(owl_global *g)
    799 {
    800   return(&(g->bosconn));
    801 }
    802 
    803 void owl_global_set_bossconn(owl_global *g, aim_conn_t *conn)
    804 {
    805   g->bosconn=*conn;
    806 }
    807 
    808 int owl_global_is_aimnop_time(owl_global *g)
    809 {
    810   if (owl_timer_is_expired(&(g->aim_noop_timer))) return(1);
    811   return(0);
    812 }
    813 
    814 void owl_global_aimnop_sent(owl_global *g)
    815 {
    816   owl_timer_reset(&(g->aim_noop_timer));
    817 }
    818 
    819 owl_timer *owl_global_get_aim_login_timer(owl_global *g)
    820 {
    821   return(&(g->aim_ignorelogin_timer));
    822 }
    823 
    824725/* message queue */
    825726
     
    883784}
    884785
    885 void owl_global_set_haveaim(owl_global *g)
    886 {
    887   g->haveaim=1;
    888 }
    889 
    890 int owl_global_is_haveaim(owl_global *g)
    891 {
    892   if (g->haveaim) return(1);
    893   return(0);
    894 }
    895 
    896786void owl_global_set_havezephyr(owl_global *g)
    897787{
     
    903793  if (g->havezephyr) return(1);
    904794  return(0);
    905 }
    906 
    907 owl_timer *owl_global_get_aim_buddyinfo_timer(owl_global *g)
    908 {
    909   return(&(g->aim_buddyinfo_timer));
    910795}
    911796
  • help.c

    rec53338 rc453ada  
    5050     "\n"
    5151     "    z             Start a zwrite command\n"
    52      "    a             Start an aimwrite command\n"
    5352     "    r             Reply to the current message\n"
    5453     "    R             Reply to sender\n"
     
    8584     "\n"
    8685     "    zwrite        Send a zephyr\n"
    87      "    aimlogin      Login to AIM\n"
    88      "    aimwrite      Send an AIM message\n"
    89      "\n"
    90      "    addbuddy      Add a zephyr or AIM buddy\n"
     86     "    addbuddy      Add a zephyr buddy\n"
    9187     "    zaway         Turn zaway on or off, or set the message\n"
    9288     "    zlocate       Locate a user\n"
    9389     "    subscribe     Subscribe to a zephyr class or instance\n"
    9490     "    unsubscribe   Unsubscribe to a zephyr class or instance\n"
    95      "    blist         Print a list of zephyr and AIM buddies logged in\n"
     91     "    blist         Print a list of zephyr buddies logged in\n"
    9692     "    search        Search for a text string\n"
    9793     "\n"
     
    107103     "    zlog          Send a login or logout notification\n"
    108104     "    zlist         Print a list of zephyr buddies logged in\n"
    109      "    alist         Print a list of AIM buddies logged in\n"
    110105     "    info          Print detailed information about the current message\n"
    111106     "    filter        Create a message filter\n"
  • keys.c

    rdb0ac7e rc453ada  
    276276
    277277  BIND_CMD("z",   "start-command zwrite ", "start a zwrite command");
    278   BIND_CMD("a",   "start-command aimwrite ", "start an aimwrite command");
    279278  BIND_CMD("r",   "reply",            "reply to the current message");
    280279  BIND_CMD("R",   "reply sender",     "reply to sender of the current message");
  • logging.c

    ree310eb rc453ada  
    8787}
    8888
    89 void owl_log_aim(owl_message *m, FILE *file) {
    90     fprintf(file, "From: <%s> To: <%s>\n", owl_message_get_sender(m), owl_message_get_recipient(m));
    91     fprintf(file, "Time: %s\n\n", owl_message_get_timestr(m));
    92     if (owl_message_is_login(m))
    93         fprintf(file, "LOGIN\n\n");
    94     else if (owl_message_is_logout(m))
    95         fprintf(file, "LOGOUT\n\n");
    96     else
    97         fprintf(file, "%s\n\n", owl_message_get_body(m));
    98 }
    99 
    10089void owl_log_jabber(owl_message *m, FILE *file) {
    10190    fprintf(file, "From: <%s> To: <%s>\n",owl_message_get_sender(m), owl_message_get_recipient(m));
     
    121110    } else if (owl_message_is_type_jabber(m)) {
    122111        owl_log_jabber(m, file);
    123     } else if (owl_message_is_type_aim(m)) {
    124         owl_log_aim(m, file);
    125112    } else {
    126113        owl_log_generic(m, file);
     
    154141  } else if (owl_message_is_type_jabber(m)) {
    155142    to = owl_sprintf("jabber:%s", owl_message_get_recipient(m));
    156   } else if (owl_message_is_type_aim(m)) {
    157     char *temp2;
    158     temp = owl_aim_normalize_screenname(owl_message_get_recipient(m));
    159     temp2 = g_utf8_strdown(temp,-1);
    160     to = owl_sprintf("aim:%s", temp2);
    161     owl_free(temp2);
    162     owl_free(temp);
    163143  } else {
    164144    to = owl_sprintf("loopback");
     
    267247      from=frombuff=owl_strdup(owl_message_get_class(m));
    268248    }
    269   } else if (owl_message_is_type_aim(m)) {
    270     /* we do not yet handle chat rooms */
    271     char *normalto, *temp;
    272     temp = owl_aim_normalize_screenname(owl_message_get_sender(m));
    273     normalto = g_utf8_strdown(temp, -1);
    274     from=frombuff=owl_sprintf("aim:%s", normalto);
    275     owl_free(normalto);
    276     owl_free(temp);
    277249  } else if (owl_message_is_type_loopback(m)) {
    278250    from=frombuff=owl_strdup("loopback");
  • message.c

    r07bfbc2 rc453ada  
    575575}
    576576
    577 int owl_message_is_from_me(owl_message *m)
    578 {
    579   if (owl_message_is_type_zephyr(m)) {
    580     if (!strcasecmp(owl_message_get_sender(m), owl_zephyr_get_sender())) {
    581       return(1);
    582     } else {
    583       return(0);
    584     }
    585   } else if (owl_message_is_type_aim(m)) {
    586     if (!strcasecmp(owl_message_get_sender(m), owl_global_get_aim_screenname(&g))) {
    587       return(1);
    588     } else {
    589       return(0);
    590     }
    591   } else if (owl_message_is_type_admin(m)) {
    592     return(0);
    593   }
    594   return(0);
    595 }
    596 
    597577int owl_message_is_mail(owl_message *m)
    598578{
     
    615595      return(0);
    616596    }
    617   }
    618   return(0);
    619 }
    620 
    621 int owl_message_is_burningears(owl_message *m)
    622 {
    623   /* we should add a global to cache the short zsender */
    624   char sender[LINE], *ptr;
    625 
    626   /* if the message is from us or to us, it doesn't count */
    627   if (owl_message_is_from_me(m) || owl_message_is_private(m)) return(0);
    628 
    629   if (owl_message_is_type_zephyr(m)) {
    630     strcpy(sender, owl_zephyr_get_sender());
    631     ptr=strchr(sender, '@');
    632     if (ptr) *ptr='\0';
    633   } else if (owl_message_is_type_aim(m)) {
    634     strcpy(sender, owl_global_get_aim_screenname(&g));
    635   } else {
    636     return(0);
    637   }
    638 
    639   if (stristr(owl_message_get_body(m), sender)) {
    640     return(1);
    641597  }
    642598  return(0);
  • owl.c

    rb1fd36e rc453ada  
    183183  owl_function_debugmsg("startup: first available debugging message");
    184184  owl_global_set_startupargs(&g, argcsave, argvsave);
    185   owl_global_set_haveaim(&g);
    186185
    187186  /* prepare stdin dispatch */
     
    300299  owl_function_debugmsg("startup: setting the current view");
    301300  owl_view_create(owl_global_get_current_view(&g), "main", f, owl_global_get_style_by_name(&g, "default"));
    302 
    303   /* AIM init */
    304   owl_function_debugmsg("startup: doing AIM initialization");
    305   owl_aim_init();
    306301
    307302  /* execute the startup function in the configfile */
     
    564559      if (owl_message_is_type_zephyr(m)) {
    565560        owl_zephyr_zaway(m);
    566       } else if (owl_message_is_type_aim(m)) {
    567         if (owl_message_is_private(m)) {
    568           owl_function_send_aimawymsg(owl_message_get_sender(m), owl_global_get_zaway_msg(&g));
    569         }
    570       }
     561      }
     562      /* TODO add perl hooks for away messages */
    571563    }
    572564
     
    609601
    610602  return 1;
    611 }
    612 
    613 void owl_process_aim()
    614 {
    615   if (owl_global_is_doaimevents(&g)) {
    616     owl_aim_process_events();
    617    
    618     if (owl_global_is_aimloggedin(&g)) {
    619       if (owl_timer_is_expired(owl_global_get_aim_buddyinfo_timer(&g))) {
    620         /* owl_buddylist_request_idletimes(owl_global_get_buddylist(&g)); */
    621         owl_timer_reset(owl_global_get_aim_buddyinfo_timer(&g));
    622       }
    623     }
    624   }
    625603}
    626604
  • owl.h

    rd7a3188 rc453ada  
    2020#include <signal.h>
    2121#include <termios.h>
    22 #include <libfaim/aim.h>
    2322#include <wchar.h>
     23#include <unistd.h>
     24#include <string.h>
     25#include <errno.h>
    2426#include "config.h"
    2527#include "glib.h"
     
    3638/* logout is defined in FreeBSD. */
    3739#define logout logout_
    38 /* aim.h defines bool */
    39 #define HAS_BOOL
    4040#include <perl.h>
    4141#include "owl_perl.h"
     
    5656
    5757#ifndef OWL_VERSION_STRING
    58 #define OWL_VERSION_STRING "1.0.1"
     58#define OWL_VERSION_STRING "1.0.1-perlaim-r" BARNOWL_STRINGIFY(OWL_SVN_REVNO)
    5959#endif
    6060
     
    583583  int malloced, freed;
    584584  char *searchstring;
    585   aim_session_t aimsess;
    586   aim_conn_t bosconn;
    587   owl_timer aim_noop_timer;
    588   owl_timer aim_ignorelogin_timer;
    589   owl_timer aim_buddyinfo_timer;
    590   int aim_loggedin;         /* true if currently logged into AIM */
    591   int aim_doprocessing;     /* true if we should process AIM events (like pending login) */
    592   char *aim_screenname;     /* currently logged in AIM screen name */
    593   char *aim_screenname_for_filters;     /* currently logged in AIM screen name */
    594585  owl_buddylist buddylist;  /* list of logged in AIM buddies */
    595586  owl_list messagequeue;    /* for queueing up aim and other messages */
     
    597588  char *response;           /* response to the last question asked */
    598589  int havezephyr;
    599   int haveaim;
    600590  int got_err_signal;       /* 1 if we got an unexpected signal */
    601591  siginfo_t err_signal_info;
  • select.c

    r2f69081 rc453ada  
    148148}
    149149
    150 int owl_select_aim_hack(fd_set *rfds, fd_set *wfds)
    151 {
    152   aim_conn_t *cur;
    153   aim_session_t *sess;
    154   int max_fd;
    155 
    156   FD_ZERO(rfds);
    157   FD_ZERO(wfds);
    158   max_fd = 0;
    159   sess = owl_global_get_aimsess(&g);
    160   for (cur = sess->connlist, max_fd = 0; cur; cur = cur->next) {
    161     if (cur->fd != -1) {
    162       FD_SET(cur->fd, rfds);
    163       if (cur->status & AIM_CONN_STATUS_INPROGRESS) {
    164         /* Yes, we're checking writable sockets here. Without it, AIM
    165            login is really slow. */
    166         FD_SET(cur->fd, wfds);
    167       }
    168      
    169       if (cur->fd > max_fd)
    170         max_fd = cur->fd;
    171     }
    172   }
    173   return max_fd;
    174 }
    175 
    176150void owl_select()
    177151{
    178   int i, max_fd, aim_max_fd, aim_done;
     152  int max_fd;
    179153  fd_set r;
    180154  fd_set e;
    181   fd_set aim_rfds, aim_wfds;
    182155  struct timeval timeout;
    183156
     
    187160  max_fd = owl_select_dispatch_prepare_fd_sets(&r, &e);
    188161
    189   /* AIM HACK:
    190    *
    191    *  The problem - I'm not sure where to hook into the owl/faim
    192    *  interface to keep track of when the AIM socket(s) open and
    193    *  close. In particular, the bosconn thing throws me off. So,
    194    *  rather than register particular dispatchers for AIM, I look up
    195    *  the relevant FDs and add them to select's watch lists, then
    196    *  check for them individually before moving on to the other
    197    *  dispatchers. --asedeno
    198    */
    199   aim_done = 1;
    200   FD_ZERO(&aim_rfds);
    201   FD_ZERO(&aim_wfds);
    202   if (owl_global_is_doaimevents(&g)) {
    203     aim_done = 0;
    204     aim_max_fd = owl_select_aim_hack(&aim_rfds, &aim_wfds);
    205     if (max_fd < aim_max_fd) max_fd = aim_max_fd;
    206     for(i = 0; i <= aim_max_fd; i++) {
    207       if (FD_ISSET(i, &aim_rfds)) {
    208         FD_SET(i, &r);
    209         FD_SET(i, &e);
    210       }
    211     }
    212   }
    213   /* END AIM HACK */
    214 
    215   if ( select(max_fd+1, &r, &aim_wfds, &e, &timeout) ) {
    216     /* Merge fd_sets and clear AIM FDs. */
    217     for(i = 0; i <= max_fd; i++) {
    218       /* Merge all interesting FDs into one set, since we have a
    219          single dispatch per FD. */
    220       if (FD_ISSET(i, &r) || FD_ISSET(i, &aim_wfds) || FD_ISSET(i, &e)) {
    221         /* AIM HACK: no separate dispatch, just process here if
    222            needed, and only once per run through. */
    223         if (!aim_done && (FD_ISSET(i, &aim_rfds) || FD_ISSET(i, &aim_wfds))) {
    224           owl_process_aim();
    225           aim_done = 1;
    226         }
    227         else {
    228           FD_SET(i, &r);
    229         }
    230       }
    231     }
     162  if ( select(max_fd+1, &r, NULL, &e, &timeout) ) {
    232163    /* NOTE: the same dispatch function is called for both exceptional
    233164       and read ready FDs. */
  • util.c

    ree310eb rc453ada  
    7878  }
    7979
    80   if (owl_global_is_zaway(&g) || owl_global_is_aaway(&g)) {
     80  /* TODO add perl hooks for sepbar away, etc. status */
     81  if (owl_global_is_zaway(&g)) {
    8182    getyx(sepwin, y, x);
    8283    wmove(sepwin, y, x+2);
    8384    wattron(sepwin, A_BOLD);
    8485    wattroff(sepwin, A_REVERSE);
    85     if (owl_global_is_zaway(&g) && owl_global_is_aaway(&g)) {
     86    if (owl_global_is_zaway(&g)) {
    8687      waddstr(sepwin, " AWAY ");
    87     } else if (owl_global_is_zaway(&g)) {
    88       waddstr(sepwin, " Z-AWAY ");
    89     } else if (owl_global_is_aaway(&g)) {
    90       waddstr(sepwin, " A-AWAY ");
    91     }
     88    } /* else if... */
    9289    wattron(sepwin, A_REVERSE);
    9390    wattroff(sepwin, A_BOLD);
  • variable.c

    r52f8dd6 rc453ada  
    239239                 "default zaway message", "" ),
    240240
    241   OWLVAR_BOOL_FULL( "aaway" /* %OwlVarStub */, 0,
    242                     "Set AIM away status",
    243                     "",
    244                     NULL, owl_variable_aaway_set, NULL),
    245 
    246   OWLVAR_STRING( "aaway_msg" /* %OwlVarStub */,
    247                  OWL_DEFAULT_AAWAYMSG,
    248                  "AIM away msg for responding when away", "" ),
    249 
    250   OWLVAR_STRING( "aaway_msg_default" /* %OwlVarStub */,
    251                  OWL_DEFAULT_AAWAYMSG,
    252                  "default AIM away message", "" ),
    253 
    254241  OWLVAR_STRING( "view_home" /* %OwlVarStub */, "all",
    255242                 "home view to switch to after 'X' and 'V'",
     
    299286                 "than 60 columns, as a courtesy to recipients.\n"),
    300287
    301   OWLVAR_INT( "aim_ignorelogin_timer" /* %OwlVarStub */, 15,
    302               "number of seconds after AIM login to ignore login messages",
    303               "This specifies the number of seconds to wait after an\n"
    304               "AIM login before allowing the recipt of AIM login notifications.\n"
    305               "By default this is set to 15.  If you would like to view login\n"
    306               "notifications of buddies as soon as you login, set it to 0 instead."),
    307 
    308              
    309288  OWLVAR_INT_FULL( "typewinsize" /* %OwlVarStub:typwin_lines */,
    310289                   OWL_TYPWIN_SIZE,
     
    403382  if (newval && (*(int*)newval == 1 || *(int*)newval == 0)) {
    404383    g.debug = *(int*)newval;
    405   }
    406   return owl_variable_bool_set_default(v, newval);
    407 }
    408 
    409 /* When 'aaway' is changed, need to notify the AIM server */
    410 int owl_variable_aaway_set(owl_variable *v, void *newval)
    411 {
    412   if (newval) {
    413     if (*(int*)newval == 1) {
    414       owl_aim_set_awaymsg(owl_global_get_aaway_msg(&g));
    415     } else if (*(int*)newval == 0) {
    416       owl_aim_set_awaymsg("");
    417     }
    418384  }
    419385  return owl_variable_bool_set_default(v, newval);
Note: See TracChangeset for help on using the changeset viewer.