Changeset fd93b41
- Timestamp:
- Jun 3, 2003, 5:38:08 PM (21 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 38cf544c
- Parents:
- aa5f725
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
ChangeLog
r31e48a3 rfd93b41 75 75 New built-in filters 'aim' and 'zephyr'. 76 76 Do ZResetAuthentication() before zlog_in and zlog_out as well. 77 Print AIM login / logout notifications 78 The 'alist' command prints a list of aim buddies logged in 79 The 'blist' command prints users from all protocols 80 The 'l' key is now bound to 'blist' instead of 'zlist' 81 Started work on 'addbuddy' and 'delbuddy' command but they DO NOT 82 WORK yet 83 Removed a bit of faim code that allowed commands to be executed. 84 77 85 78 86 1.2.8 -
aim.c
raa5f725 rfd93b41 175 175 } 176 176 177 void owl_aim_addbuddy(char *screenname) 178 { 179 aim_add_buddy(owl_global_get_aimsess(&g), owl_global_get_waitingconn(&g), screenname); 180 } 181 182 void owl_aim_delbuddy(char *screenname) 183 { 184 aim_remove_buddy(owl_global_get_aimsess(&g), NULL, screenname); 185 } 186 177 187 void owl_aim_chat_join(char *chatroom) 178 188 { … … 497 507 { 498 508 aim_session_kill(sess); 499 509 owl_aim_init(); 510 500 511 /* kretch 501 512 if (faimtest_init() == -1) … … 1269 1280 owl_global_messagequeue_addmsg(&g, m); 1270 1281 owl_free(stripmsg); 1282 1283 return(1); 1271 1284 1272 1285 /* printf("icbm: message: %s\n", realmsg); */ … … 1291 1304 /* printf("icbm: their icon: iconstamp = %ld, iconlen = 0x%08lx, iconsum = 0x%04x\n", args->iconstamp, args->iconlen, args->iconsum); */ 1292 1305 } 1293 1306 1307 /* 1294 1308 if (realmsg) { 1295 1309 int i = 0; … … 1304 1318 faimtest_handlecmd(sess, conn, userinfo, tmpstr); 1305 1319 } 1320 */ 1306 1321 1307 1322 if (priv->buddyicon && (args->icbmflags & AIM_IMFLAGS_BUDDYREQ)) { … … 1344 1359 /* Automatically join room... */ 1345 1360 /* printf("chat invitiation: autojoining %s...\n", args->info.chat.roominfo.name); */ 1346 aim_chat_join(sess, conn, args->info.chat.roominfo.exchange, args->info.chat.roominfo.name, args->info.chat.roominfo.instance); 1361 1362 /* aim_chat_join(sess, conn, args->info.chat.roominfo.exchange, args->info.chat.roominfo.name, args->info.chat.roominfo.instance); */ 1347 1363 } else if (args->reqclass == AIM_CAPS_IMIMAGE) { 1348 1364 directim_requested(sess, conn, userinfo, args); -
commands.c
raa5f725 rfd93b41 197 197 "dump <filename>", 198 198 "Dump messages in current view to the named file."), 199 200 OWLCMD_ARGS("addbuddy", owl_command_addbuddy, OWL_CTX_INTERACTIVE, 201 "add a buddy to a buddylist", 202 "addbuddy aim <screenname>", 203 "Add the named buddy to your buddylist. Eventually other protocols," 204 "such as zephyr, will also be able to use this command. For now the" 205 "only available protocol is 'aim', specified as the first argument."), 206 207 OWLCMD_ARGS("delbuddy", owl_command_delbuddy, OWL_CTX_INTERACTIVE, 208 "delete a buddy from a buddylist", 209 "delbuddy aim <screenname>", 210 "Delete the named buddy to your buddylist. Eventually other protocols," 211 "such as zephyr, will also be able to use this command. For now the" 212 "only available protocol is 'aim', specified as the first argument."), 199 213 200 214 OWLCMD_ARGS("smartzpunt", owl_command_smartzpunt, OWL_CTX_INTERACTIVE, … … 851 865 sprintf(buff, "Owl version %s", OWL_VERSION_STRING); 852 866 owl_function_makemsg(buff); 867 } 868 869 char *owl_command_addbuddy(int argc, char **argv, char *buff) 870 { 871 if (!owl_global_is_aimloggedin(&g)) { 872 owl_function_makemsg("addbuddy: You must be logged into aim to use this command."); 873 return(NULL); 874 } 875 876 if (argc!=3) { 877 owl_function_makemsg("usage: addbuddy <protocol> <buddyname>"); 878 return(NULL); 879 } 880 881 if (strcasecmp(argv[1], "aim")) { 882 owl_function_makemsg("addbuddy: currently the only supported protocol is 'aim'"); 883 return(NULL); 884 } 885 886 owl_aim_addbuddy(argv[2]); 887 owl_function_makemsg("%s added as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g)); 888 889 return(NULL); 890 } 891 892 char *owl_command_delbuddy(int argc, char **argv, char *buff) 893 { 894 if (!owl_global_is_aimloggedin(&g)) { 895 owl_function_makemsg("delbuddy: You must be logged into aim to use this command."); 896 return(NULL); 897 } 898 899 if (argc!=3) { 900 owl_function_makemsg("usage: delbuddy <protocol> <buddyname>"); 901 return(NULL); 902 } 903 904 if (strcasecmp(argv[1], "aim")) { 905 owl_function_makemsg("delbuddy: currently the only supported protocol is 'aim'"); 906 return(NULL); 907 } 908 909 owl_aim_delbuddy(argv[2]); 910 owl_function_makemsg("%s deleted as AIM buddy for %s", argv[2], owl_global_get_aim_screenname(&g)); 911 912 return(NULL); 853 913 } 854 914 -
owl_prototypes.h
raa5f725 rfd93b41 4 4 extern void owl_aim_logout(void); 5 5 extern int owl_aim_send_im(char *to, char *msg); 6 extern void owl_aim_addbuddy(char *screenname); 7 extern void owl_aim_delbuddy(char *screenname); 6 8 extern void owl_aim_chat_join(char *chatroom); 7 9 extern void owl_aim_chat_leave(char *chatroom); … … 57 59 extern void owl_command_about(); 58 60 extern void owl_command_version(); 61 extern char *owl_command_addbuddy(int argc, char **argv, char *buff); 62 extern char *owl_command_delbuddy(int argc, char **argv, char *buff); 59 63 extern char *owl_command_dump(int argc, char **argv, char *buff); 60 64 extern char *owl_command_next(int argc, char **argv, char *buff);
Note: See TracChangeset
for help on using the changeset viewer.