Changeset 39
- Timestamp:
- 07/11/04 16:02:05 (5 years ago)
- Files:
-
- wire/trunk/man/wire.1 (modified) (1 diff)
- wire/trunk/wire/commands.c (modified) (4 diffs)
- wire/trunk/wire/commands.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/trunk/man/wire.1
r38 r39 185 185 Set the server topic to 186 186 .Ar message . 187 .It Nm type Ar path Ar type 188 Set the type of 189 .Ar path 190 to the folder type indicated by 191 .Ar type , 192 which should be either 193 .Sq folder , 194 .Sq uploads , 195 or 196 .Sq dropbox . 187 197 .It Nm uptime 188 198 Display the client uptime. wire/trunk/wire/commands.c
r38 r39 1 /* $Id: commands.c,v 1.1 5 2004/07/11 13:50:54morris Exp $ */1 /* $Id: commands.c,v 1.16 2004/07/11 14:02:05 morris Exp $ */ 2 2 3 3 /* … … 186 186 1, 0, WR_COMPLETE_NICKNAME, 187 187 wr_cmd_topic }, 188 { "type", 189 true, "<path> (folder | uploads | dropbox)", 190 2, -1, WR_COMPLETE_FILENAME, 191 wr_cmd_type }, 188 192 { "uptime", 189 193 true, "", … … 205 209 206 210 207 208 211 void wr_parse_file(FILE *fp) { 209 212 char buffer[BUFSIZ], *p; … … 1127 1130 1128 1131 /* 1132 /type <path> <type> 1133 */ 1134 1135 void wr_cmd_type(int argc, char *argv[]) { 1136 char path[MAXPATHLEN]; 1137 unsigned int type; 1138 1139 /* expand path */ 1140 wr_path_expand(path, argv[0], sizeof(path)); 1141 1142 /* get type */ 1143 if(strcmp(argv[1], "folder") == 0) 1144 type = WR_FILE_DIRECTORY; 1145 else if(strcmp(argv[1], "uploads") == 0) 1146 type = WR_FILE_UPLOADS; 1147 else if(strcmp(argv[1], "dropbox") == 0) 1148 type = WR_FILE_DROPBOX; 1149 else { 1150 wr_command_usage("help"); 1151 1152 return; 1153 } 1154 1155 /* set type */ 1156 wr_send_command("TYPE %s%s%u%s", 1157 path, 1158 WR_FIELD_SEPARATOR, 1159 type, 1160 WR_MESSAGE_SEPARATOR); 1161 } 1162 1163 1164 1165 /* 1129 1166 /uptime 1130 1167 */ wire/trunk/wire/commands.h
r38 r39 1 /* $Id: commands.h,v 1. 8 2004/07/11 13:50:54morris Exp $ */1 /* $Id: commands.h,v 1.9 2004/07/11 14:02:05 morris Exp $ */ 2 2 3 3 /* … … 92 92 void wr_cmd_status(int, char **); 93 93 void wr_cmd_topic(int, char **); 94 void wr_cmd_type(int, char **); 94 95 void wr_cmd_uptime(int, char **); 95 96 void wr_cmd_version(int, char **);
