Changeset bd69a21 for protocols/nogaim.c
- Timestamp:
- 2005-12-15T12:24:25Z (18 years ago)
- Branches:
- master
- Children:
- 4146a07
- Parents:
- 2983f5e (diff), bf02a67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r2983f5e rbd69a21 55 55 GSList *connections; 56 56 57 #ifdef WITH_PLUGINS 57 58 gboolean load_plugin(char *path) 58 59 { … … 75 76 return TRUE; 76 77 } 78 79 void load_plugins(void) 80 { 81 GDir *dir; 82 GError *error = NULL; 83 84 dir = g_dir_open(PLUGINDIR, 0, &error); 85 86 if (dir) { 87 const gchar *entry; 88 char *path; 89 90 while ((entry = g_dir_read_name(dir))) { 91 path = g_build_filename(PLUGINDIR, entry, NULL); 92 if(!path) { 93 log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry); 94 continue; 95 } 96 97 load_plugin(path); 98 99 g_free(path); 100 } 101 102 g_dir_close(dir); 103 } 104 } 105 #endif 77 106 78 107 /* nogaim.c */ … … 101 130 void nogaim_init() 102 131 { 103 GDir *dir; 104 GError *error = NULL; 132 extern void msn_init(); 133 extern void oscar_init(); 134 extern void byahoo_init(); 135 extern void jabber_init(); 105 136 106 137 #ifdef WITH_MSN 107 extern void msn_init();108 138 msn_init(); 109 139 #endif 110 140 111 141 #ifdef WITH_OSCAR 112 extern void oscar_init();113 142 oscar_init(); 114 143 #endif 115 144 116 145 #ifdef WITH_YAHOO 117 extern void byahoo_init();118 146 byahoo_init(); 119 147 #endif 120 148 121 149 #ifdef WITH_JABBER 122 extern void jabber_init();123 150 jabber_init(); 124 151 #endif 125 152 126 dir = g_dir_open(PLUGINDIR, 0, &error); 127 128 if (dir) { 129 const gchar *entry; 130 char *path; 131 132 while ((entry = g_dir_read_name(dir))) { 133 path = g_build_filename(PLUGINDIR, entry, NULL); 134 if(!path) { 135 log_message(LOGLVL_WARNING, "Can't build path for %s\n", entry); 136 continue; 137 } 138 139 load_plugin(path); 140 141 g_free(path); 142 } 143 144 g_dir_close(dir); 145 } 153 #ifdef WITH_PLUGINS 154 load_plugins(); 155 #endif 146 156 } 147 157 … … 442 452 void do_error_dialog( struct gaim_connection *gc, char *msg, char *title ) 443 453 { 444 serv_got_crap( gc, "Error: %s", msg ); 454 if( msg && title ) 455 serv_got_crap( gc, "Error: %s: %s", title, msg ); 456 else if( msg ) 457 serv_got_crap( gc, "Error: %s", msg ); 458 else if( title ) 459 serv_got_crap( gc, "Error: %s", title ); 460 else 461 serv_got_crap( gc, "Error" ); 445 462 } 446 463 … … 727 744 /* If there's a newline/space in this string, split up there, 728 745 looks a bit prettier. */ 729 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = str chr( msg, ' ' ) ) )746 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strrchr( msg, ' ' ) ) ) 730 747 { 731 748 msg[425] = tmp; … … 751 768 } 752 769 753 void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout )770 void serv_got_typing( struct gaim_connection *gc, char *handle, int timeout, int type ) 754 771 { 755 772 user_t *u; … … 758 775 return; 759 776 760 if( ( u = user_findhandle( gc, handle ) ) ) 761 irc_msgfrom( gc->irc, u->nick, "\1TYPING 1\1" ); 777 if( ( u = user_findhandle( gc, handle ) ) ) { 778 /* If type is: 779 * 0: user has stopped typing 780 * 1: user is actively typing 781 * 2: user has entered text, but is not actively typing 782 */ 783 if (type == 0 || type == 1 || type == 2) { 784 char buf[256]; 785 g_snprintf(buf, 256, "\1TYPING %d\1", type); 786 irc_privmsg( gc->irc, u, "PRIVMSG", gc->irc->nick, NULL, buf ); 787 } 788 } 762 789 } 763 790
Note: See TracChangeset
for help on using the changeset viewer.