README.nap
1
2
3Well here's my attempt at a "napster" client. Mine is a plugin for BitchX
4and should work with 1.0c11 or 1.0c12. This source should be untar'd in the
5BitchX/dll directory in order to find certain files that are required.
6There will be a compile error in include/modval.h of 1.0c11 and 1.0c12,
7requiring you to edit the file and add a ( to the #define for strmopencat.
8This is what the line should look like.
9
10#define strmopencat ((char * (*)())global[STRMOPENCAT])
11
12After you have compiled BitchX with plugin support (./configure
13--with-plugins) and have installed the client with either make install or
14make install_local, you can then /loaddll nap which loads the plugin into
15the client. At this point, you have a bunch of new /set's and a few new
16commands.
17
18There is a /set napster_user and a /set napster_pass to set the username and
19password you use with the server. You will need to set these to a unique
20name and password. IF after you run set these 2 variables and /napster,
21recieve an error msg about Invalid Password, it means the username is taken.
22
23There is also a /napster command which actually connects you to the server.
24The /napster command can also take a -create flag which tells the napster
25server to create the account. /n<tab> will display a list of commands
26(starting with the letter N) of which ALL the nap plugin commands are
27included. /set napster will display ALL the set's.
28
29
30We also have a list of functions specific to napster and a whole set of
31hook's for use in a scripted environment. /on module "NAP *" where the
32first arg is NAP, second is a function are available for scripts to be
33written.
34
35[Functions]
36
37 $md5(open_file_des [size])
38 size defaults to 300000
39
40 $napchannel()
41 returns current channel
42
43 $nraw(num [args])
44 sends a raw command to the server.
45 returns -1 on error.
46 returns 0 if no args for command.
47 returns len of args.
48
49 $nhotlist([nick|nick(s)])
50 returns current hotlist with no args.
51 returns hotlist info if nick is specified.
52
53 $nap_connected()
54 returns empty or the server we are connected to.
55
56 $nonchannel(channel [nick|nick(s)]);
57 returns all nicks on the channel if no other arg specified.
58 returns info on nicks specified.
59
60 $nonchan(channel)
61 are we on this channel?. 0 or 1
62
63 $ntopic(channel)
64 returns the topic for the specified channel.
65
66 $mp3time(seconds)
67 pretty prints the seconds.
68
69[Commands]
70n command args
71 command can be one of raw, whois. raw is for sending raw server
72 numerics and is meant for testing.
73
74napster [-create] [user] [pass] [host] [port]
75 This command will attempt to find the best server and connect you to
76 it. with -create, it will attempt to create an account using the
77 /set napster_user and /set napster_pass variables.
78
79nbrowse nick
80 Attempts to get the filelist that nick is offering.
81
82nclose
83 Close the current napster connection.
84
85nconnect <server:port> | <server port>
86 Attempt to connect to a known server.
87
88ndel <*|#>
89 Deletes the numbered download.
90
91necho [-x] args
92 Will display text using the internal window display routine. -x
93 displays text without the "prompt"
94
95ninfo [nick]
96 Will display whois info about nick, or yourself if no nick
97 specified.
98
99nget [-request] [-browse] <#>
100 Attempt to get the # file from the request or the browse list
101
102nglist
103 Display list of current uploads and downloads.
104
105njoin [channelname]
106 Join the channelname specified, or if none and we are on a
107 channel(s), then switch current channels.
108
109nlist
110 Displays all the channel's available.
111
112nload [-recurse][-share][-file [filename]][-save [filename]] dir | dir(s)
113 -recurse is a toggle which turns on/off recursive directory
114 searching. It can appear anywhere, and turns on/off recursion until
115 the end of the directory paths or until the next occurance.
116 -share will add the files as they are found to the napster server
117 database
118 -file will load a file called shared.dat(default) from your
119 ~/.BitchX or CTOOLZ_DIR. This file is in the same format as the
120 linux napster save file. A filename can be specified in it's place
121 -save will attempt to save a file using the same as the information
122 in -file
123
124nmsg nick msg
125 sends a msg to nick.
126
127
128
129npart [channelname]
130 Attempts to part or leave the [channelname] or if no channelname is
131 specified it leaves the current channel.
132
133nprint
134 Prints a list of the mp3's in a nice format.. /set napster_format
135 can be used to change this format. More documentation needed here.
136
137nreconnect
138 Attempts to re-connect to the current server.
139
140nreload [-recurse] dir | dir(s)
141 Removes the old list of mp3's and then scans the directories
142 specified. See [nload].
143
144nrequest nick filename
145 If you know the exact filename on "nick" then you can directly
146 request it without going through the browse.
147
148nsave
149 This saves ~/.BitchX/Napster.sav which is all your current set's.
150
151nsay msg
152 Say msg on the current channel.
153
154nscan
155 Display the nicks on the current channel.
156
157nsound
158 same arg's are nsearch. The differance is that a soundex is
159 performed and requested. This is an opennap feature.
160
161nsearch [-maxresults #][-bitrate|-maxbitrate|-minbitrate #]
162 (20,24,32,48,56,64,98,112,128,160,192,256,320)
163 [-freq|-minfreq|-maxfreq #]
164 (8000,11025,12000,16000,22050,24000,32000,44100,48000)
165 [-linespeed|-minlinespeed|-maxlinespeed #] (0-11)
166 [-type video/zip/audio]
167 pattern
168
169 Search for "pattern" on your napster server.. You can then use /nget
170 to receive files.
171** NOTE napster servers have an error where more than 100 results will never
172 be returned.
173
174nshare
175 After a /nload you might want to actually share the files with your
176 friends.
177
178ntopic [topic]
179 Displays or attempts to set the current channel topic.
180
181npass <nick password>
182 Command to change your password.
183
184nping <nick>
185 Will ping a nick giving an indication of server response time.
186
187nstats
188 Display statistics gathered during the operation of napster plugin.
189
190nignore <nick|-nick>
191 This will ignore everything this particular nick might do to you.
192 -nick will remove the ignore.
193
194necho [-x] <args>
195 output args to the napster window. -x is raw output.
196
197nadmin <command> [args]
198 This command is used for admins and elite etc. <command> is one of
199 the following:
200
201 annouce <args>
202 This is a command for moderators and admins.
203
204 kill <nick>
205 This is a command for moderators and admins.
206
207 muzzle <nick>
208 This is a command for moderators and admins.
209
210 muzzle <nick>
211 This is a command for moderators and admins.
212
213 nuke <nick>
214 This is a command for moderators and admins.
215
216 opsay <msg>
217 This is a command for moderators and admins.
218
219 setdataport <nick port>
220 This is a command for moderators and admins.
221
222 setlinespeed <nick #>
223 This is a command for moderators and admins.
224
225 setuserlevel <nick level>
226 This is a command for moderators and admins.
227
228 unban <nick>
229 This is a command for moderators and admins.
230
231 unnuke <nick>
232 This is a command for moderators and admins.
233
234 ban <nick>
235 This is a command for moderators and admins.
236
237 banlist
238 Display current list of server bans.
239
240 version
241 grab the server version.
242
243[following are opennap specific]
244 connect <host> <port> [<remote server>]
245 attempts to connect to the server on <port>
246
247 disconnect <host> <reason>
248 delink server from net.
249
250 killserver <server> <reason>
251 shutdown server
252
253 removeserver <servername> <reason>
254 remove server from table of allowed servers
255
256 config <variable> [<value>]
257 attempts to set a server variable
258
259 reload
260 reloads the default variables from the config file
261
262
263The Following set's are available.
264
265 napster_dataport [6699]
266 Set's your dataport for filesends.
267
268 napster_dir
269 Set's your base directory for /nload
270
271 napster_download_dir ~
272 Set's the location for your downloaded files.
273
274 napster_email blah@hrm.test
275 Set's your email address for login
276
277 napster_send_limit 5
278 Set the max send's allowed.
279
280 napster_max_send_nick
281 Set the max sends to one nick allowed at one time. Should be smaller
282 than "napster_send_limit"
283
284 napster_format
285 Set's the output of the /nprint command.
286 %% will print a % sign.
287 %b bitrate
288 %s filesize
289 %t print mp3 time in minutes/seconds.
290 %T print raw time in seconds.
291 %f print base name of the file.
292 %F print raw filename
293 %M print md5 checksum
294 %S print mode of mp3.
295 %H print frequency
296 %h print raw frequency
297 \n start a newline
298 \t put a tab in the output.
299
300 napster_host server.napster.com
301 Set's the napster server for lookups.
302
303 napster_max_results 100
304 Set's the MAX number of results for /nsearch.
305
306 napster_names_nickcolor %K[%w$[12]0%K]
307 Set's the format for the nicks when you /njoin or /nscan a channel
308 A double space in the format will be replaced with a "color" code
309 based on the speed of the user.
310
311 napster_numeric
312 Set's the numeric prompt
313
314 napster_pass
315 Set's the password you will use on the server.
316
317 napster_port 8875
318 Set's the port for /set napster_server
319
320 napster_prompt [Nap]
321 Set's the prompt when outputting a napster line.
322
323 napster_show_numeric OFF
324 Set's display of numerics on/off
325
326 napster_speed 3
327 Set's your connection speed. values are 0-11.
328
329 napster_user
330 Set's the username you will use on the server.
331
332 napster_window OFF
333 Set's a private window for napster
334
335 napster_window_hidden OFF
336 Set's the private window hidden.
337
338 napster_share ON
339 Turn's on/off sharing of music. shared files will however stay in
340 the database.
341
342 panasync
343 Colten Edwards
344