Changeset 65e2ce1
- Timestamp:
- 2005-11-28T23:27:09Z (19 years ago)
- Branches:
- master
- Children:
- ac55e50
- Parents:
- b20b32f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
rb20b32f r65e2ce1 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
Note: See TracChangeset
for help on using the changeset viewer.