Changeset 6908ab7
- Timestamp:
- 2016-12-26T00:18:55Z (8 years ago)
- Branches:
- master
- Children:
- 7486853
- Parents:
- 1999fe5
- git-author:
- dequis <dx@…> (25-12-16 22:50:31)
- git-committer:
- dequis <dx@…> (26-12-16 00:18:55)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r1999fe5 r6908ab7 1869 1869 <bitlbee-command name="plugins"> 1870 1870 <short-description>List all the external plugins and protocols</short-description> 1871 <syntax>plugins </syntax>1871 <syntax>plugins [info <name>]</syntax> 1872 1872 1873 1873 <description> 1874 1874 <para> 1875 1875 This gives you a list of all the external plugins and protocols. 1876 </para> 1877 1878 <para> 1879 Use the <emphasis>info</emphasis> subcommand to get more details about a plugin. 1876 1880 </para> 1877 1881 </description> -
root_commands.c
r1999fe5 r6908ab7 1164 1164 } 1165 1165 1166 static void cmd_plugins_info(irc_t *irc, char **cmd) 1167 { 1168 GList *l; 1169 struct plugin_info *info; 1170 1171 MIN_ARGS(2); 1172 1173 for (l = get_plugins(); l; l = l->next) { 1174 info = l->data; 1175 if (g_strcasecmp(cmd[2], info->name) == 0) { 1176 break; 1177 } 1178 } 1179 1180 if (!l) { 1181 return; 1182 } 1183 1184 irc_rootmsg(irc, "%s:", info->name); 1185 irc_rootmsg(irc, " Version: %s", info->version); 1186 1187 if (info->description) { 1188 irc_rootmsg(irc, " Description: %s", info->description); 1189 } 1190 1191 if (info->author) { 1192 irc_rootmsg(irc, " Author: %s", info->author); 1193 } 1194 1195 if (info->url) { 1196 irc_rootmsg(irc, " URL: %s", info->url); 1197 } 1198 } 1199 1166 1200 static void cmd_plugins(irc_t *irc, char **cmd) 1167 1201 { 1168 1202 GList *prpls; 1169 1203 GString *gstr; 1204 1205 if (cmd[1] && g_strcasecmp(cmd[1], "info") == 0) { 1206 cmd_plugins_info(irc, cmd); 1207 return; 1208 } 1170 1209 1171 1210 #ifdef WITH_PLUGINS 1172 1211 GList *l; 1173 1212 struct plugin_info *info; 1213 char *format; 1214 1215 if (strchr(irc->umode, 'b') != NULL) { 1216 format = "%s\t%s"; 1217 } else { 1218 format = "%-30s %s"; 1219 } 1220 1221 irc_rootmsg(irc, format, "Plugin", "Version"); 1174 1222 1175 1223 for (l = get_plugins(); l; l = l->next) { 1176 1224 info = l->data; 1177 irc_rootmsg(irc, "%s:", info->name); 1178 irc_rootmsg(irc, " Version: %s", info->version); 1179 1180 if (info->description) { 1181 irc_rootmsg(irc, " Description: %s", info->description); 1182 } 1183 1184 if (info->author) { 1185 irc_rootmsg(irc, " Author: %s", info->author); 1186 } 1187 1188 if (info->url) { 1189 irc_rootmsg(irc, " URL: %s", info->url); 1190 } 1191 1192 irc_rootmsg(irc, ""); 1225 irc_rootmsg(irc, format, info->name, info->version); 1193 1226 } 1194 1227 #endif 1228 1229 irc_rootmsg(irc, ""); 1195 1230 1196 1231 gstr = g_string_new(NULL);
Note: See TracChangeset
for help on using the changeset viewer.