equal
deleted
inserted
replaced
44 .requires = NULL, |
44 .requires = NULL, |
45 .init = extsay_init, |
45 .init = extsay_init, |
46 .uninit = extsay_uninit, |
46 .uninit = extsay_uninit, |
47 .next = NULL, |
47 .next = NULL, |
48 }; |
48 }; |
|
49 |
|
50 #ifdef MCABBER_API_HAVE_CMD_ID |
|
51 static gpointer extsay_cmdid; |
|
52 #endif |
49 |
53 |
50 |
54 |
51 // Run the external helper script with parameters |
55 // Run the external helper script with parameters |
52 static void screen_run_script(const gchar *args) |
56 static void screen_run_script(const gchar *args) |
53 { |
57 { |
141 g_free(fjid); |
145 g_free(fjid); |
142 } |
146 } |
143 |
147 |
144 static void extsay_init(void) |
148 static void extsay_init(void) |
145 { |
149 { |
|
150 #ifdef MCABBER_API_HAVE_CMD_ID |
|
151 extsay_cmdid = cmd_add("extsay", "Use external editor to write a message", |
|
152 COMPL_JID, 0, do_extsay, NULL); |
|
153 #else |
146 cmd_add("extsay", "Use external editor to write a message", |
154 cmd_add("extsay", "Use external editor to write a message", |
147 COMPL_JID, 0, do_extsay, NULL); |
155 COMPL_JID, 0, do_extsay, NULL); |
|
156 #endif |
148 } |
157 } |
149 |
158 |
150 static void extsay_uninit(void) |
159 static void extsay_uninit(void) |
151 { |
160 { |
|
161 #ifdef MCABBER_API_HAVE_CMD_ID |
|
162 cmd_del(extsay_cmdid); |
|
163 #else |
152 cmd_del("extsay"); |
164 cmd_del("extsay"); |
|
165 #endif |
153 } |
166 } |
154 |
167 |
155 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |
168 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |